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.Timeline

Description

Timeline is the central object for any multimedia timeline.

A timeline is composed of a set of Track-s and a set of Layer-s, which are added to the timeline using timelineAddTrack and timelineAppendLayer, respectively.

The contained tracks define the supported types of the timeline and provide the media output. Essentially, each track provides an additional source Pad.

Most usage of a timeline will likely only need a single AudioTrack and/or a single VideoTrack. You can create such a timeline with timelineNewAudioVideo. After this, you are unlikely to need to work with the tracks directly.

A timeline's layers contain Clip-s, which in turn control the creation of TrackElement-s, which are added to the timeline's tracks. See Timeline::selectTracksForObject if you wish to have more control over which track a clip's elements are added to.

The layers are ordered, with higher priority layers having their content prioritised in the tracks. This ordering can be changed using timelineMoveLayer.

Editing

See TimelineElement for the various ways the elements of a timeline can be edited.

If you change the timing or ordering of a timeline's TimelineElement-s, then these changes will not actually be taken into account in the output of the timeline's tracks until the timelineCommit method is called. This allows you to move its elements around, say, in response to an end user's mouse dragging, with little expense before finalising their effect on the produced data.

Overlaps and Auto-Transitions

There are certain restrictions placed on how Source-s may overlap in a Track that belongs to a timeline. These will be enforced by GES, so the user will not need to keep track of them, but they should be aware that certain edits will be refused as a result if the overlap rules would be broken.

Consider two Source-s, A and B, with start times startA and startB, and end times endA and endB, respectively. The start time refers to their TimelineElement:start, and the end time is their TimelineElement:start + TimelineElement:duration. These two sources *overlap* if:

+ they share the same TrackElement:track (non Nothing), which belongs to the timeline; + they share the same GES_TIMELINE_ELEMENT_LAYER_PRIORITY; and + startA < endB and startB < endA .

Note that when startA = endB or startB = endA then the two sources will *touch* at their edges, but are not considered overlapping.

If, in addition, startA < startB < endA, then we can say that the end of A overlaps the start of B.

If, instead, startA <= startB and endA >= endB, then we can say that A fully overlaps B.

The overlap rules for a timeline are that:

  1. One source cannot fully overlap another source.
  2. A source can only overlap the end of up to one other source at its start.
  3. A source can only overlap the start of up to one other source at its end.

The last two rules combined essentially mean that at any given timeline position, only up to two Source-s may overlap at that position. So triple or more overlaps are not allowed.

If you switch on Timeline:autoTransition, then at any moment when the end of one source (the first source) overlaps the start of another (the second source), a TransitionClip will be automatically created for the pair in the same layer and it will cover their overlap. If the two elements are edited in a way such that the end of the first source no longer overlaps the start of the second, the transition will be automatically removed from the timeline. However, if the two sources still overlap at the same edges after the edit, then the same transition object will be kept, but with its timing and layer adjusted accordingly.

NOTE: if you know what you are doing and want to be in full control of the timeline layout, you can disable the edit APIs with ges_timeline_disable_edit_apis.

Saving

To save/load a timeline, you can use the timelineLoadFromUri and timelineSaveToUri methods that use the default format.

Playing

A timeline is a Bin with a source Pad for each of its tracks, which you can fetch with timelineGetPadForTrack. You will likely want to link these to some compatible sink Element-s to be able to play or capture the content of the timeline.

You can use a Pipeline to easily preview/play the timeline's content, or render it to a file.

Synopsis

Exported types

newtype Timeline Source #

Memory-managed wrapper type.

Constructors

Timeline (ManagedPtr Timeline) 

Instances

Instances details
Eq Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

GObject Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

ManagedPtrNewtype Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

Methods

toManagedPtr :: Timeline -> ManagedPtr Timeline

TypedObject Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

Methods

glibType :: IO GType

HasParentTypes Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

IsGValue (Maybe Timeline) Source #

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

Instance details

Defined in GI.GES.Objects.Timeline

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Timeline Source # 
Instance details

Defined in GI.GES.Objects.Timeline

type ParentTypes Timeline = '[Bin, Element, Object, Object, Extractable, MetaContainer, ChildProxy]

