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 /** Controls
35 *
36 * All int values are normed to a range of 1 to 1000
37 * 0 means "auto" if available, -1 means not supported by the webcam
38 */
39 structure Controls {
40 int brightness; ///< brightness
41 int contrast; ///< contrast
42 int saturation; ///< saturation
43 int gain; ///< gain
44 int gamma; ///< gamma
45 PowerLineFrequency powerLineFrequency; ///< power line frequency (50Hz, 60Hz or disabled)
46 };
47
48 /** Location */
49 structure Location {
50 string name; ///< location name
51 string x; ///< x
52 string y; ///< y
53 string z; ///< z
54 };
55
56 /** Image meta data */
57 structure ImageMetaData {
58 Format format; ///< image format information
59 long timestamp; ///< image timestamp
60 Location location; ///< source webcam location
61 };
62
63 /** Image */
64 structure Image {
65 ImageMetaData meta; ///< image meta data
66 string data; ///< base64 encoded image data
67 };
68
69 /** Webcam settings */
70 structure Settings {
71 Format format; ///< currently selected image format
72 Controls controls; ///< image settings like brightness, contrast, gain, ...
73 string name; ///< webcam name
74 Location location; ///< webcam location
75 int refreshInterval; ///< in ms, toggle "video" and "static image" mode
76 };
77
78 /** Webcam information */
79 structure Information {
80 string id; ///< port and camera specific ID string
81 string model; ///< camera model
82 vector<Format> supportedFormats; ///< supported image formats
83 };
84
85 /** The webcam interface */
86 interface Webcam {
87 /**
88 * This event is emitted after the settings of a webcam were changed
89 */
90 valueobject SettingsChangedEvent extends event.UserEvent {
91 Settings oldSettings; ///< the old settings
92 Settings newSettings; ///< the new settings
93 };
94
95 /**
96 * Retrieve information of a specific webcam.
97 *
98 * @return Information
99 */
101
102 /**
103 * Retrieve settings of a specific webcam.
104 *
105 * @return Settings
106 */
108
109 /**
110 * Change settings of a specific webcam.
111 *
112 * @param settings New webcam settings
113 *
114 * @return 0 if success
115 */
116 int setSettings(in Settings settings);
117
118 /**
119 * Apply webcam control settings without storing them
120 *
121 * @param controls Control settings
122 *
123 * @return 0 if success
124 */
125 int setControls(in Controls controls) ;
126
127 /**
128 * Retrieve the default value of the controls.
129 *
130 * @return Controls
131 */
133 };
134}
The webcam interface.
Definition: Webcam.idl:86
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.
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:39
int contrast
contrast
Definition: Webcam.idl:41
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition: Webcam.idl:45
int saturation
saturation
Definition: Webcam.idl:42
int brightness
brightness
Definition: Webcam.idl:40
int gain
gain
Definition: Webcam.idl:43
int gamma
gamma
Definition: Webcam.idl:44
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:57
long timestamp
image timestamp
Definition: Webcam.idl:59
Format format
image format information
Definition: Webcam.idl:58
Location location
source webcam location
Definition: Webcam.idl:60
Image.
Definition: Webcam.idl:64
ImageMetaData meta
image meta data
Definition: Webcam.idl:65
string data
base64 encoded image data
Definition: Webcam.idl:66
Webcam information.
Definition: Webcam.idl:79
vector< Format > supportedFormats
supported image formats
Definition: Webcam.idl:82
string model
camera model
Definition: Webcam.idl:81
string id
port and camera specific ID string
Definition: Webcam.idl:80
Location.
Definition: Webcam.idl:49
string name
location name
Definition: Webcam.idl:50
Webcam settings.
Definition: Webcam.idl:70
Controls controls
image settings like brightness, contrast, gain, ...
Definition: Webcam.idl:72
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition: Webcam.idl:75
Format format
currently selected image format
Definition: Webcam.idl:71
string name
webcam name
Definition: Webcam.idl:73
Location location
webcam location
Definition: Webcam.idl:74
This event is emitted after the settings of a webcam were changed.
Definition: Webcam.idl:90
Settings newSettings
the new settings
Definition: Webcam.idl:92
Settings oldSettings
the old settings
Definition: Webcam.idl:91