GStreamer 1.0 Core Reference Manual: GstDeviceProviderFactory

## GstDeviceProviderFactory GstDeviceProviderFactory — Create GstDeviceProviders from a factory |

## Functions

GstDeviceProviderFactory * | gst_device_provider_factory_find ()
GstDeviceProvider * | gst_device_provider_factory_get ()
GstDeviceProvider * | gst_device_provider_factory_get_by_name ()
GType | gst_device_provider_factory_get_device_provider_type ()
const gchar * | gst_device_provider_factory_get_metadata ()
gchar ** | gst_device_provider_factory_get_metadata_keys ()
gboolean | gst_device_provider_factory_has_classes ()
gboolean | gst_device_provider_factory_has_classesv ()
GList * | gst_device_provider_factory_list_get_device_providers ()

## Types and Values

| GstDeviceProviderFactory
| GstDeviceProviderFactoryClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstPluginFeature
                    ╰── GstDeviceProviderFactory

## Includes

    #include <gst/gst.h>

## Description

GstDeviceProviderFactory is used to create instances of device providers. A GstDeviceProviderfactory can be added to a GstPlugin as it is also a GstPluginFeature.

Use the `gst_device_provider_factory_find()` and `gst_device_provider_factory_get()` functions to create device provider instances or use `gst_device_provider_factory_get_by_name()` as a convenient shortcut.

## Functions

### gst_device_provider_factory_find ()

    GstDeviceProviderFactory *
    gst_device_provider_factory_find (const gchar *name);

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

#### Parameters

name | name of factory to find |

#### Returns

GstDeviceProviderFactory if found, `NULL` otherwise.

[transfer full][nullable]

Since 1.4

### gst_device_provider_factory_get ()

    GstDeviceProvider *
    gst_device_provider_factory_get (GstDeviceProviderFactory *factory);

Returns the device provider of the type defined by the given device providerfactory.

#### Parameters

factory | factory to instantiate |

#### Returns

the GstDeviceProvider or `NULL` if the device provider couldn't be created.

[transfer full][nullable]

Since 1.4

### gst_device_provider_factory_get_by_name ()

    GstDeviceProvider *
    gst_device_provider_factory_get_by_name
                                   (const gchar *factoryname);

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

#### Parameters

factoryname | a named factory to instantiate |

#### Returns

a GstDeviceProvider or `NULL` if unable to create device provider.

[transfer full][nullable]

Since 1.4

### gst_device_provider_factory_get_device_provider_type ()

    GType
    gst_device_provider_factory_get_device_provider_type
                                   (GstDeviceProviderFactory *factory);

Get the GType for device providers managed by this factory. The type can only be retrieved if the device provider 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 providers managed by this factory.

Since 1.4

### gst_device_provider_factory_get_metadata ()

    const gchar *
    gst_device_provider_factory_get_metadata
                                   (GstDeviceProviderFactory *factory,
                                    const gchar *key);

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

#### Parameters

factory | a GstDeviceProviderFactory |
key | a key |

#### Returns

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

[nullable]

Since 1.4

### gst_device_provider_factory_get_metadata_keys ()

    gchar **
    gst_device_provider_factory_get_metadata_keys
                                   (GstDeviceProviderFactory *factory);

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

#### Parameters

factory | a GstDeviceProviderFactory |

#### 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][nullable]

Since 1.4

### gst_device_provider_factory_has_classes ()

    gboolean
    gst_device_provider_factory_has_classes
                                   (GstDeviceProviderFactory *factory,
                                    const gchar *classes);

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

#### Parameters

factory | a GstDeviceProviderFactory |
classes | a "/" separate list of classes to match, only match if all classes are matched. | [allow-none]

#### Returns

`TRUE` if `factory` matches or if `classes` is `NULL`.

Since 1.4

### gst_device_provider_factory_has_classesv ()

    gboolean
    gst_device_provider_factory_has_classesv
                                   (GstDeviceProviderFactory *factory,
                                    gchar **classes);

Check if `factory` matches all of the given classes

#### Parameters

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

#### Returns

`TRUE` if `factory` matches.

Since 1.4

### gst_device_provider_factory_list_get_device_providers ()

    GList *
    gst_device_provider_factory_list_get_device_providers
                                   (GstRank minrank);

Get a list of factories with a rank greater or equal to `minrank` . The list of factories is returned by decreasing rank.

#### Parameters

minrank | Minimum rank |

#### Returns

a GList of GstDeviceProviderFactory device providers. Use `gst_plugin_feature_list_free()` after usage.

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

Since 1.4

## Types and Values

### GstDeviceProviderFactory

    typedef struct _GstDeviceProviderFactory GstDeviceProviderFactory;

The opaque GstDeviceProviderFactory data structure.

Since 1.4

### GstDeviceProviderFactoryClass

    typedef struct _GstDeviceProviderFactoryClass GstDeviceProviderFactoryClass;

The opaque GstDeviceProviderFactoryClass data structure.

Since 1.4

## See Also

GstDeviceProvider, GstPlugin, GstPluginFeature, GstPadTemplate.