class (GObject o, IsDescendantOf Timeline o) => IsTimeline o Source #

Type class for types which can be safely cast to Timeline, for instance with toTimeline.

Instances

Instances details
(GObject o, IsDescendantOf Timeline o) => IsTimeline o Source # 
Instance details

Defined in GI.GES.Objects.Timeline

toTimeline :: (MonadIO m, IsTimeline o) => o -> m Timeline Source #

Cast to Timeline, 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

abortState, add, addControlBinding, addLayer, addMetasFromString, addPad, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, addTrack, appendLayer, bindProperty, bindPropertyFull, callAsync, changeState, checkMetaRegistered, childAdded, childRemoved, commit, commitSync, continueState, createAllPads, defaultError, disableEditApis, findUnlinkedPad, forceFloating, foreach, foreachPad, foreachSinkPad, foreachSrcPad, freezeCommit, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isEmpty, isFloating, isLockedState, iterateAllByElementFactoryName, iterateAllByInterface, iterateElements, iteratePads, iterateRecurse, iterateSinkPads, iterateSinks, iterateSorted, iterateSources, iterateSrcPads, link, linkFiltered, linkPads, linkPadsFiltered, linkPadsFull, loadFromUri, lookup, lostState, messageFull, messageFullWithDetails, metasToString, moveLayer, noMorePads, notify, notifyByPspec, pasteElement, postMessage, provideClock, query, queryConvert, queryDuration, queryPosition, recalculateLatency, ref, refSink, registerMeta, registerMetaBoolean, registerMetaDate, registerMetaDateTime, registerMetaDouble, registerMetaFloat, registerMetaInt, registerMetaInt64, registerMetaString, registerMetaUint, registerMetaUint64, registerStaticMeta, releaseRequestPad, remove, removeControlBinding, removeLayer, removePad, removePropertyNotifyWatch, removeTrack, requestPad, requestPadSimple, runDispose, saveToUri, seek, seekSimple, sendEvent, stealData, stealQdata, suggestNextSync, syncChildrenStates, syncStateWithParent, syncValues, thawCommit, thawNotify, unlink, unlinkPads, unparent, unref, watchClosure.

Getters

getAsset, getAutoTransition, getBaseTime, getBoolean, getBus, getByInterface, getByName, getByNameRecurseUp, getChildByIndex, getChildByName, getChildByNameRecurse, getChildrenCount, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContextUnlocked, getContexts, getControlBinding, getControlRate, getCurrentClockTime, getCurrentRunningTime, getData, getDate, getDateTime, getDouble, getDuration, getEditApisDisabled, getElement, getFactory, getFloat, getFrameAt, getFrameTime, getGValueArray, getGroups, getId, getInt, getInt64, getLayer, getLayers, getMarkerList, getMeta, getMetadata, getName, getPadForTrack, getPadTemplate, getPadTemplateList, getParent, getPathString, getProperty, getQdata, getRequestPad, getSnappingDistance, getStartTime, getState, getStaticPad, getString, getSuppressedFlags, getTrackForPad, getTracks, getUint, getUint64, getValue.

Setters

setAsset, setAutoTransition, setBaseTime, setBoolean, setBus, setClock, setContext, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setDate, setDateTime, setDouble, setFloat, setInt, setInt64, setLockedState, setMarkerList, setMeta, setName, setParent, setProperty, setSnappingDistance, setStartTime, setState, setString, setSuppressedFlags, setUint, setUint64.

addLayer

timelineAddLayer Source #

Arguments

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

timeline: The Timeline

-> b

layer: The layer to add

-> m Bool

Returns: True if layer was properly added.

Deprecated: (Since version 1.18)This method requires you to ensure the layer'sLayer:priority will be unique to the timeline. UsetimelineAppendLayer and timelineMoveLayer instead.

Add a layer to the timeline.

If the layer contains Clip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using Timeline::selectTracksForObject. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return True. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, layerAddClip is able to fail if adding the clip would cause such an error.

addTrack

timelineAddTrack Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsTrack b) 
=> a

timeline: The Timeline

-> b

track: The track to add

-> m Bool

Returns: True if track was properly added.

Add a track to the timeline.

