| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gst.Objects.ControlSource
Description
The ControlSource is a base class for control value sources that could
be used to get timestamp-value pairs. A control source essentially is a
function over time.
A ControlSource is used by first getting an instance of a specific
control-source, creating a binding for the control-source to the target property
of the element and then adding the binding to the element. The binding will
convert the data types and value range to fit to the bound property.
For implementing a new ControlSource one has to implement
ControlSourceGetValue and ControlSourceGetValueArray functions.
These are then used by controlSourceControlSourceGetValue and
controlSourceControlSourceGetValueArray to get values for specific timestamps.
Synopsis
- newtype ControlSource = ControlSource (ManagedPtr ControlSource)
- class (GObject o, IsDescendantOf ControlSource o) => IsControlSource o
- toControlSource :: (MonadIO m, IsControlSource o) => o -> m ControlSource
- noControlSource :: Maybe ControlSource
- controlSourceControlSourceGetValue :: (HasCallStack, MonadIO m, IsControlSource a) => a -> Word64 -> m (Bool, Double)
- controlSourceControlSourceGetValueArray :: (HasCallStack, MonadIO m, IsControlSource a) => a -> Word64 -> Word64 -> [Double] -> m Bool
Exported types
newtype ControlSource Source #
Memory-managed wrapper type.
Constructors
| ControlSource (ManagedPtr ControlSource) |
Instances
| GObject ControlSource Source # | |
Defined in GI.Gst.Objects.ControlSource Methods gobjectType :: IO GType # | |
| HasParentTypes ControlSource Source # | |
Defined in GI.Gst.Objects.ControlSource | |
| type ParentTypes ControlSource Source # | |
Defined in GI.Gst.Objects.ControlSource | |
class (GObject o, IsDescendantOf ControlSource o) => IsControlSource o Source #
Type class for types which can be safely cast to ControlSource, for instance with toControlSource.
Instances
| (GObject o, IsDescendantOf ControlSource o) => IsControlSource o Source # | |
Defined in GI.Gst.Objects.ControlSource | |
toControlSource :: (MonadIO m, IsControlSource o) => o -> m ControlSource Source #
Cast to ControlSource, for types for which this is known to be safe. For general casts, use castTo.
noControlSource :: Maybe ControlSource Source #
A convenience alias for Nothing :: Maybe ControlSource.
Methods
controlSourceGetValue
controlSourceControlSourceGetValue Source #
Arguments
| :: (HasCallStack, MonadIO m, IsControlSource a) | |
| => a |
|
| -> Word64 |
|
| -> m (Bool, Double) | Returns: |
Gets the value for this ControlSource at a given timestamp.
controlSourceGetValueArray
controlSourceControlSourceGetValueArray Source #
Arguments
| :: (HasCallStack, MonadIO m, IsControlSource a) | |
| => a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> [Double] |
|
| -> m Bool | Returns: |
Gets an array of values for for this ControlSource. Values that are
undefined contain NANs.