# GstDevice

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.

## GstDevice

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstDevice

A device object.

### Members

`parent` (GstObject) –

The parent GstObject structure.

Since : 1.4

### Class structure

#### GstDeviceClass

The class structure for a GstDevice object.

##### Fields

`parent_class` (GstObjectClass) –

The parent GstObjectClass structure.

Since : 1.4

### Gst.DeviceClass

The class structure for a Gst.Device object.

##### Attributes

`parent_class` (Gst.ObjectClass) –

The parent Gst.ObjectClass structure.

Since : 1.4

### Gst.DeviceClass

The class structure for a Gst.Device object.

##### Attributes

`parent_class` (Gst.ObjectClass) –

The parent Gst.ObjectClass structure.

Since : 1.4

## Gst.Device

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Device

A device object.

### Members

`parent` (Gst.Object) –

The parent Gst.Object structure.

Since : 1.4

## Gst.Device

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Device

A device object.

### Members

`parent` (Gst.Object) –

The parent Gst.Object structure.

Since : 1.4

### Methods

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

Parameters:

`device` –

a GstDevice

`name` ( [allow-none]) –

name of new element, or NULL to automatically create a unique name.

Returns ( [transfer: floating][nullable]) –

a new GstElement configured to use this device

Since : 1.4

#### Gst.Device.prototype.create_element

    function Gst.Device.prototype.create_element(name: String): {
        // javascript wrapper for 'gst_device_create_element'
    }

Creates the element with all of the required parameters set to use this device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

`name` (String) –

name of new element, or NULL to automatically create a unique name.

Returns (Gst.Element) –

a new Gst.Element configured to use this device

Since : 1.4

#### Gst.Device.create_element

    def Gst.Device.create_element (self, name):
        #python wrapper for 'gst_device_create_element'

Creates the element with all of the required parameters set to use this device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

`name` (str) –

name of new element, or NULL to automatically create a unique name.

Returns (Gst.Element) –

a new Gst.Element configured 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.

Parameters:

`device` –

a GstDevice

Returns ( [nullable]) –

The GstCaps supported by this device. Unref with gst_caps_unref when done.

Since : 1.4

#### Gst.Device.prototype.get_caps

    function Gst.Device.prototype.get_caps(): {
        // javascript wrapper for 'gst_device_get_caps'
    }

Getter for the Gst.Caps that this device supports.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (Gst.Caps) –

The Gst.Caps supported by this device. Unref with gst_caps_unref (not introspectable) when done.

Since : 1.4

#### Gst.Device.get_caps

    def Gst.Device.get_caps (self):
        #python wrapper for 'gst_device_get_caps'

Getter for the Gst.Caps that this device supports.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (Gst.Caps) –

The Gst.Caps supported by this device. Unref with gst_caps_unref (not introspectable) when done.

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.

Parameters:

`device` –

a GstDevice

Returns –

The device class. Free with g_free after use.

Since : 1.4

#### Gst.Device.prototype.get_device_class

    function Gst.Device.prototype.get_device_class(): {
        // javascript wrapper for 'gst_device_get_device_class'
    }

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 Gst.DeviceProvider that produced this device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (String) –

The device class. Free with GLib.prototype.free after use.

Since : 1.4

#### Gst.Device.get_device_class

    def Gst.Device.get_device_class (self):
        #python wrapper for 'gst_device_get_device_class'

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 Gst.DeviceProvider that produced this device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (str) –

The device class. Free with GLib.free after use.

Since : 1.4

#### gst_device_get_display_name

    gchar*
    gst_device_get_display_name (GstDevice * device)

Gets the user-friendly name of the device.

Parameters:

`device` –

a GstDevice

Returns –

The device name. Free with g_free after use.

Since : 1.4

#### Gst.Device.prototype.get_display_name

    function Gst.Device.prototype.get_display_name(): {
        // javascript wrapper for 'gst_device_get_display_name'
    }

Gets the user-friendly name of the device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (String) –

The device name. Free with GLib.prototype.free after use.

Since : 1.4

#### Gst.Device.get_display_name

    def Gst.Device.get_display_name (self):
        #python wrapper for 'gst_device_get_display_name'