If the timeline already contains clips, then this may trigger the creation of their core track element children for the track, and the placement of the clip's children in the track of the timeline using Timeline::selectTracksForObject. Some errors may occur if this would break one of the configuration rules for the timeline in the track. In such cases, some track elements would fail to be added to the track, but this method would still return True. As such, it is advised that you avoid adding tracks to timelines that already contain clips.

appendLayer

timelineAppendLayer Source #

Arguments

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

timeline: The Timeline

-> m Layer

Returns: The newly created layer.

Append a newly created layer to the timeline. The layer will be added at the lowest Layer:priority (numerically, the highest).

commit

timelineCommit Source #

Arguments

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

timeline: A Timeline

-> m Bool

Returns: True if pending changes were committed, or False if nothing needed to be committed.

Commit all the pending changes of the clips contained in the timeline.

When changes happen in a timeline, they are not immediately executed internally, in a way that effects the output data of the timeline. You should call this method when you are done with a set of changes and you want them to be executed.

Any pending changes will be executed in the backend. The Timeline::commited signal will be emitted once this has completed. You should not try to change the state of the timeline, seek it or add tracks to it before receiving this signal. You can use timelineCommitSync if you do not want to perform other tasks in the mean time.

Note that all the pending changes will automatically be executed when the timeline goes from GST_STATE_READY to GST_STATE_PAUSED, which is usually triggered by a corresponding state changes in a containing Pipeline.

commitSync

timelineCommitSync Source #

Arguments

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

timeline: A Timeline

-> m Bool

Returns: True if pending changes were committed, or False if nothing needed to be committed.

Commit all the pending changes of the clips contained in the timeline and wait for the changes to complete.

See timelineCommit.

disableEditApis

timelineDisableEditApis Source #

Arguments

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

self: A Timeline

-> Bool

disableEditApis: True to disable all the edit APIs so the user is in full control of ensuring timeline state validity False otherwise.

-> m () 

WARNING: When using that mode, GES won't guarantee the coherence of the timeline. You need to ensure that the rules described in the <http://developer.gnome.org/ges/stable/#overlaps-and-autotransitions Overlaps and auto transitions> section are respected any time the timeline is commited (otherwise playback will most probably fail in different ways).

When disabling editing APIs, GES won't be able to enforce the rules that makes the timeline overall state to be valid but some feature won't be usable: * Timeline:snappingDistance * Timeline:autoTransition

Since: 1.22

freezeCommit

timelineFreezeCommit Source #

Arguments

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

timeline: The Timeline

-> m () 

Freezes the timeline from being committed. This is usually needed while the timeline is being rendered to ensure that not change to the timeline are taken into account during that moment. Once the rendering is done, you should call ges_timeline_thaw_commit so that committing becomes possible again and any call to commit() that happened during the rendering is actually taken into account.

Since: 1.20

getAutoTransition

timelineGetAutoTransition Source #

Arguments

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

timeline: The Timeline

-> m Bool

Returns: The auto-transition of self.

Gets Timeline:autoTransition for the timeline.

getDuration

timelineGetDuration Source #

Arguments

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

timeline: The Timeline

-> m Word64

Returns: The current duration of timeline.

Get the current Timeline:duration of the timeline

getEditApisDisabled

timelineGetEditApisDisabled Source #

Arguments

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

self: A Timeline

-> m Bool

Returns: True if edit APIs are disabled, False otherwise.

No description available in the introspection data.

Since: 1.22

getElement

timelineGetElement Source #

Arguments

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

timeline: The Timeline

-> Text

name: The name of the element to find

-> m (Maybe TimelineElement)

Returns: The timeline element in timeline with the given name, or Nothing if it was not found.

Gets the element contained in the timeline with the given name.

getFrameAt

timelineGetFrameAt Source #

Arguments

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

self: A Timeline

-> Word64

timestamp: The timestamp to get the corresponding frame number of

-> m Int64

Returns: The frame number timestamp corresponds to.

This method allows you to convert a timeline GstClockTime into its corresponding GESFrameNumber in the timeline's output.

Since: 1.18

getFrameTime

timelineGetFrameTime Source #

Arguments

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

self: The self on which to retrieve the timestamp for frameNumber

-> Int64

