Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Webcam.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6#include <UserEvent.idl>
7
8/** Webcam Management */
9module webcam {
10
11 /** PixelFormat */
12 enumeration PixelFormat {
13 MJPEG, ///< Motion JPEG
14 JPEG, ///< JPEG
15 RGB, ///< RGB encoded
16 YUV ///< YUV encoded
17 };
18
19 /** PowerLineFrequency */
20 enumeration PowerLineFrequency {
21 NOT_SUPPORTED,
22 HZ50,
23 HZ60,
24 DISABLED
25 };
26
27 /** Format */
28 structure Format {
29 int width; ///< image width
30 int height; ///< image height
31 PixelFormat pixelFormat; ///< pixel format
32 };
33
34 /**
35 * Controls
36 *
37 * All int values are normed to a range of 1 to 1000
38 * 0 means "auto" if available, -1 means not supported by the webcam
39 */
40 structure Controls {
41 int brightness; ///< brightness
42 int contrast; ///< contrast
43 int saturation; ///< saturation
44 int gain; ///< gain
45 int gamma; ///< gamma
46 PowerLineFrequency powerLineFrequency; ///< power line frequency (50Hz, 60Hz or disabled)
47 };
48
49 /** Location */
50 structure Location {
51 string name; ///< location name
52 string x; ///< x
53 string y; ///< y
54 string z; ///< z
55 };
56
57 /** Image meta data */
58 structure ImageMetaData {
59 Format format; ///< image format information
60 long timestamp; ///< image timestamp
61 Location location; ///< source webcam location
62 };
63
64 /** Image */
65 structure Image {
66 ImageMetaData meta; ///< image meta data
67 string data; ///< base64 encoded image data
68 };
69
70 /** Webcam settings */
71 structure Settings {
72 Format format; ///< currently selected image format
73 Controls controls; ///< image settings like brightness, contrast, gain, ...
74 string name; ///< webcam name
75 Location location; ///< webcam location
76 int refreshInterval; ///< in ms, toggle "video" and "static image" mode
77 };
78
79 /** Webcam information */
80 structure Information {
81 string id; ///< port and camera specific ID string
82 string model; ///< camera model
83 vector<Format> supportedFormats; ///< supported image formats
84 };
85
86 /** The webcam interface */
87 interface Webcam {
88 /**
89 * Error codes
90 */
91 constant int NO_ERROR = 0; ///< Operation successful, no error
92 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
93
94 /**
95 * This event is emitted after the settings of a webcam were changed
96 */
97 valueobject SettingsChangedEvent extends event.UserEvent {
98 Settings oldSettings; ///< the old settings
99 Settings newSettings; ///< the new settings
100 };
101
102 /**
103 * Retrieve information of a specific webcam.
104 *
105 * @return Information
106 */
108
109 /**
110 * Retrieve settings of a specific webcam.
111 *
112 * @return Settings
113 */
115
116 /**
117 * Change settings of a specific webcam.
118 *
119 * @param settings New webcam settings
120 *
121 * @return 0 if success
122 * @return 1 if any parameter is invalid
123 */
124 int setSettings(in Settings settings);
125
126 /**
127 * Apply webcam control settings without storing them
128 *
129 * @param controls Control settings
130 *
131 * @return 0 if success
132 * @return 1 if any parameter is invalid
133 */
134 int setControls(in Controls controls);
135
136 /**
137 * Retrieve the default value of the controls.
138 *
139 * @return Controls
140 */
142 };
143}
The webcam interface.
Definition Webcam.idl:87
constant int ERR_INVALID_PARAM
Invalid parameter for an operation.
Definition Webcam.idl:92
int setSettings(in Settings settings)
Change settings of a specific webcam.
Information getInformation()
Retrieve information of a specific webcam.
Settings getSettings()
Retrieve settings of a specific webcam.
constant int NO_ERROR
Error codes.
Definition Webcam.idl:91
Controls getControlDefaults()
Retrieve the default value of the controls.
int setControls(in Controls controls)
Apply webcam control settings without storing them.
Webcam Management.
PowerLineFrequency
PowerLineFrequency.
Definition Webcam.idl:20
PixelFormat
PixelFormat.
Definition Webcam.idl:12
@ JPEG
JPEG.
Definition Webcam.idl:14
@ MJPEG
Motion JPEG.
Definition Webcam.idl:13
@ RGB
RGB encoded.
Definition Webcam.idl:15
@ YUV
YUV encoded.
Definition Webcam.idl:16
Controls.
Definition Webcam.idl:40
int contrast
contrast
Definition Webcam.idl:42
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition Webcam.idl:46
int saturation
saturation
Definition Webcam.idl:43
int brightness
brightness
Definition Webcam.idl:41
int gamma
gamma
Definition Webcam.idl:45
Format.
Definition Webcam.idl:28
int width
image width
Definition Webcam.idl:29
int height
image height
Definition Webcam.idl:30
PixelFormat pixelFormat
pixel format
Definition Webcam.idl:31
Image meta data.
Definition Webcam.idl:58
long timestamp
image timestamp
Definition Webcam.idl:60
Format format
image format information
Definition Webcam.idl:59
Location location
source webcam location
Definition Webcam.idl:61
ImageMetaData meta
image meta data
Definition Webcam.idl:66
string data
base64 encoded image data
Definition Webcam.idl:67
Webcam information.
Definition Webcam.idl:80
vector< Format > supportedFormats
supported image formats
Definition Webcam.idl:83
string model
camera model
Definition Webcam.idl:82
string id
port and camera specific ID string
Definition Webcam.idl:81
Location.
Definition Webcam.idl:50
string name
location name
Definition Webcam.idl:51
Webcam settings.
Definition Webcam.idl:71
Controls controls
image settings like brightness, contrast, gain, ...
Definition Webcam.idl:73
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition Webcam.idl:76
Format format
currently selected image format
Definition Webcam.idl:72
string name
webcam name
Definition Webcam.idl:74
Location location
webcam location
Definition Webcam.idl:75
This event is emitted after the settings of a webcam were changed.
Definition Webcam.idl:97
Settings newSettings
the new settings
Definition Webcam.idl:99
Settings oldSettings
the old settings
Definition Webcam.idl:98