Top |
Functions
Description
GstDevice are objects representing a device, they contain relevant metadata about the device, such as its class and the GstCaps representing the media types it can produce or handle.
GstDevice are created by GstDeviceProvider objects which can be aggregated by GstDeviceMonitor objects.
Functions
gst_device_create_element ()
GstElement * gst_device_create_element (GstDevice *device
,const gchar *name
);
Creates the element with all of the required parameters set to use this device.
Since: 1.4
gst_device_get_caps ()
GstCaps *
gst_device_get_caps (GstDevice *device
);
Getter for the GstCaps that this device supports.
Since: 1.4
gst_device_get_device_class ()
gchar *
gst_device_get_device_class (GstDevice *device
);
Gets the "class" of a device. This is a "/" separated list of classes that represent this device. They are a subset of the classes of the GstDeviceProvider that produced this device.
Since: 1.4
gst_device_get_display_name ()
gchar *
gst_device_get_display_name (GstDevice *device
);
Gets the user-friendly name of the device.
Since: 1.4
gst_device_has_classes ()
gboolean gst_device_has_classes (GstDevice *device
,const gchar *classes
);
Check if device
matches all of the given classes
Parameters
device |
||
classes |
a "/"-separated list of device classes to match, only match if all classes are matched |
Since: 1.4
gst_device_has_classesv ()
gboolean gst_device_has_classesv (GstDevice *device
,gchar **classes
);
Check if factory
matches all of the given classes
Since: 1.4
gst_device_reconfigure_element ()
gboolean gst_device_reconfigure_element (GstDevice *device
,GstElement *element
);
Tries to reconfigure an existing element to use the device. If this
function fails, then one must destroy the element and create a new one
using gst_device_create_element()
.
Note: This should only be implemented for elements can change their device in the PLAYING state.
Since: 1.4
gst_device_get_properties ()
GstStructure *
gst_device_get_properties (GstDevice *device
);
Gets the extra properties of a device.
Returns
The extra properties or NULL
when there are none.
Free with gst_structure_free()
after use.
[nullable]
Since: 1.6
Types and Values
struct GstDeviceClass
struct GstDeviceClass { GstObjectClass parent_class; GstElement * (*create_element) (GstDevice * device, const gchar * name); gboolean (*reconfigure_element) (GstDevice * device, GstElement * element); };
The class structure for a GstDevice object.
Members
Creates the fully configured element to access this device. Subclasses need to override this and return a new element. |
||
This only needs to be implemented by subclasses if the
element can be reconfigured to use a different device. See the documentation
for |
Since: 1.4