gi-gst-1.0.23: GStreamer bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Objects.Device

Description

Device are objects representing a device, they contain relevant metadata about the device, such as its class and the Caps representing the media types it can produce or handle.

Device are created by DeviceProvider objects which can be aggregated by DeviceMonitor objects.

Since: 1.4

Synopsis

Exported types

newtype Device Source #

Memory-managed wrapper type.

Constructors

Device (ManagedPtr Device) 

Instances

Instances details
Eq Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

Methods

(==) :: Device -> Device -> Bool

(/=) :: Device -> Device -> Bool

GObject Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

ManagedPtrNewtype Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

Methods

toManagedPtr :: Device -> ManagedPtr Device

TypedObject Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

Methods

glibType :: IO GType

IsGValue Device Source #

Convert Device to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gst.Objects.Device

Methods

toGValue :: Device -> IO GValue

fromGValue :: GValue -> IO Device

HasParentTypes Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

type ParentTypes Device Source # 
Instance details

Defined in GI.Gst.Objects.Device

type ParentTypes Device = '[Object, Object]

class (GObject o, IsDescendantOf Device o) => IsDevice o Source #

Type class for types which can be safely cast to Device, for instance with toDevice.

Instances

Instances details
(GObject o, IsDescendantOf Device o) => IsDevice o Source # 
Instance details

Defined in GI.Gst.Objects.Device

toDevice :: (MonadIO m, IsDevice o) => o -> m Device Source #

Cast to Device, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

createElement

deviceCreateElement Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> Maybe Text

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

-> m (Maybe Element)

Returns: a new Element configured to use this device

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

Since: 1.4

getCaps

deviceGetCaps Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> m (Maybe Caps)

Returns: The Caps supported by this device. Unref with gst_caps_unref() when done.

Getter for the Caps that this device supports.

Since: 1.4

getDeviceClass

deviceGetDeviceClass Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> m Text

Returns: The device class. Free with free after use.

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

Since: 1.4

getDisplayName

deviceGetDisplayName Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> m Text

Returns: The device name. Free with free after use.

Gets the user-friendly name of the device.

Since: 1.4

getProperties

deviceGetProperties Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> m (Maybe Structure)

Returns: The extra properties or Nothing when there are none. Free with structureFree after use.

Gets the extra properties of a device.

Since: 1.6

hasClasses

deviceHasClasses Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> Text

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

-> m Bool

Returns: True if device matches.

Check if device matches all of the given classes

Since: 1.4

hasClassesv

deviceHasClassesv Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a) 
=> a

device: a Device

-> [Text]

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

-> m Bool

Returns: True if device matches.

Check if factory matches all of the given classes

Since: 1.4

reconfigureElement

deviceReconfigureElement Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsElement b) 
=> a

device: a Device

-> b

element: a Element

-> m Bool

Returns: True if the element could be reconfigured to use this device, False otherwise.

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

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

Since: 1.4

Properties

caps

No description available in the introspection data.

constructDeviceCaps :: (IsDevice o, MonadIO m) => Caps -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “caps” property. This is rarely needed directly, but it is used by new.

getDeviceCaps :: (MonadIO m, IsDevice o) => o -> m (Maybe Caps) Source #

Get the value of the “caps” property. When overloading is enabled, this is equivalent to

get device #caps

deviceClass

No description available in the introspection data.

constructDeviceDeviceClass :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “device-class” property. This is rarely needed directly, but it is used by new.

getDeviceDeviceClass :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #

Get the value of the “device-class” property. When overloading is enabled, this is equivalent to

get device #deviceClass

displayName

No description available in the introspection data.

constructDeviceDisplayName :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “display-name” property. This is rarely needed directly, but it is used by new.

getDeviceDisplayName :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #

Get the value of the “display-name” property. When overloading is enabled, this is equivalent to

get device #displayName

properties

No description available in the introspection data.

constructDeviceProperties :: (IsDevice o, MonadIO m) => Structure -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “properties” property. This is rarely needed directly, but it is used by new.

getDeviceProperties :: (MonadIO m, IsDevice o) => o -> m (Maybe Structure) Source #

Get the value of the “properties” property. When overloading is enabled, this is equivalent to

get device #properties

Signals

removed

type C_DeviceRemovedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type DeviceRemovedCallback = IO () Source #

No description available in the introspection data.

afterDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the removed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after device #removed callback

genClosure_DeviceRemoved :: MonadIO m => DeviceRemovedCallback -> m (GClosure C_DeviceRemovedCallback) Source #

Wrap the callback into a GClosure.

mk_DeviceRemovedCallback :: C_DeviceRemovedCallback -> IO (FunPtr C_DeviceRemovedCallback) Source #

Generate a function pointer callable from C code, from a C_DeviceRemovedCallback.

noDeviceRemovedCallback :: Maybe DeviceRemovedCallback Source #

A convenience synonym for Nothing :: Maybe DeviceRemovedCallback.

onDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the removed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on device #removed callback