frameNumber: The frame number to get the corresponding timestamp of in the timeline coordinates

-> m Word64

Returns: The timestamp corresponding to frameNumber in the output of self.

This method allows you to convert a timeline output frame number into a timeline GstClockTime. For example, this time could be used to seek to a particular frame in the timeline's output, or as the edit position for an element within the timeline.

Since: 1.18

getGroups

timelineGetGroups Source #

Arguments

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

timeline: The Timeline

-> m [Group]

Returns: The list of groups that contain clips present in timeline's layers. Must not be changed.

Get the list of Group-s present in the timeline.

getLayer

timelineGetLayer Source #

Arguments

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

timeline: The Timeline to retrieve a layer from

-> Word32

priority: The priority/index of the layer to find

-> m (Maybe Layer)

Returns: The layer with the given priority, or Nothing if none was found.

Since 1.6

Retrieve the layer whose index in the timeline matches the given priority.

getLayers

timelineGetLayers Source #

Arguments

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

timeline: The Timeline

-> m [Layer]

Returns: The list of layers present in timeline sorted by priority.

Get the list of Layer-s present in the timeline.

getPadForTrack

timelineGetPadForTrack Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsTrack b) 
=> a

timeline: The Timeline

-> b

track: A track

-> m (Maybe Pad)

Returns: The pad corresponding to track, or Nothing if there is an error.

Search for the Pad corresponding to the given timeline's track. You can link to this pad to receive the output data of the given track.

getSnappingDistance

timelineGetSnappingDistance Source #

Arguments

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

timeline: The Timeline

-> m Word64

Returns: The snapping distance (in nanoseconds) of timeline.

Gets the Timeline:snappingDistance for the timeline.

getTrackForPad

timelineGetTrackForPad Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsPad b) 
=> a

timeline: The Timeline

-> b

pad: A pad

-> m (Maybe Track)

Returns: The track corresponding to pad, or Nothing if there is an error.

Search for the Track corresponding to the given timeline's pad.

getTracks

timelineGetTracks Source #

Arguments

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

timeline: The Timeline

-> m [Track]

Returns: The list of tracks used by timeline.

Get the list of Track-s used by the timeline.

isEmpty

timelineIsEmpty Source #

Arguments

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

timeline: The Timeline

-> m Bool

Returns: True if timeline is empty.

Check whether the timeline is empty or not.

loadFromUri

timelineLoadFromUri Source #

Arguments

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

timeline: An empty Timeline into which to load the formatter

-> Text

uri: The URI to load from

-> m ()

(Can throw GError)

Loads the contents of URI into the timeline.

moveLayer

timelineMoveLayer Source #

Arguments

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

timeline: A Timeline

-> b

layer: A layer within timeline, whose priority should be changed

-> Word32

newLayerPriority: The new index for layer

-> m Bool 

Moves a layer within the timeline to the index given by newLayerPriority. An index of 0 corresponds to the layer with the highest priority in a timeline. If newLayerPriority is greater than the number of layers present in the timeline, it will become the lowest priority layer.

Since: 1.16

new

timelineNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Timeline

Returns: The new timeline.

Creates a new empty timeline.

newAudioVideo

timelineNewAudioVideo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Timeline

Returns: The new timeline.

Creates a new timeline containing a single AudioTrack and a single VideoTrack.

newFromUri

timelineNewFromUri Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

uri: The URI to load from

-> m Timeline

Returns: A new timeline if the uri was loaded successfully, or Nothing if the uri could not be loaded. (Can throw GError)

Creates a timeline from the given URI.

pasteElement

timelinePasteElement Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsTimelineElement b) 
=> a

timeline: The Timeline onto which element should be pasted

-> b

element: The element to paste

-> Word64

position: The position in the timeline element should be pasted to, i.e. the TimelineElement:start value for the pasted element.

-> Int32

layerPriority: The layer into which the element should be pasted. -1 means paste to the same layer from which element has been copied from

-> m (Maybe TimelineElement)

Returns: The newly created element, or Nothing if pasting fails.

Paste an element inside the timeline. element **must** be the return of timelineElementCopy with deep=TRUE, and it should not be changed before pasting. element itself is not placed in the timeline, instead a new element is created, alike to the originally copied element. Note that the originally copied element must also lie within timeline, at both the point of copying and pasting.

