| Top |
ApertureDeviceManager finds and monitors camera devices that can be used in Aperture. It provides functions for listing cameras, and signals for detecting when cameras are plugged in or unplugged.
ApertureDeviceManager *
aperture_device_manager_get_instance (void);
Gets an ApertureDeviceManager.
Since: 0.1
int
aperture_device_manager_get_num_cameras
(ApertureDeviceManager *self);
Gets the number of available cameras.
Since: 0.1
int aperture_device_manager_next_camera (ApertureDeviceManager *self,int idx);
Gets the next camera index after idx
, wrapping around if necesary. If there
are no cameras available, returns -1.
Since: 0.1
#define APERTURE_TYPE_DEVICE_MANAGER (aperture_device_manager_get_type())
“num-cameras” property“num-cameras” gint
The number of cameras available.
Owner: ApertureDeviceManager
Flags: Read
Allowed values: >= 0
Default value: 0
“camera-added” signalvoid user_function (ApertureDeviceManager *self, gint camera_index, gpointer user_data)
Emitted when a camera is discovered.
self |
||
camera_index |
the index of the new camera |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.1
“camera-removed” signalvoid user_function (ApertureDeviceManager *self, gint camera_index, gpointer user_data)
Emitted when a camera is removed (typically because it has been unplugged).
The camera's index is provided, but remember that it is the camera's *old* index. That index is now either invalid or points to a different camera. You can still use it to check whether the camera you were using is the one that was removed.
self |
||
camera_index |
the index the camera had |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.1