Loading...
Searching...
No Matches
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 {
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 format; ///< image format information
long timestamp; ///< image timestamp
Location location; ///< source webcam location
};
/** Image */
structure Image {
ImageMetaData meta; ///< image meta data
string data; ///< base64 encoded image data
};
/** Webcam settings */
structure Settings {
Format 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 {
string id; ///< port and camera specific ID string
string model; ///< camera model
vector<Format> supportedFormats; ///< supported image formats
};
/** The webcam interface */
interface Webcam {
/**
* Error codes
*/
constant int NO_ERROR = 0; ///< Operation successful, no error
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
/**
* This event is emitted after the settings of a webcam were changed
*/
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< the old settings
Settings newSettings; ///< the new settings
};
/**
* Retrieve information of a specific webcam.
*
* @return Information
*/
Information getInformation();
/**
* Retrieve settings of a specific webcam.
*
* @return Settings
*/
Settings getSettings();
/**
* Change settings of a specific webcam.
*
* @param settings New webcam settings
*
* @return 0 if success
* @return 1 if any parameter is invalid
*/
int setSettings(in Settings settings);
/**
* Apply webcam control settings without storing them
*
* @param controls Control settings
*
* @return 0 if success
* @return 1 if any parameter is invalid
*/
int setControls(in Controls controls);
/**
* Retrieve the default value of the controls.
*
* @return Controls
*/
Controls getControlDefaults();
};
}
webcam::Webcam
The webcam interface.
Definition Webcam.idl:86
webcam::Webcam::ERR_INVALID_PARAM
constant int ERR_INVALID_PARAM
Invalid parameter for an operation.
Definition Webcam.idl:91
webcam::Webcam::setSettings
int setSettings(in Settings settings)
Change settings of a specific webcam.
webcam::Webcam::getInformation
Information getInformation()
Retrieve information of a specific webcam.
webcam::Webcam::getSettings
Settings getSettings()
Retrieve settings of a specific webcam.
webcam::Webcam::NO_ERROR
constant int NO_ERROR
Error codes.
Definition Webcam.idl:90
webcam::Webcam::getControlDefaults
Controls getControlDefaults()
Retrieve the default value of the controls.
webcam::Webcam::setControls
int setControls(in Controls controls)
Apply webcam control settings without storing them.
webcam
Webcam Management.
Definition StorageManager.idl:10
webcam::PowerLineFrequency
PowerLineFrequency
PowerLineFrequency.
Definition Webcam.idl:20
webcam::PixelFormat
PixelFormat
PixelFormat.
Definition Webcam.idl:12
webcam::JPEG
@ JPEG
JPEG.
Definition Webcam.idl:14
webcam::MJPEG
@ MJPEG
Motion JPEG.
Definition Webcam.idl:13
webcam::RGB
@ RGB
RGB encoded.
Definition Webcam.idl:15
webcam::YUV
@ YUV
YUV encoded.
Definition Webcam.idl:16
webcam::Controls
Controls.
Definition Webcam.idl:39
webcam::Controls::contrast
int contrast
contrast
Definition Webcam.idl:41
webcam::Controls::powerLineFrequency
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition Webcam.idl:45
webcam::Controls::saturation
int saturation
saturation
Definition Webcam.idl:42
webcam::Controls::brightness
int brightness
brightness
Definition Webcam.idl:40
webcam::Controls::gain
int gain
gain
Definition Webcam.idl:43
webcam::Controls::gamma
int gamma
gamma
Definition Webcam.idl:44
webcam::Format
Format.
Definition Webcam.idl:28
webcam::Format::width
int width
image width
Definition Webcam.idl:29
webcam::Format::height
int height
image height
Definition Webcam.idl:30
webcam::Format::pixelFormat
PixelFormat pixelFormat
pixel format
Definition Webcam.idl:31
webcam::ImageMetaData
Image meta data.
Definition Webcam.idl:57
webcam::ImageMetaData::timestamp
long timestamp
image timestamp
Definition Webcam.idl:59
webcam::ImageMetaData::format
Format format
image format information
Definition Webcam.idl:58
webcam::ImageMetaData::location
Location location
source webcam location
Definition Webcam.idl:60
webcam::Image
Image.
Definition Webcam.idl:64
webcam::Image::meta
ImageMetaData meta
image meta data
Definition Webcam.idl:65
webcam::Image::data
string data
base64 encoded image data
Definition Webcam.idl:66
webcam::Information
Webcam information.
Definition Webcam.idl:79
webcam::Information::supportedFormats
vector< Format > supportedFormats
supported image formats
Definition Webcam.idl:82
webcam::Information::model
string model
camera model
Definition Webcam.idl:81
webcam::Information::id
string id
port and camera specific ID string
Definition Webcam.idl:80
webcam::Location
Location.
Definition Webcam.idl:49
webcam::Location::y
string y
y
Definition Webcam.idl:52
webcam::Location::name
string name
location name
Definition Webcam.idl:50
webcam::Location::z
string z
z
Definition Webcam.idl:53
webcam::Location::x
string x
x
Definition Webcam.idl:51
webcam::Settings
Webcam settings.
Definition Webcam.idl:70
webcam::Settings::controls
Controls controls
image settings like brightness, contrast, gain, ...
Definition Webcam.idl:72
webcam::Settings::refreshInterval
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition Webcam.idl:75
webcam::Settings::format
Format format
currently selected image format
Definition Webcam.idl:71
webcam::Settings::name
string name
webcam name
Definition Webcam.idl:73
webcam::Settings::location
Location location
webcam location
Definition Webcam.idl:74
webcam::Webcam::SettingsChangedEvent
This event is emitted after the settings of a webcam were changed.
Definition Webcam.idl:96
webcam::Webcam::SettingsChangedEvent::newSettings
Settings newSettings
the new settings
Definition Webcam.idl:98
webcam::Webcam::SettingsChangedEvent::oldSettings
Settings oldSettings
the old settings
Definition Webcam.idl:97