## GstDeviceMonitorFactory GstDeviceMonitorFactory — Create GstDeviceMonitors from a factory |

## Functions

GstDeviceMonitorFactory * | gst_device_monitor_factory_find ()
GstDeviceMonitor * | gst_device_monitor_factory_get ()
GstDeviceMonitor * | gst_device_monitor_factory_get_by_name ()
GType | gst_device_monitor_factory_get_device_monitor_type ()
const gchar * | gst_device_monitor_factory_get_metadata ()
gchar ** | gst_device_monitor_factory_get_metadata_keys ()
gboolean | gst_device_monitor_factory_has_classes ()
gboolean | gst_device_monitor_factory_has_classesv ()
GList * | gst_device_monitor_factory_list_get_device_monitors ()

## Types and Values

| GstDeviceMonitorFactory
| GstDeviceMonitorFactoryClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstPluginFeature
                    ╰── GstDeviceMonitorFactory

## Includes

    #include <gst/gst.h>

## Description

GstDeviceMonitorFactory is used to create instances of device monitors. A GstDeviceMonitorfactory can be added to a GstPlugin as it is also a GstPluginFeature.

Use the `gst_device_monitor_factory_find()` and `gst_device_monitor_factory_create()` functions to create device monitor instances or use `gst_device_monitor_factory_make()` as a convenient shortcut.

## Functions

### gst_device_monitor_factory_find ()

    GstDeviceMonitorFactory *
    gst_device_monitor_factory_find (const gchar *name);

Search for an device monitor factory of the given name. Refs the returned device monitor factory; caller is responsible for unreffing.

#### Parameters

name | name of factory to find |

#### Returns

GstDeviceMonitorFactory if found, `NULL` otherwise.

[transfer full]

Since 1.4

### gst_device_monitor_factory_get ()

    GstDeviceMonitor *
    gst_device_monitor_factory_get (GstDeviceMonitorFactory *factory);

Returns the device monitor of the type defined by the given device monitorfactory.

#### Parameters

factory | factory to instantiate |

#### Returns

the GstDeviceMonitor or `NULL` if the device monitor couldn't be created.

[transfer full]

Since 1.4

### gst_device_monitor_factory_get_by_name ()

    GstDeviceMonitor *
    gst_device_monitor_factory_get_by_name
                                   (const gchar *factoryname);

Returns the device monitor of the type defined by the given device monitor factory.

#### Parameters

factoryname | a named factory to instantiate |

#### Returns

a GstDeviceMonitor or `NULL` if unable to create device monitor.

[transfer full]

Since 1.4

### gst_device_monitor_factory_get_device_monitor_type ()

    GType
    gst_device_monitor_factory_get_device_monitor_type
                                   (GstDeviceMonitorFactory *factory);

Get the GType for device monitors managed by this factory. The type can only be retrieved if the device monitor factory is loaded, which can be assured with `gst_plugin_feature_load()`.

#### Parameters

factory | factory to get managed GType from |

#### Returns

the GType for device monitors managed by this factory or 0 if the factory is not loaded.

Since 1.4

### gst_device_monitor_factory_get_metadata ()

    const gchar *
    gst_device_monitor_factory_get_metadata
                                   (GstDeviceMonitorFactory *factory,
                                    const gchar *key);

Get the metadata on `factory` with `key` .

#### Parameters

factory | a GstDeviceMonitorFactory |
key | a key |

#### Returns

the metadata with `key` on `factory` or `NULL` when there was no metadata with the given `key` .

Since 1.4

### gst_device_monitor_factory_get_metadata_keys ()

    gchar **
    gst_device_monitor_factory_get_metadata_keys
                                   (GstDeviceMonitorFactory *factory);

Get the available keys for the metadata on `factory` .

#### Parameters

factory | a GstDeviceMonitorFactory |

#### Returns

a `NULL`-terminated array of key strings, or `NULL` when there is no metadata. Free with `g_strfreev()` when no longer needed.

[transfer full][element-type utf8][array zero-terminated=1]

Since 1.4

### gst_device_monitor_factory_has_classes ()

    gboolean
    gst_device_monitor_factory_has_classes
                                   (GstDeviceMonitorFactory *factory,
                                    const gchar *classes);

Check if `factory` matches all of the given `classes`

#### Parameters

factory | a GstDeviceMonitorFactory |
classes | a "/" separate list of klasses to match, only match if all classes are matched |

#### Returns

`TRUE` if `factory` matches.

Since 1.4

### gst_device_monitor_factory_has_classesv ()

    gboolean
    gst_device_monitor_factory_has_classesv
                                   (GstDeviceMonitorFactory *factory,
                                    gchar **classes);

Check if `factory` matches all of the given classes

#### Parameters

factory | a GstDeviceMonitorFactory |
classes | a `NULL` terminated array of klasses to match, only match if all classes are matched. | [array zero-terminated=1]

#### Returns

`TRUE` if `factory` matches.

Since 1.4

### gst_device_monitor_factory_list_get_device_monitors ()

    GList *
    gst_device_monitor_factory_list_get_device_monitors
                                   (const gchar *classes,
                                    GstRank minrank);

Get a list of factories that match all of the given `classes` . Only device monitors with a rank greater or equal to `minrank` will be returned. The list of factories is returned by decreasing rank.

#### Parameters

classes | a "/" separate list of klasses to match, only match if all classes are matched |
minrank | Minimum rank |

#### Returns

a GList of GstDeviceMonitorFactory device monitors. Use `gst_plugin_feature_list_free()` after usage.

[transfer full][element-type Gst.DeviceMonitorFactory]

Since 1.4

## Types and Values

### GstDeviceMonitorFactory

    typedef struct _GstDeviceMonitorFactory GstDeviceMonitorFactory;

The opaque GstDeviceMonitorFactory data structure.

Since 1.4

### GstDeviceMonitorFactoryClass

    typedef struct _GstDeviceMonitorFactoryClass GstDeviceMonitorFactoryClass;

The opaque GstDeviceMonitorFactoryClass data structure.

Since 1.4

## See Also

GstDeviceMonitor, GstPlugin, GstPluginFeature, GstPadTemplate.