Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype Device = Device (ManagedPtr Device)
- class (GObject o, IsDescendantOf Device o) => IsDevice o
- toDevice :: (MonadIO m, IsDevice o) => o -> m Device
- deviceCreateElement :: (HasCallStack, MonadIO m, IsDevice a) => a -> Maybe Text -> m (Maybe Element)
- deviceGetCaps :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Caps)
- deviceGetDeviceClass :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetDisplayName :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetProperties :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Structure)
- deviceHasClasses :: (HasCallStack, MonadIO m, IsDevice a) => a -> Text -> m Bool
- deviceHasClassesv :: (HasCallStack, MonadIO m, IsDevice a) => a -> [Text] -> m Bool
- deviceReconfigureElement :: (HasCallStack, MonadIO m, IsDevice a, IsElement b) => a -> b -> m Bool
- constructDeviceCaps :: (IsDevice o, MonadIO m) => Caps -> m (GValueConstruct o)
- getDeviceCaps :: (MonadIO m, IsDevice o) => o -> m (Maybe Caps)
- constructDeviceDeviceClass :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o)
- getDeviceDeviceClass :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- constructDeviceDisplayName :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o)
- getDeviceDisplayName :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- constructDeviceProperties :: (IsDevice o, MonadIO m) => Structure -> m (GValueConstruct o)
- getDeviceProperties :: (MonadIO m, IsDevice o) => o -> m (Maybe Structure)
- type DeviceRemovedCallback = IO ()
- afterDeviceRemoved :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceRemovedCallback) -> m SignalHandlerId
- onDeviceRemoved :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceRemovedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Device Source # | |
GObject Device Source # | |
Defined in GI.Gst.Objects.Device | |
ManagedPtrNewtype Device Source # | |
Defined in GI.Gst.Objects.Device toManagedPtr :: Device -> ManagedPtr Device # | |
TypedObject Device Source # | |
Defined in GI.Gst.Objects.Device | |
HasParentTypes Device Source # | |
Defined in GI.Gst.Objects.Device | |
IsGValue (Maybe Device) Source # | Convert |
Defined in GI.Gst.Objects.Device | |
type ParentTypes Device Source # | |
Defined in GI.Gst.Objects.Device |
class (GObject o, IsDescendantOf Device o) => IsDevice o Source #
Instances
(GObject o, IsDescendantOf Device o) => IsDevice o Source # | |
Defined in GI.Gst.Objects.Device |
Methods
Click to display all available methods, including inherited ones
Methods
addControlBinding, bindProperty, bindPropertyFull, createElement, defaultError, forceFloating, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, hasClasses, hasClassesv, isFloating, notify, notifyByPspec, reconfigureElement, ref, refSink, removeControlBinding, runDispose, stealData, stealQdata, suggestNextSync, syncValues, thawNotify, unparent, unref, watchClosure.
Getters
getCaps, getControlBinding, getControlRate, getData, getDeviceClass, getDisplayName, getGValueArray, getName, getParent, getPathString, getProperties, getProperty, getQdata, getValue.
Setters
setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setName, setParent, setProperty.
createElement
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe Element) | Returns: a new |
Creates the element with all of the required parameters set to use this device.
Since: 1.4
getCaps
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Caps) | Returns: The |
Getter for the Caps
that this device supports.
Since: 1.4
getDeviceClass
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: The device class. Free with |
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
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: The device name. Free with |
Gets the user-friendly name of the device.
Since: 1.4
getProperties
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Structure) | Returns: The extra properties or |
Gets the extra properties of a device.
Since: 1.6
hasClasses
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Check if device
matches all of the given classes
Since: 1.4
hasClassesv
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> [Text] |
|
-> m Bool | Returns: |
Check if factory
matches all of the given classes
Since: 1.4
reconfigureElement
deviceReconfigureElement Source #
:: (HasCallStack, MonadIO m, IsDevice a, IsElement b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
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 DeviceRemovedCallback = IO () Source #
No description available in the introspection data.
afterDeviceRemoved :: (IsDevice a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDeviceRemoved :: (IsDevice a, MonadIO m) => a -> ((?self :: 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