gi-ges-1.0.4: libges bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GES.Objects.TrackElement

Description

A TrackElement is a TimelineElement that specifically belongs to a single Track of its TimelineElement:timeline. Its TimelineElement:start and TimelineElement:duration specify its temporal extent in the track. Specifically, a track element wraps some nleobject, such as an nlesource or nleoperation, which can be retrieved with trackElementGetNleobject, and its TimelineElement:start, TimelineElement:duration, TimelineElement:inPoint, TimelineElement:priority and TrackElement:active properties expose the corresponding nleobject properties. When a track element is added to a track, its nleobject is added to the corresponding nlecomposition that the track wraps.

Most users will not have to work directly with track elements since a Clip will automatically create track elements for its timeline's tracks and take responsibility for updating them. The only track elements that are not automatically created by clips, but a user is likely to want to create, are Effect-s.

Control Bindings for Children Properties

You can set up control bindings for a track element child property using trackElementSetControlSource. A GstTimedValueControlSource should specify the timed values using the internal source coordinates (see TimelineElement). By default, these will be updated to lie between the TimelineElement:inPoint and out-point of the element. This can be switched off by setting TrackElement:autoClampControlSources to False.

Synopsis

Exported types

newtype TrackElement Source #

Memory-managed wrapper type.

Constructors

TrackElement (ManagedPtr TrackElement) 

Instances

Instances details
Eq TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

GObject TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

ManagedPtrNewtype TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

Methods

toManagedPtr :: TrackElement -> ManagedPtr TrackElement

TypedObject TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

Methods

glibType :: IO GType

HasParentTypes TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

IsGValue (Maybe TrackElement) Source #

Convert TrackElement to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GES.Objects.TrackElement

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe TrackElement -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe TrackElement)

type ParentTypes TrackElement Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

type ParentTypes TrackElement = '[TimelineElement, Object, Extractable, MetaContainer]

class (GObject o, IsDescendantOf TrackElement o) => IsTrackElement o Source #

Type class for types which can be safely cast to TrackElement, for instance with toTrackElement.

Instances

Instances details
(GObject o, IsDescendantOf TrackElement o) => IsTrackElement o Source # 
Instance details

Defined in GI.GES.Objects.TrackElement

toTrackElement :: (MonadIO m, IsTrackElement o) => o -> m TrackElement Source #

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

Methods

Click to display all available methods, including inherited ones

Expand

Methods

addChildProperty, addChildrenProps, addMetasFromString, bindProperty, bindPropertyFull, checkMetaRegistered, clampControlSource, copy, edit, editFull, forceFloating, foreach, freezeNotify, getv, hasInternalSource, isActive, isCore, isFloating, listChildrenProperties, lookupChild, metasToString, notify, notifyByPspec, paste, ref, refSink, registerMeta, registerMetaBoolean, registerMetaDate, registerMetaDateTime, registerMetaDouble, registerMetaFloat, registerMetaInt, registerMetaInt64, registerMetaString, registerMetaUint, registerMetaUint64, registerStaticMeta, removeChildProperty, removeControlBinding, ripple, rippleEnd, rollEnd, rollStart, runDispose, stealData, stealQdata, thawNotify, trim, unref, watchClosure.

Getters

getAllControlBindings, getAsset, getAutoClampControlSources, getBoolean, getChildProperty, getChildPropertyByPspec, getControlBinding, getData, getDate, getDateTime, getDouble, getDuration, getElement, getFloat, getGnlobject, getId, getInpoint, getInt, getInt64, getLayerPriority, getMarkerList, getMaxDuration, getMeta, getName, getNaturalFramerate, getNleobject, getParent, getPriority, getProperty, getQdata, getStart, getString, getTimeline, getToplevelParent, getTrack, getTrackType, getTrackTypes, getUint, getUint64.

Setters

setActive, setAsset, setAutoClampControlSources, setBoolean, setChildProperty, setChildPropertyByPspec, setChildPropertyFull, setControlSource, setData, setDataFull, setDate, setDateTime, setDouble, setDuration, setFloat, setHasInternalSource, setInpoint, setInt, setInt64, setMarkerList, setMaxDuration, setMeta, setName, setParent, setPriority, setProperty, setStart, setString, setTimeline, setTrackType, setUint, setUint64.

addChildrenProps

trackElementAddChildrenProps Source #

Arguments

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

self: A TrackElement

-> b