Pasting may fail if it would place the timeline in an unsupported configuration.

After calling this function element should not be used. In particular, element can **not** be pasted again. Instead, you can copy the returned element and paste that copy (although, this is only possible if the paste was successful).

See also timelineElementPaste.

removeLayer

timelineRemoveLayer Source #

Arguments

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

timeline: The Timeline

-> b

layer: The layer to remove

-> m Bool

Returns: True if layer was properly removed.

Removes a layer from the timeline.

removeTrack

timelineRemoveTrack Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsTrack b) 
=> a

timeline: The Timeline

-> b

track: The track to remove

-> m Bool

Returns: True if track was properly removed.

Remove a track from the timeline.

saveToUri

timelineSaveToUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a, IsAsset b) 
=> a

timeline: The Timeline

-> Text

uri: The location to save to

-> Maybe b

formatterAsset: The formatter asset to use, or Nothing

-> Bool

overwrite: True to overwrite file if it exists

-> m ()

(Can throw GError)

Saves the timeline to the given location. If formatterAsset is Nothing, the method will attempt to save in the same format the timeline was loaded from, before defaulting to the formatter with highest rank.

setAutoTransition

timelineSetAutoTransition Source #

Arguments

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

timeline: The Timeline

-> Bool

autoTransition: Whether transitions should be automatically added to timeline's layers

-> m () 

Sets Timeline:autoTransition for the timeline. This will also set the corresponding Layer:autoTransition for all of the timeline's layers to the same value. See layerSetAutoTransition if you wish to set the layer's Layer:autoTransition individually.

setSnappingDistance

timelineSetSnappingDistance Source #

Arguments

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

timeline: The Timeline

-> Word64

snappingDistance: The snapping distance to use (in nanoseconds)

-> m () 

Sets Timeline:snappingDistance for the timeline. This new value will only effect future snappings and will not be used to snap the current element positions within the timeline.

thawCommit

timelineThawCommit Source #

Arguments

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

timeline: The Timeline

-> m () 

Thaw the timeline so that comiting becomes possible again and any call to commit() that happened during the rendering is actually taken into account.

Since: 1.20

Properties

autoTransition

Whether to automatically create a transition whenever two Source-s overlap in a track of the timeline. See Layer:autoTransition if you want this to only happen in some layers.

constructTimelineAutoTransition :: (IsTimeline o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTimelineAutoTransition :: (MonadIO m, IsTimeline o) => o -> m Bool Source #

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

get timeline #autoTransition

setTimelineAutoTransition :: (MonadIO m, IsTimeline o) => o -> Bool -> m () Source #

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

set timeline [ #autoTransition := value ]

duration

The current duration (in nanoseconds) of the timeline. A timeline 'starts' at time 0, so this is the maximum end time of all of its TimelineElement-s.

getTimelineDuration :: (MonadIO m, IsTimeline o) => o -> m Word64 Source #

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

get timeline #duration

snappingDistance

The distance (in nanoseconds) at which a TimelineElement being moved within the timeline should snap one of its Source-s with another Source-s edge. See EditMode for which edges can snap during an edit. 0 means no snapping.

constructTimelineSnappingDistance :: (IsTimeline o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #

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

getTimelineSnappingDistance :: (MonadIO m, IsTimeline o) => o -> m Word64 Source #

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

get timeline #snappingDistance

setTimelineSnappingDistance :: (MonadIO m, IsTimeline o) => o -> Word64 -> m () Source #

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

set timeline [ #snappingDistance := value ]

Signals

commited

type TimelineCommitedCallback = IO () Source #

This signal will be emitted once the changes initiated by timelineCommit have been executed in the backend. Use timelineCommitSync if you do not want to have to connect to this signal.

afterTimelineCommited :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineCommitedCallback) -> m SignalHandlerId Source #

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

after timeline #commited 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.

onTimelineCommited :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineCommitedCallback) -> m SignalHandlerId Source #

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

on timeline #commited callback

groupAdded

type TimelineGroupAddedCallback Source #

Arguments

 = Group

group: The group that was added to timeline

-> IO () 

Will be emitted after the group is added to to the timeline. This can happen when grouping with ges_container_group, or by adding containers to a newly created group.

Note that this should not be emitted whilst a timeline is being loaded from its Project asset. You should connect to the project's Project::loaded signal if you want to know which groups were created for the timeline.

afterTimelineGroupAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineGroupAddedCallback) -> m SignalHandlerId Source #

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

after timeline #groupAdded 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.

onTimelineGroupAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineGroupAddedCallback) -> m SignalHandlerId Source #

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

