gi-gst-1.0.22: 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.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

Exported types

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

Instances details
(GObject o, IsDescendantOf ControlSource o) => IsControlSource o Source # 
Instance details

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.

Methods

Overloaded methods

controlSourceGetValue

controlSourceControlSourceGetValue Source #

Arguments

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

self: the ControlSource object

-> Word64

timestamp: the time for which the value should be returned

-> m (Bool, Double)

Returns: False if the value couldn't be returned, True otherwise.

Gets the value for this ControlSource at a given timestamp.

controlSourceGetValueArray

controlSourceControlSourceGetValueArray Source #

Arguments

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

self: the ControlSource object

-> Word64

timestamp: the first timestamp

-> Word64

interval: the time steps

-> [Double]

values: array to put control-values in

-> m Bool

Returns: True if the given array could be filled, False otherwise

Gets an array of values for for this ControlSource. Values that are undefined contain NANs.