element: The child object to retrieve properties from

-> Maybe [Text]

wantedCategories: An array of element factory "klass" categories to whitelist, or Nothing to accept all categories

-> Maybe [Text]

blacklist: A blacklist of element factory names, or Nothing to not blacklist any element factory

-> Maybe [Text]

whitelist: A whitelist of element property names, or Nothing to whitelist all writeable properties

-> m () 

Adds all the properties of a Element that match the criteria as children properties of the track element. If the name of element's ElementFactory is not in blacklist, and the factory's ELEMENT_METADATA_KLASS contains at least one member of wantedCategories (e.g. ELEMENT_FACTORY_KLASS_DECODER), then all the properties of element that are also in whitelist are added as child properties of self using timelineElementAddChildProperty.

This is intended to be used by subclasses when constructing.

clampControlSource

trackElementClampControlSource Source #

Arguments

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

object: A TrackElement

-> Text

propertyName: The name of the child property to clamp the control source of

-> m () 

Clamp the GstTimedValueControlSource for the specified child property to lie between the TimelineElement:inPoint and out-point of the element. The out-point is the GES_TIMELINE_ELEMENT_END of the element translated from the timeline coordinates to the internal source coordinates of the element.

If the property does not have a GstTimedValueControlSource set by trackElementSetControlSource, nothing happens. Otherwise, if a timed value for the control source lies before the in-point of the element, or after its out-point, then it will be removed. At the in-point and out-point times, a new interpolated value will be placed.

Since: 1.18

edit

trackElementEdit Source #

Arguments

:: (HasCallStack, MonadIO m, IsTrackElement a, IsLayer b) 
=> a

object: The TrackElement to edit

-> [b]

layers: A whitelist of layers where the edit can be performed, Nothing allows all layers in the timeline

-> EditMode

mode: The edit mode

-> Edge

edge: The edge of object where the edit should occur

-> Word64

position: The edit position: a new location for the edge of object (in nanoseconds)

-> m Bool

Returns: True if the edit of object completed, False on failure.

Deprecated: (Since version 1.18)use ges_timeline_element_edit instead.

Edits the element within its track.

getAutoClampControlSources

trackElementGetAutoClampControlSources Source #

Arguments

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

object: A TrackElement

-> m Bool

Returns: Whether the control sources for the child properties of object are automatically clamped.

getControlBinding

trackElementGetControlBinding Source #

Arguments

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

object: A TrackElement

-> Text

propertyName: The name of the child property to return the control binding of

-> m (Maybe ControlBinding)

Returns: The control binding that was created for the specified child property of object, or Nothing if propertyName does not correspond to any control binding.

Gets the control binding that was created for the specified child property of the track element using trackElementSetControlSource. The given propertyName must be the same name of the child property that was passed to trackElementSetControlSource.

getElement

trackElementGetElement Source #

Arguments

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

object: A TrackElement

-> m (Maybe Element)

Returns: The Element being controlled by the nleobject that object wraps.

Get the Element that the track element's underlying nleobject controls.

getGnlobject

trackElementGetGnlobject Source #

Arguments

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

object: A TrackElement

-> m Element

Returns: The GNonLin object this object is controlling.

Deprecated: use ges_track_element_get_nleobject instead.

Get the GNonLin object this object is controlling.

getNleobject

trackElementGetNleobject Source #

Arguments

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

object: A TrackElement

-> m Element

Returns: The nleobject that object wraps.

Get the nleobject that this element wraps.

Since: 1.6

getTrack

trackElementGetTrack Source #

Arguments

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

object: A TrackElement

-> m (Maybe Track)

Returns: The track that object belongs to, or Nothing if it does not belong to a track.

Get the TrackElement:track for the element.

getTrackType

trackElementGetTrackType Source #

Arguments

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

object: A TrackElement

-> m [TrackType]

Returns: The track-type of object.

Gets the TrackElement:trackType for the element.

hasInternalSource

trackElementHasInternalSource Source #

Arguments

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

object: A TrackElement

-> m Bool

Returns: True if object can have its 'internal time' properties set.

Gets TrackElement:hasInternalSource for the element.

Since: 1.18

isActive

trackElementIsActive Source #

Arguments

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

object: A TrackElement

-> m Bool

Returns: True if object is active in its track.

Gets TrackElement:active for the element.

isCore

trackElementIsCore Source #

Arguments

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

object: A TrackElement

