ApertureDeviceManager

ApertureDeviceManager — Finds and monitors camera devices

Functions

Properties

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── ApertureDeviceManager

Description

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.

Functions

aperture_device_manager_get_instance ()

ApertureDeviceManager *
aperture_device_manager_get_instance (void);

Gets an ApertureDeviceManager.

Returns

an ApertureDeviceManager.

[transfer full]

Since: 0.1


aperture_device_manager_get_num_cameras ()

int
aperture_device_manager_get_num_cameras
                               (ApertureDeviceManager *self);

Gets the number of available cameras.

Parameters

Returns

the number of available cameras

Since: 0.1


aperture_device_manager_next_camera ()

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.

Parameters

self

an ApertureDeviceManager

 

idx

a camera index

 

Returns

the index of the next camera, or -1 if there are no cameras

Since: 0.1

Types and Values

APERTURE_TYPE_DEVICE_MANAGER

#define APERTURE_TYPE_DEVICE_MANAGER (aperture_device_manager_get_type())

ApertureDeviceManager

typedef struct _ApertureDeviceManager ApertureDeviceManager;

Property Details

The “num-cameras” property

  “num-cameras”              gint

The number of cameras available.

Owner: ApertureDeviceManager

Flags: Read

Allowed values: >= 0

Default value: 0

Signal Details

The “camera-added” signal

void
user_function (ApertureDeviceManager *self,
               gint                   camera_index,
               gpointer               user_data)

Emitted when a camera is discovered.

Parameters

self

the ApertureDeviceManager

 

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


The “camera-removed” signal

void
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.

Parameters

self

the ApertureDeviceManager

 

camera_index

the index the camera had

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

Since: 0.1