GstGlobalDeviceMonitor

GstGlobalDeviceMonitor — A global device monitor and prober

Functions

Types and Values

Object Hierarchy


Includes

#include <gst/gst.h>

Description

Applications should create a GstGlobalDeviceMonitor when they want to probe, list and monitor devices of a specific type. The GstGlobalDeviceMonitor will create the appropriate GstDeviceMonitor objects and manage them. It will then post messages on its GstBus for devices that have been added and removed.

Functions

gst_global_device_monitor_get_bus ()

GstBus *
gst_global_device_monitor_get_bus (GstGlobalDeviceMonitor *monitor);

Gets the GstBus of this GstGlobalDeviceMonitor

Parameters

monitor

a GstDeviceMonitor

 

Returns

a GstBus.

[transfer full]

Since 1.4


gst_global_device_monitor_get_caps_filter ()

GstCaps *
gst_global_device_monitor_get_caps_filter
                               (GstGlobalDeviceMonitor *monitor);

Get the GstCaps filter set by gst_global_device_monitor_set_caps_filter().

Parameters

monitor

a global device monitor

 

Returns

the filter caps that are active (or ANY caps).

[transfer full]

Since 1.4


gst_global_device_monitor_get_classes_filter ()

gchar *
gst_global_device_monitor_get_classes_filter
                               (GstGlobalDeviceMonitor *monitor);

Return the type (device classes) filter active for device filtering.

Parameters

monitor

the global device monitor

 

Returns

string of device classes that are being filtered.

Since 1.4


gst_global_device_monitor_get_devices ()

GList *
gst_global_device_monitor_get_devices (GstGlobalDeviceMonitor *monitor);

Gets a list of devices from all of the relevant monitors. This may actually probe the hardware if the global monitor is not currently started.

Parameters

monitor

A GstDeviceMonitor

 

Returns

a GList of GstDevice.

[transfer full][element-type GstDevice]

Since 1.4


gst_global_device_monitor_new ()

GstGlobalDeviceMonitor *
gst_global_device_monitor_new (void);

Create a new GstGlobalDeviceMonitor

Returns

a new global device monitor.

[transfer full]

Since 1.4


gst_global_device_monitor_set_caps_filter ()

void
gst_global_device_monitor_set_caps_filter
                               (GstGlobalDeviceMonitor *monitor,
                                GstCaps *caps);

Set caps to use as filter for devices. By default ANY caps are used, meaning no caps filter is active.

Parameters

monitor

the global device monitor

 

caps

caps to filter

 

Since 1.4


gst_global_device_monitor_set_classes_filter ()

void
gst_global_device_monitor_set_classes_filter
                               (GstGlobalDeviceMonitor *monitor,
                                const gchar *classes);

Filter devices monitored by device class, e.g. in case you are only interested in a certain type of device like audio devices or video sources.

Parameters

monitor

the global device monitor

 

classes

device classes to use as filter

 

Since 1.4


gst_global_device_monitor_start ()

gboolean
gst_global_device_monitor_start (GstGlobalDeviceMonitor *monitor);

Starts monitoring the devices, one this has succeeded, the GST_MESSAGE_DEVICE_ADDED and GST_MESSAGE_DEVICE_REMOVED messages will be emitted on the bus when the list of devices changes.

Parameters

monitor

A GstGlobalDeviceMonitor

 

Returns

TRUE if the device monitoring could be started

Since 1.4


gst_global_device_monitor_stop ()

void
gst_global_device_monitor_stop (GstGlobalDeviceMonitor *monitor);

Stops monitoring the devices.

Parameters

monitor

A GstDeviceMonitor

 

Since 1.4

Types and Values

struct GstGlobalDeviceMonitor

struct GstGlobalDeviceMonitor {
  GstObject                parent;
};

Opaque global device monitor object structure.

Members

GstObject parent;

the parent GstObject structure

 

Since 1.4


struct GstGlobalDeviceMonitorClass

struct GstGlobalDeviceMonitorClass {
  GstObjectClass           parent_class;
};

Opaque global device monitor class structure.

Members

GstObjectClass parent_class;

the parent GstObjectClass structure

 

Since 1.4

See Also

GstDevice, GstDeviceMonitor