Gets the user-friendly name of the device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (str) –

The device name. Free with GLib.free after use.

Since : 1.4

#### gst_device_get_properties

    GstStructure *
    gst_device_get_properties (GstDevice * device)

Gets the extra properties of a device.

Parameters:

`device` –

a GstDevice

Returns ( [nullable]) –

The extra properties or NULL when there are none. Free with gst_structure_free after use.

Since : 1.6

#### Gst.Device.prototype.get_properties

    function Gst.Device.prototype.get_properties(): {
        // javascript wrapper for 'gst_device_get_properties'
    }

Gets the extra properties of a device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (Gst.Structure) –

The extra properties or NULL when there are none. Free with Gst.Structure.prototype.free after use.

Since : 1.6

#### Gst.Device.get_properties

    def Gst.Device.get_properties (self):
        #python wrapper for 'gst_device_get_properties'

Gets the extra properties of a device.

Parameters:

`device` (Gst.Device) –

a Gst.Device

Returns (Gst.Structure) –

The extra properties or NULL when there are none. Free with Gst.Structure.free after use.

Since : 1.6

#### 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` –

a GstDevice

`classes` –

a "/"-separated list of device classes to match, only match if all classes are matched

Returns –

TRUE if device matches.

Since : 1.4

#### Gst.Device.prototype.has_classes

    function Gst.Device.prototype.has_classes(classes: String): {
        // javascript wrapper for 'gst_device_has_classes'
    }

Check if device matches all of the given classes

Parameters:

`device` (Gst.Device) –

a Gst.Device

`classes` (String) –

a "/"-separated list of device classes to match, only match if all classes are matched

Returns (Number) –

TRUE if device matches.

Since : 1.4

#### Gst.Device.has_classes

    def Gst.Device.has_classes (self, classes):
        #python wrapper for 'gst_device_has_classes'

Check if device matches all of the given classes

Parameters:

`device` (Gst.Device) –

a Gst.Device

`classes` (str) –

a "/"-separated list of device classes to match, only match if all classes are matched

Returns (bool) –

TRUE if device matches.

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

Parameters:

`device` –

a GstDevice

`classes` ( [arrayzero-terminated=1]) –

a NULL terminated array of classes to match, only match if all classes are matched

Returns –

TRUE if device matches.

Since : 1.4

#### Gst.Device.prototype.has_classesv

    function Gst.Device.prototype.has_classesv(classes: [ String ]): {
        // javascript wrapper for 'gst_device_has_classesv'
    }

Check if factory matches all of the given classes

Parameters:

`device` (Gst.Device) –

a Gst.Device

`classes` ([ String ]) –

a NULL terminated array of classes to match, only match if all classes are matched

Returns (Number) –

TRUE if device matches.

Since : 1.4

#### Gst.Device.has_classesv

    def Gst.Device.has_classesv (self, classes):
        #python wrapper for 'gst_device_has_classesv'

Check if factory matches all of the given classes

Parameters:

`device` (Gst.Device) –

a Gst.Device

`classes` ([ str ]) –

a NULL terminated array of classes to match, only match if all classes are matched

Returns (bool) –

TRUE if device matches.

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.

Parameters:

`device` –

a GstDevice

`element` –

a GstElement

Returns –

TRUE if the element could be reconfigured to use this device, FALSE otherwise.

Since : 1.4