on timeline #groupAdded callback

groupRemoved

type TimelineGroupRemovedCallback Source #

Arguments

 = Group

group: The group that was removed from timeline

-> [Container]

children: A list of Container-s that _were_ the children of the removed group

-> IO () 

Will be emitted after the group is removed from the timeline through ges_container_ungroup. Note that group will no longer contain its former children, these are held in children.

Note that if a group is emptied, then it will no longer belong to the timeline, but this signal will **not** be emitted in such a case.

afterTimelineGroupRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineGroupRemovedCallback) -> m SignalHandlerId Source #

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

after timeline #groupRemoved 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.

onTimelineGroupRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineGroupRemovedCallback) -> m SignalHandlerId Source #

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

on timeline #groupRemoved callback

layerAdded

type TimelineLayerAddedCallback Source #

Arguments

 = Layer

layer: The layer that was added to timeline

-> IO () 

Will be emitted after the layer is added to the timeline.

Note that this should not be emitted whilst a timeline is being loaded from its Project asset. You should connect to the project's Project::loaded signal if you want to know which layers were created for the timeline.

afterTimelineLayerAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineLayerAddedCallback) -> m SignalHandlerId Source #

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

after timeline #layerAdded 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.

onTimelineLayerAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineLayerAddedCallback) -> m SignalHandlerId Source #

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

on timeline #layerAdded callback

layerRemoved

type TimelineLayerRemovedCallback Source #

Arguments

 = Layer

layer: The layer that was removed from timeline

-> IO () 

Will be emitted after the layer is removed from the timeline.

afterTimelineLayerRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineLayerRemovedCallback) -> m SignalHandlerId Source #

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

after timeline #layerRemoved 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.

onTimelineLayerRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineLayerRemovedCallback) -> m SignalHandlerId Source #

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

on timeline #layerRemoved callback

selectElementTrack

type TimelineSelectElementTrackCallback Source #

Arguments

 = Clip

clip: The clip that trackElement is being added to

-> TrackElement

trackElement: The element being added

-> IO (Maybe Track)

Returns: A track to put trackElement into, or Nothing if it should be discarded.

Simplified version of Timeline::selectTracksForObject which only allows trackElement to be added to a single Track.

Since: 1.18

afterTimelineSelectElementTrack :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSelectElementTrackCallback) -> m SignalHandlerId Source #

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

after timeline #selectElementTrack 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.

onTimelineSelectElementTrack :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSelectElementTrackCallback) -> m SignalHandlerId Source #

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

on timeline #selectElementTrack callback

selectTracksForObject

type TimelineSelectTracksForObjectCallback Source #

Arguments

 = Clip

clip: The clip that trackElement is being added to

-> TrackElement

trackElement: The element being added

-> IO [Track]

Returns: An array of Track-s that trackElement should be added to, or Nothing to not add the element to any track.

This will be emitted whenever the timeline needs to determine which tracks a clip's children should be added to. The track element will be added to each of the tracks given in the return. If a track element is selected to go into multiple tracks, it will be copied into the additional tracks, under the same clip. Note that the copy will *not* keep its properties or state in sync with the original.

Connect to this signal once if you wish to control which element should be added to which track. Doing so will overwrite the default behaviour, which adds trackElement to all tracks whose Track:trackType includes the trackElement's TrackElement:trackType.

Note that under the default track selection, if a clip would produce multiple core children of the same TrackType, it will choose one of the core children arbitrarily to place in the corresponding tracks, with a warning for the other core children that are not placed in the track. For example, this would happen for a UriClip that points to a file that contains multiple audio streams. If you wish to choose the stream, you could connect to this signal, and use, say, uriSourceAssetGetStreamInfo to choose which core source to add.

