Webcam.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2011 Raritan Inc. All rights reserved.
*/
#include <UserEvent.idl>
/** Webcam Management */
module webcam {
/** PixelFormat */
enumeration PixelFormat {
MJPEG, ///< Motion JPEG
JPEG, ///< JPEG
RGB, ///< RGB encoded
YUV ///< YUV encoded
};
/** PowerLineFrequency */
enumeration PowerLineFrequency {
NOT_SUPPORTED,
HZ50,
HZ60,
DISABLED
};
/** Format */
structure Format_2_0_0 {
int width; ///< image width
int height; ///< image height
PixelFormat pixelFormat; ///< pixel format
};
/** Controls
*
* All int values are normed to a range of 1 to 1000
* 0 means "auto" if available, -1 means not supported by the webcam
*/
structure Controls {
int brightness; ///< brightness
int contrast; ///< contrast
int saturation; ///< saturation
int gain; ///< gain
int gamma; ///< gamma
PowerLineFrequency powerLineFrequency; ///< power line frequency (50Hz, 60Hz or disabled)
};
/** Location */
structure Location {
string name; ///< location name
string x; ///< x
string y; ///< y
string z; ///< z
};
/** Image meta data */
structure ImageMetaData {
Format_2_0_0 format; ///< image format information
long timestamp; ///< image timestamp
Location location; ///< source webcam location
};
/** Image */
structure Image_2_0_0 {
ImageMetaData meta; ///< image meta data
string data; ///< base64 encoded image data
};
/** Webcam settings */
structure Settings_2_0_0 {
Format_2_0_0 format; ///< currently selected image format
Controls controls; ///< image settings like brightness, contrast, gain, ...
string name; ///< webcam name
Location location; ///< webcam location
int refreshInterval; ///< in ms, toggle "video" and "static image" mode
};
/** Webcam information */
structure Information_3_0_0 {
string id; ///< port and camera specific ID string
string model; ///< camera model
vector<Format_2_0_0> supportedFormats; ///< supported image formats
};
/** The webcam interface */
interface Webcam_2_0_1 {
/**
* This event is emitted after the settings of a webcam were changed
*/
valueobject SettingsChangedEvent extends event.UserEvent {
Settings_2_0_0 oldSettings; ///< the old settings
Settings_2_0_0 newSettings; ///< the new settings
};
/**
* Retrieve information of a specific webcam.
*
* @return Information
*/
Information_3_0_0 getInformation();
/**
* Retrieve settings of a specific webcam.
*
* @return Settings
*/
Settings_2_0_0 getSettings();
/**
* Change settings of a specific webcam.
*
* @param settings New webcam settings
*
* @return 0 if success
*/
int setSettings(in Settings_2_0_0 settings);
/**
* Apply webcam control settings without storing them
*
* @param controls Control settings
*
* @return 0 if success
*/
int setControls(in Controls controls) ;
/**
* Retrieve the default value of the controls.
*
* @return Controls
*/
Controls getControlDefaults() ;
};
}
webcam::Location::z
string z
z
Definition: Webcam.idl:53
webcam::Format_2_0_0::width
int width
image width
Definition: Webcam.idl:29
webcam::Information_3_0_0
Webcam information.
Definition: Webcam.idl:79
webcam::Controls::powerLineFrequency
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition: Webcam.idl:45
webcam::RGB
RGB encoded.
Definition: Webcam.idl:15
webcam::Settings_2_0_0::controls
Controls controls
image settings like brightness, contrast, gain, ...
Definition: Webcam.idl:72
webcam::Format_2_0_0
Format.
Definition: Webcam.idl:28
webcam::Webcam_2_0_1
The webcam interface.
Definition: Webcam.idl:86
webcam::Information_3_0_0::id
string id
port and camera specific ID string
Definition: Webcam.idl:80
webcam::Controls
Controls.
Definition: Webcam.idl:39
webcam::Location::name
string name
location name
Definition: Webcam.idl:50
webcam::Settings_2_0_0::location
Location location
webcam location
Definition: Webcam.idl:74
webcam::ImageMetaData::location
Location location
source webcam location
Definition: Webcam.idl:60
webcam::PowerLineFrequency
PowerLineFrequency
PowerLineFrequency.
Definition: Webcam.idl:20
webcam::Settings_2_0_0::name
string name
webcam name
Definition: Webcam.idl:73
webcam::MJPEG
Motion JPEG.
Definition: Webcam.idl:13
webcam::PixelFormat
PixelFormat
PixelFormat.
Definition: Webcam.idl:12
webcam::Controls::gamma
int gamma
gamma
Definition: Webcam.idl:44
webcam::Webcam_2_0_1::newSettings
Settings_2_0_0 newSettings
the new settings
Definition: Webcam.idl:92
webcam::Settings_2_0_0
Webcam settings.
Definition: Webcam.idl:70
webcam::Information_3_0_0::model
string model
camera model
Definition: Webcam.idl:81
webcam::Image_2_0_0::meta
ImageMetaData meta
image meta data
Definition: Webcam.idl:65
webcam::Controls::gain
int gain
gain
Definition: Webcam.idl:43
webcam::Location::x
string x
x
Definition: Webcam.idl:51
webcam::YUV
YUV encoded.
Definition: Webcam.idl:16
webcam::Image_2_0_0::data
string data
base64 encoded image data
Definition: Webcam.idl:66
webcam::ImageMetaData::timestamp
long timestamp
image timestamp
Definition: Webcam.idl:59
webcam::Format_2_0_0::pixelFormat
PixelFormat pixelFormat
pixel format
Definition: Webcam.idl:31
webcam::Image_2_0_0
Image.
Definition: Webcam.idl:64
webcam::Location::y
string y
y
Definition: Webcam.idl:52
webcam::Location
Location.
Definition: Webcam.idl:49
webcam::Format_2_0_0::height
int height
image height
Definition: Webcam.idl:30
webcam::Settings_2_0_0::format
Format_2_0_0 format
currently selected image format
Definition: Webcam.idl:71
webcam
Webcam Management.
Definition: StorageManager.idl:10
webcam::Controls::brightness
int brightness
brightness
Definition: Webcam.idl:40
webcam::Settings_2_0_0::refreshInterval
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition: Webcam.idl:75
webcam::ImageMetaData
Image meta data.
Definition: Webcam.idl:57
webcam::Information_3_0_0::supportedFormats
vector< Format_2_0_0 > supportedFormats
supported image formats
Definition: Webcam.idl:82
webcam::Controls::contrast
int contrast
contrast
Definition: Webcam.idl:41
webcam::JPEG
JPEG.
Definition: Webcam.idl:14
webcam::Controls::saturation
int saturation
saturation
Definition: Webcam.idl:42
webcam::ImageMetaData::format
Format_2_0_0 format
image format information
Definition: Webcam.idl:58