Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gst.Objects.Device
Contents
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.
- newtype Device = Device (ManagedPtr Device)
- class GObject o => IsDevice o
- toDevice :: IsDevice o => o -> IO Device
- noDevice :: Maybe Device
- data DeviceCreateElementMethodInfo
- deviceCreateElement :: (HasCallStack, MonadIO m, IsDevice a) => a -> Maybe Text -> m Element
- data DeviceGetCapsMethodInfo
- deviceGetCaps :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Caps
- data DeviceGetDeviceClassMethodInfo
- deviceGetDeviceClass :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- data DeviceGetDisplayNameMethodInfo
- deviceGetDisplayName :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- data DeviceGetPropertiesMethodInfo
- deviceGetProperties :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Structure
- data DeviceHasClassesMethodInfo
- deviceHasClasses :: (HasCallStack, MonadIO m, IsDevice a) => a -> Text -> m Bool
- data DeviceHasClassesvMethodInfo
- deviceHasClassesv :: (HasCallStack, MonadIO m, IsDevice a) => a -> [Text] -> m Bool
- data DeviceReconfigureElementMethodInfo
- deviceReconfigureElement :: (HasCallStack, MonadIO m, IsDevice a, IsElement b) => a -> b -> m Bool
- data DeviceCapsPropertyInfo
- constructDeviceCaps :: IsDevice o => Caps -> IO (GValueConstruct o)
- deviceCaps :: AttrLabelProxy "caps"
- getDeviceCaps :: (MonadIO m, IsDevice o) => o -> m (Maybe Caps)
- data DeviceDeviceClassPropertyInfo
- constructDeviceDeviceClass :: IsDevice o => Text -> IO (GValueConstruct o)
- deviceDeviceClass :: AttrLabelProxy "deviceClass"
- getDeviceDeviceClass :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- data DeviceDisplayNamePropertyInfo
- constructDeviceDisplayName :: IsDevice o => Text -> IO (GValueConstruct o)
- deviceDisplayName :: AttrLabelProxy "displayName"
- getDeviceDisplayName :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- data DevicePropertiesPropertyInfo
- constructDeviceProperties :: IsDevice o => Structure -> IO (GValueConstruct o)
- deviceProperties :: AttrLabelProxy "properties"
- getDeviceProperties :: (MonadIO m, IsDevice o) => o -> m (Maybe Structure)
- type C_DeviceRemovedCallback = Ptr () -> Ptr () -> IO ()
- type DeviceRemovedCallback = IO ()
- data DeviceRemovedSignalInfo
- afterDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId
- genClosure_DeviceRemoved :: DeviceRemovedCallback -> IO Closure
- mk_DeviceRemovedCallback :: C_DeviceRemovedCallback -> IO (FunPtr C_DeviceRemovedCallback)
- noDeviceRemovedCallback :: Maybe DeviceRemovedCallback
- onDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId
- wrap_DeviceRemovedCallback :: DeviceRemovedCallback -> Ptr () -> Ptr () -> IO ()
Exported types
Constructors
Device (ManagedPtr Device) |
Instances
GObject Device Source # | |
IsObject Device Source # | |
IsObject Device Source # | |
IsDevice Device Source # | |
((~) * info (ResolveDeviceMethod t Device), MethodInfo * info Device p) => IsLabel t (Device -> p) Source # | |
((~) * info (ResolveDeviceMethod t Device), MethodInfo * info Device p) => IsLabelProxy t (Device -> p) Source # | |
HasAttributeList * Device Source # | |
type AttributeList Device Source # | |
type SignalList Device Source # | |
Methods
createElement
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Maybe Text |
|
-> m Element | Returns: a new |
Creates the element with all of the required parameters set to use this device.
Since: 1.4
getCaps
data DeviceGetCapsMethodInfo Source #
Instances
((~) * signature (m Caps), MonadIO m, IsDevice a) => MethodInfo * DeviceGetCapsMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Caps | Returns: The |
Getter for the Caps
that this device supports.
Since: 1.4
getDeviceClass
data DeviceGetDeviceClassMethodInfo Source #
Instances
((~) * signature (m Text), MonadIO m, IsDevice a) => MethodInfo * DeviceGetDeviceClassMethodInfo a signature Source # | |
Arguments
:: (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
data DeviceGetDisplayNameMethodInfo Source #
Instances
((~) * signature (m Text), MonadIO m, IsDevice a) => MethodInfo * DeviceGetDisplayNameMethodInfo a signature Source # | |
Arguments
:: (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
data DeviceGetPropertiesMethodInfo Source #
Instances
((~) * signature (m Structure), MonadIO m, IsDevice a) => MethodInfo * DeviceGetPropertiesMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Structure | Returns: The extra properties or |
Gets the extra properties of a device.
Since: 1.6
hasClasses
data DeviceHasClassesMethodInfo Source #
Instances
((~) * signature (Text -> m Bool), MonadIO m, IsDevice a) => MethodInfo * DeviceHasClassesMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Check if device
matches all of the given classes
Since: 1.4
hasClassesv
data DeviceHasClassesvMethodInfo Source #
Instances
((~) * signature ([Text] -> m Bool), MonadIO m, IsDevice a) => MethodInfo * DeviceHasClassesvMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> [Text] |
|
-> m Bool | Returns: |
Check if factory
matches all of the given classes
Since: 1.4
reconfigureElement
data DeviceReconfigureElementMethodInfo Source #
Instances
((~) * signature (b -> m Bool), MonadIO m, IsDevice a, IsElement b) => MethodInfo * DeviceReconfigureElementMethodInfo a signature Source # | |
deviceReconfigureElement Source #
Arguments
:: (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
data DeviceCapsPropertyInfo Source #
Instances
constructDeviceCaps :: IsDevice o => Caps -> IO (GValueConstruct o) Source #
deviceCaps :: AttrLabelProxy "caps" Source #
deviceClass
data DeviceDeviceClassPropertyInfo Source #
Instances
constructDeviceDeviceClass :: IsDevice o => Text -> IO (GValueConstruct o) Source #
deviceDeviceClass :: AttrLabelProxy "deviceClass" Source #
displayName
data DeviceDisplayNamePropertyInfo Source #
Instances
constructDeviceDisplayName :: IsDevice o => Text -> IO (GValueConstruct o) Source #
deviceDisplayName :: AttrLabelProxy "displayName" Source #
properties
data DevicePropertiesPropertyInfo Source #
Instances
constructDeviceProperties :: IsDevice o => Structure -> IO (GValueConstruct o) Source #
deviceProperties :: AttrLabelProxy "properties" Source #
Signals
removed
type DeviceRemovedCallback = IO () Source #
afterDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId Source #
onDeviceRemoved :: (IsDevice a, MonadIO m) => a -> DeviceRemovedCallback -> m SignalHandlerId Source #
wrap_DeviceRemovedCallback :: DeviceRemovedCallback -> Ptr () -> Ptr () -> IO () Source #