When a clip is first added to a timeline, its core elements will be created for the current tracks in the timeline if they have not already been created. Then this will be emitted for each of these core children to select which tracks, if any, they should be added to. It will then be called for any non-core children in the clip.

In addition, if a new track element is ever added to a clip in a timeline (and it is not already part of a track) this will be emitted to select which tracks the element should be added to.

Finally, as a special case, if a track is added to the timeline *after* it already contains clips, then it will request the creation of the clips' core elements of the corresponding type, if they have not already been created, and this signal will be emitted for each of these newly created elements. In addition, this will also be released for all other track elements in the timeline's clips that have not yet been assigned a track. However, in this final case, the timeline will only check whether the newly added track appears in the track list. If it does appear, the track element will be added to the newly added track. All other tracks in the returned track list are ignored.

In this latter case, track elements that are already part of a track will not be asked if they want to be copied into the new track. If you wish to do this, you can use clipAddChildToTrack.

Note that the returned PtrArray should own a new reference to each of its contained Track. The timeline will set the DestroyNotify free function on the PtrArray to dereference the elements.

afterTimelineSelectTracksForObject :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSelectTracksForObjectCallback) -> m SignalHandlerId Source #

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

after timeline #selectTracksForObject 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.

onTimelineSelectTracksForObject :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSelectTracksForObjectCallback) -> m SignalHandlerId Source #

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

on timeline #selectTracksForObject callback

snappingEnded

type TimelineSnappingEndedCallback Source #

Arguments

 = TrackElement

obj1: The first element that was snapping

-> TrackElement

obj2: The second element that was snapping

-> Word64

position: The position where the two objects were to be snapped to

-> IO () 

Will be emitted whenever a snapping event ends. After a snap event has started (see Timeline::snappingStarted), it can later end because either another timeline edit has occurred (which may or may not have created a new snapping event), or because the timeline has been committed.

afterTimelineSnappingEnded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSnappingEndedCallback) -> m SignalHandlerId Source #

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

after timeline #snappingEnded 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.

onTimelineSnappingEnded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSnappingEndedCallback) -> m SignalHandlerId Source #

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

on timeline #snappingEnded callback

snappingStarted

type TimelineSnappingStartedCallback Source #

Arguments

 = TrackElement

obj1: The first element that is snapping

-> TrackElement

obj2: The second element that is snapping

-> Word64

position: The position where the two objects will snap to

-> IO () 

Will be emitted whenever an element's movement invokes a snapping event during an edit (usually of one of its ancestors) because its start or end point lies within the Timeline:snappingDistance of another element's start or end point.

See EditMode to see what can snap during an edit.

Note that only up to one snapping-started signal will be emitted per element edit within a timeline.

afterTimelineSnappingStarted :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSnappingStartedCallback) -> m SignalHandlerId Source #

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

after timeline #snappingStarted 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.

onTimelineSnappingStarted :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineSnappingStartedCallback) -> m SignalHandlerId Source #

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

on timeline #snappingStarted callback

trackAdded

type TimelineTrackAddedCallback Source #

Arguments

 = Track

track: The track that was added to timeline

-> IO () 

Will be emitted after the track is added to the timeline.

Note that this should not be emitted whilst a timeline is being loaded from its Project asset. You should connect to the project's Project::loaded signal if you want to know which tracks were created for the timeline.

afterTimelineTrackAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineTrackAddedCallback) -> m SignalHandlerId Source #

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

after timeline #trackAdded 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.

onTimelineTrackAdded :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineTrackAddedCallback) -> m SignalHandlerId Source #

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

on timeline #trackAdded callback

trackRemoved

type TimelineTrackRemovedCallback Source #

Arguments

 = Track

track: The track that was removed from timeline

-> IO () 

Will be emitted after the track is removed from the timeline.

afterTimelineTrackRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineTrackRemovedCallback) -> m SignalHandlerId Source #

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

after timeline #trackRemoved 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.

onTimelineTrackRemoved :: (IsTimeline a, MonadIO m) => a -> ((?self :: a) => TimelineTrackRemovedCallback) -> m SignalHandlerId Source #

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

on timeline #trackRemoved callback