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 |
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
- newtype TrackElement = TrackElement (ManagedPtr TrackElement)
- class (GObject o, IsDescendantOf TrackElement o) => IsTrackElement o
- toTrackElement :: (MonadIO m, IsTrackElement o) => o -> m TrackElement
- trackElementAddChildrenProps :: (HasCallStack, MonadIO m, IsTrackElement a, IsElement b) => a -> b -> Maybe [Text] -> Maybe [Text] -> Maybe [Text] -> m ()
- trackElementClampControlSource :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Text -> m ()
- trackElementEdit :: (HasCallStack, MonadIO m, IsTrackElement a, IsLayer b) => a -> [b] -> EditMode -> Edge -> Word64 -> m Bool
- trackElementGetAutoClampControlSources :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Bool
- trackElementGetControlBinding :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Text -> m (Maybe ControlBinding)
- trackElementGetElement :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m (Maybe Element)
- trackElementGetGnlobject :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Element
- trackElementGetNleobject :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Element
- trackElementGetTrack :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m (Maybe Track)
- trackElementGetTrackType :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m [TrackType]
- trackElementHasInternalSource :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Bool
- trackElementIsActive :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Bool
- trackElementIsCore :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> m Bool
- trackElementLookupChild :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Text -> m (Bool, Element, GParamSpec)
- trackElementRemoveControlBinding :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Text -> m Bool
- trackElementSetActive :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Bool -> m Bool
- trackElementSetAutoClampControlSources :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Bool -> m ()
- trackElementSetControlSource :: (HasCallStack, MonadIO m, IsTrackElement a, IsControlSource b) => a -> b -> Text -> Text -> m Bool
- trackElementSetHasInternalSource :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> Bool -> m Bool
- trackElementSetTrackType :: (HasCallStack, MonadIO m, IsTrackElement a) => a -> [TrackType] -> m ()
- constructTrackElementActive :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTrackElementActive :: (MonadIO m, IsTrackElement o) => o -> m Bool
- setTrackElementActive :: (MonadIO m, IsTrackElement o) => o -> Bool -> m ()
- constructTrackElementAutoClampControlSources :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTrackElementAutoClampControlSources :: (MonadIO m, IsTrackElement o) => o -> m Bool
- setTrackElementAutoClampControlSources :: (MonadIO m, IsTrackElement o) => o -> Bool -> m ()
- constructTrackElementHasInternalSource :: (IsTrackElement o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTrackElementHasInternalSource :: (MonadIO m, IsTrackElement o) => o -> m Bool
- setTrackElementHasInternalSource :: (MonadIO m, IsTrackElement o) => o -> Bool -> m ()
- getTrackElementTrack :: (MonadIO m, IsTrackElement o) => o -> m (Maybe Track)
- constructTrackElementTrackType :: (IsTrackElement o, MonadIO m) => [TrackType] -> m (GValueConstruct o)
- getTrackElementTrackType :: (MonadIO m, IsTrackElement o) => o -> m [TrackType]
- setTrackElementTrackType :: (MonadIO m, IsTrackElement o) => o -> [TrackType] -> m ()
- type TrackElementControlBindingAddedCallback = ControlBinding -> IO ()
- afterTrackElementControlBindingAdded :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingAddedCallback) -> m SignalHandlerId
- onTrackElementControlBindingAdded :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingAddedCallback) -> m SignalHandlerId
- type TrackElementControlBindingRemovedCallback = ControlBinding -> IO ()
- afterTrackElementControlBindingRemoved :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingRemovedCallback) -> m SignalHandlerId
- onTrackElementControlBindingRemoved :: (IsTrackElement a, MonadIO m) => a -> ((?self :: a) => TrackElementControlBindingRemovedCallback) -> m SignalHandlerId
Exported types
newtype TrackElement Source #
Memory-managed wrapper type.
TrackElement (ManagedPtr TrackElement) |
Instances
Eq TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement (==) :: TrackElement -> TrackElement -> Bool # (/=) :: TrackElement -> TrackElement -> Bool # | |
GObject TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement | |
ManagedPtrNewtype TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement toManagedPtr :: TrackElement -> ManagedPtr TrackElement | |
TypedObject TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement | |
HasParentTypes TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement | |
IsGValue (Maybe TrackElement) Source # | Convert |
Defined in GI.GES.Objects.TrackElement gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TrackElement -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe TrackElement) | |
type ParentTypes TrackElement Source # | |
Defined in GI.GES.Objects.TrackElement |
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
(GObject o, IsDescendantOf TrackElement o) => IsTrackElement o Source # | |
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
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a, IsElement b) | |
=> a |
|
-> b |
|
-> Maybe [Text] |
|
-> Maybe [Text] |
|
-> Maybe [Text] |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Text |
|
-> 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
:: (HasCallStack, MonadIO m, IsTrackElement a, IsLayer b) | |
=> a |
|
-> [b] |
|
-> EditMode |
|
-> Edge |
|
-> Word64 |
|
-> m Bool | Returns: |
Deprecated: (Since version 1.18)use ges_timeline_element_edit
instead.
Edits the element within its track.
getAutoClampControlSources
trackElementGetAutoClampControlSources Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m Bool | Returns: Whether the control sources for the child properties of
|
Gets TrackElement:autoClampControlSources.
Since: 1.18
getControlBinding
trackElementGetControlBinding Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Text |
|
-> m (Maybe ControlBinding) | Returns: The control binding that was
created for the specified child property of |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m (Maybe Element) | Returns: The |
Get the Element
that the track element's underlying nleobject
controls.
getGnlobject
trackElementGetGnlobject Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m Element | Returns: The nleobject that |
Get the nleobject that this element wraps.
Since: 1.6
getTrack
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m (Maybe Track) | Returns: The track that |
Get the TrackElement:track for the element.
getTrackType
trackElementGetTrackType Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m [TrackType] | Returns: The track-type of |
Gets the TrackElement:trackType for the element.
hasInternalSource
trackElementHasInternalSource Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m Bool | Returns: |
Gets TrackElement:hasInternalSource for the element.
Since: 1.18
isActive
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m Bool | Returns: |
Gets TrackElement:active for the element.
isCore
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Text |
|
-> m (Bool, Element, GParamSpec) | Returns: TRUE if |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: |
Sets TrackElement:active for the element.
setAutoClampControlSources
trackElementSetAutoClampControlSources Source #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets TrackElement:autoClampControlSources. If set to True
, this
will immediately clamp all the control sources.
Since: 1.18
setControlSource
trackElementSetControlSource Source #
:: (HasCallStack, MonadIO m, IsTrackElement a, IsControlSource b) | |
=> a |
|
-> b |
|
-> Text |
|
-> Text |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsTrackElement a) | |
=> a |
|
-> [TrackType] |
|
-> 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 #
= ControlBinding |
|
-> 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 #
= ControlBinding |
|
-> 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