-> m Bool

Returns: True if element is a core track element.

Get whether the given track element is a core track element. That is, it was created by the createTrackElements ClipClass method for some Clip.

Note that such a track element can only be added to a clip that shares the same Asset as the clip that created it. For example, you are allowed to move core children between clips that resulted from containerUngroup, but you could not move the core child from a UriClip to a TitleClip or another UriClip with a different UriClip:uri.

Moreover, if a core track element is added to a clip, it will always be added as a core child. Therefore, if this returns True, then element will be a core child of its parent clip.

Since: 1.18

lookupChild

trackElementLookupChild Source #

Arguments

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

object: Object to lookup the property in

-> Text

propName: Name of the property to look up. You can specify the name of the class as such: "ClassNamepropertyName", to guarantee that you get the proper GParamSpec in case various GstElement-s contain the same property name. If you don't do so, you will get the first element found, having this property and the and the corresponding GParamSpec.

-> m (Bool, Element, GParamSpec)

Returns: TRUE if element and pspec could be found. FALSE otherwise. In that case the values for pspec and element are not modified. Unref element after usage.

Deprecated: Use ges_timeline_element_lookup_child

Looks up which element and pspec would be effected by the given name. If various contained elements have this property name you will get the first one, unless you specify the class name in name.

removeControlBinding

trackElementRemoveControlBinding Source #

Arguments

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

object: A TrackElement

-> Text

propertyName: The name of the child property to remove the control binding from

-> m Bool

Returns: True if the control binding was removed from the specified child property of object, or False if an error occurred.

Removes the ControlBinding that was created for the specified child property of the track element using trackElementSetControlSource. The given propertyName must be the same name of the child property that was passed to trackElementSetControlSource.

setActive

trackElementSetActive Source #

Arguments

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

object: A TrackElement

-> Bool

active: Whether object should be active in its track

-> m Bool

Returns: True if the property was *toggled*.

Sets TrackElement:active for the element.

setAutoClampControlSources

trackElementSetAutoClampControlSources Source #

Arguments

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

object: A TrackElement

-> Bool

autoClamp: Whether to automatically clamp the control sources for the child properties of object

-> m () 

Sets TrackElement:autoClampControlSources. If set to True, this will immediately clamp all the control sources.

Since: 1.18

setControlSource

trackElementSetControlSource Source #

Arguments

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

object: A TrackElement

-> b

source: The control source to bind the child property to

-> Text

propertyName: The name of the child property to control

-> Text

bindingType: The type of binding to create ("direct" or "direct-absolute")

-> m Bool

Returns: True if the specified child property could be bound to source, or False if an error occurred.

Creates a ControlBinding for the specified child property of the track element using the given control source. The given propertyName should refer to an existing child property of the track element, as used in timelineElementLookupChild.

If bindingType is "direct", then the control binding is created with gst_direct_control_binding_new() using the given control source. If bindingType is "direct-absolute", it is created with gst_direct_control_binding_new_absolute() instead.

setHasInternalSource

trackElementSetHasInternalSource Source #

Arguments

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

object: A TrackElement

-> Bool

hasInternalSource: Whether the object should be allowed to have its 'internal time' properties set.

-> m Bool

Returns: False if hasInternalSource is forbidden for object and True in any other case.

Sets TrackElement:hasInternalSource for the element. If this is set to False, this method will also set the TimelineElement:inPoint of the element to 0 and its TimelineElement:maxDuration to CLOCK_TIME_NONE.

Since: 1.18

setTrackType

trackElementSetTrackType Source #

Arguments

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

object: A TrackElement

-> [TrackType]

type: The new track-type for object

-> m () 

Sets the TrackElement:trackType for the element.

Properties

active

Whether the effect of the element should be applied in its TrackElement:track. If set to False, it will not be used in the output of the track.

constructTrackElementActive :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTrackElementActive :: (MonadIO m, IsTrackElement o) => o -> m Bool Source #

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

get trackElement #active

setTrackElementActive :: (MonadIO m, IsTrackElement o) => o -> Bool -> m () Source #

Set the value of the “active” property. When overloading is enabled, this is equivalent to