#### Gst.Device.prototype.reconfigure_element

    function Gst.Device.prototype.reconfigure_element(element: Gst.Element): {
        // javascript wrapper for 'gst_device_reconfigure_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.prototype.create_element.

Note: This should only be implemented for elements can change their device in the PLAYING state.

Parameters:

`device` (Gst.Device) –

a Gst.Device

`element` (Gst.Element) –

a Gst.Element

Returns (Number) –

TRUE if the element could be reconfigured to use this device, FALSE otherwise.

Since : 1.4

#### Gst.Device.reconfigure_element

    def Gst.Device.reconfigure_element (self, element):
        #python wrapper for 'gst_device_reconfigure_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.

Parameters:

`device` (Gst.Device) –

a Gst.Device

`element` (Gst.Element) –

a Gst.Element

Returns (bool) –

TRUE if the element could be reconfigured to use this device, FALSE otherwise.

Since : 1.4

### Signals

#### removed

    removed_callback (GstDevice * self,
                      gpointer user_data)

Parameters:

`self` –
No description available
`user_data` –
No description available

Flags: Run Last

#### removed

    function removed_callback(self: Gst.Device, user_data: Object): {
        // javascript callback for the 'removed' signal
    }

Parameters:

`self` (Gst.Device) –
No description available
`user_data` (Object) –
No description available

Flags: Run Last

#### removed

    def removed_callback (self, *user_data):
        #python callback for the 'removed' signal

Parameters:

`self` (Gst.Device) –
No description available
`user_data` (variadic) –
No description available

Flags: Run Last

### Properties

#### caps

    “caps” GstCaps *

Flags : Read / Write / Construct Only

#### caps

    “caps” Gst.Caps

Flags : Read / Write / Construct Only

#### caps

    “self.props.caps” Gst.Caps

Flags : Read / Write / Construct Only

#### device-class

    “device-class” gchar*

Flags : Read / Write / Construct Only

#### device-class

    “device-class” String

Flags : Read / Write / Construct Only

#### device_class

    “self.props.device_class” str

Flags : Read / Write / Construct Only

#### display-name

    “display-name” gchar*

Flags : Read / Write / Construct Only

#### display-name

    “display-name” String

Flags : Read / Write / Construct Only

#### display_name

    “self.props.display_name” str

Flags : Read / Write / Construct Only

#### properties

    “properties” GstStructure *

Flags : Read / Write / Construct Only

#### properties

    “properties” Gst.Structure

Flags : Read / Write / Construct Only

#### properties

    “self.props.properties” Gst.Structure

Flags : Read / Write / Construct Only

### Virtual Methods

#### create_element

    GstElement *
    create_element (GstDevice * device,
                    const gchar* name)

Creates the fully configured element to access this device. Subclasses need to override this and return a new element.

Parameters:

`device` –
No description available
`name` –
No description available
Returns –
No description available

#### vfunc_create_element

    function vfunc_create_element(device: Gst.Device, name: String): {
        // javascript implementation of the 'create_element' virtual method
    }

Creates the fully configured element to access this device. Subclasses need to override this and return a new element.

Parameters:

`device` (Gst.Device) –
No description available
`name` (String) –
No description available
Returns (Gst.Element) –
No description available

#### do_create_element

    def do_create_element (device, name):
        #python implementation of the 'create_element' virtual method

Creates the fully configured element to access this device. Subclasses need to override this and return a new element.

Parameters:

`device` (Gst.Device) –
No description available
`name` (str) –
No description available
Returns (Gst.Element) –
No description available

#### reconfigure_element

    gboolean
    reconfigure_element (GstDevice * device,
                         GstElement * element)

This only needs to be implemented by subclasses if the element can be reconfigured to use a different device. See the documentation for gst_device_reconfigure_element.

Parameters:

`device` –
No description available
`element` –
No description available
Returns –
No description available

#### vfunc_reconfigure_element

    function vfunc_reconfigure_element(device: Gst.Device, element: Gst.Element): {
        // javascript implementation of the 'reconfigure_element' virtual method
    }

This only needs to be implemented by subclasses if the element can be reconfigured to use a different device. See the documentation for Gst.Device.prototype.reconfigure_element.

Parameters:

`device` (Gst.Device) –
No description available
`element` (Gst.Element) –
No description available
Returns (Number) –
No description available

#### do_reconfigure_element

    def do_reconfigure_element (device, element):
        #python implementation of the 'reconfigure_element' virtual method

This only needs to be implemented by subclasses if the element can be reconfigured to use a different device. See the documentation for Gst.Device.reconfigure_element.

Parameters:

`device` (Gst.Device) –
No description available
`element` (Gst.Element) –
No description available
Returns (bool) –
No description available

## Function Macros

### GST_DEVICE_CAST

    #define GST_DEVICE_CAST(obj)            ((GstDevice *)(obj))

The results of the search are