set trackElement [ #active := value ]

autoClampControlSources

Whether the control sources on the element (see trackElementSetControlSource) will be automatically updated whenever the TimelineElement:inPoint or out-point of the element change in value.

See trackElementClampControlSource for how this is done per control source.

Default value: True

Since: 1.18

constructTrackElementAutoClampControlSources :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTrackElementAutoClampControlSources :: (MonadIO m, IsTrackElement o) => o -> m Bool Source #

Get the value of the “auto-clamp-control-sources” property. When overloading is enabled, this is equivalent to

get trackElement #autoClampControlSources

setTrackElementAutoClampControlSources :: (MonadIO m, IsTrackElement o) => o -> Bool -> m () Source #

Set the value of the “auto-clamp-control-sources” property. When overloading is enabled, this is equivalent to

set trackElement [ #autoClampControlSources := value ]

hasInternalSource

This property is used to determine whether the 'internal time' properties of the element have any meaning. In particular, unless this is set to True, the TimelineElement:inPoint and TimelineElement:maxDuration can not be set to any value other than the default 0 and CLOCK_TIME_NONE, respectively.

If an element has some *internal* *timed* source Element that it reads stream data from as part of its function in a Track, then you'll likely want to set this to True to allow the TimelineElement:inPoint and TimelineElement:maxDuration to be set.

The default value is determined by the TrackElementClass defaultHasInternalSource class property. For most SourceClass-es, this will be True, with the exception of those that have a potentially *static* source, such as ImageSourceClass and TitleSourceClass. Otherwise, this will usually be False.

For most Operation-s you will likely want to leave this set to False. The exception may be for an operation that reads some stream data from some private internal source as part of manipulating the input data from the usual linked upstream TrackElement.

For example, you may want to set this to True for a GES_TRACK_TYPE_VIDEO operation that wraps a textoverlay that reads from a subtitle file and places its text on top of the received video data. The TimelineElement:inPoint of the element would be used to shift the initial seek time on the textoverlay away from 0, and the TimelineElement:maxDuration could be set to reflect the time at which the subtitle file runs out of data.

Note that GES can not support track elements that have both internal content and manipulate the timing of their data streams (time effects).

Since: 1.18

constructTrackElementHasInternalSource :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTrackElementHasInternalSource :: (MonadIO m, IsTrackElement o) => o -> m Bool Source #

Get the value of the “has-internal-source” property. When overloading is enabled, this is equivalent to

get trackElement #hasInternalSource

setTrackElementHasInternalSource :: (MonadIO m, IsTrackElement o) => o -> Bool -> m () Source #

Set the value of the “has-internal-source” property. When overloading is enabled, this is equivalent to

set trackElement [ #hasInternalSource := value ]

track

The track that this element belongs to, or Nothing if it does not belong to a track.

getTrackElementTrack :: (MonadIO m, IsTrackElement o) => o -> m (Maybe Track) Source #

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

get trackElement #track

trackType

The track type of the element, which determines the type of track the element can be added to (see Track:trackType). This should correspond to the type of data that the element can produce or process.

constructTrackElementTrackType :: (IsTrackElement o, MonadIO m) => [TrackType] -> m (GValueConstruct o) Source #

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

getTrackElementTrackType :: (MonadIO m, IsTrackElement o) => o -> m [TrackType] Source #

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

get trackElement #trackType

setTrackElementTrackType :: (MonadIO m, IsTrackElement o) => o -> [TrackType] -> m () Source #

Set the value of the “track-type” property. When overloading is enabled, this is equivalent to

set trackElement [ #trackType := value ]

Signals

controlBindingAdded

type TrackElementControlBindingAddedCallback Source #

Arguments

 = ControlBinding

controlBinding: The control binding that has been added

-> IO () 

This is emitted when a control binding is added to a child property of the track element.

afterTrackElementControlBindingAdded :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingAddedCallback) -> m SignalHandlerId Source #

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

after trackElement #controlBindingAdded 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.

onTrackElementControlBindingAdded :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingAddedCallback) -> m SignalHandlerId Source #

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

on trackElement #controlBindingAdded callback

controlBindingRemoved

type TrackElementControlBindingRemovedCallback Source #

Arguments

 = ControlBinding

controlBinding: The control binding that has been removed

-> IO () 

This is emitted when a control binding is removed from a child property of the track element.

afterTrackElementControlBindingRemoved :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingRemovedCallback) -> m SignalHandlerId Source #

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

after trackElement #controlBindingRemoved 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.

onTrackElementControlBindingRemoved :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingRemovedCallback) -> m SignalHandlerId Source #

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

on trackElement #controlBindingRemoved callback