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 |
- Exported types
- Methods
- addAsset
- addChildToTrack
- addTopEffect
- findTrackElement
- findTrackElements
- getDurationLimit
- getInternalTimeFromTimelineTime
- getLayer
- getSupportedFormats
- getTimelineTimeFromInternalTime
- getTimelineTimeFromSourceFrame
- getTopEffectIndex
- getTopEffectPosition
- getTopEffects
- moveToLayer
- moveToLayerFull
- removeTopEffect
- setSupportedFormats
- setTopEffectIndex
- setTopEffectIndexFull
- setTopEffectPriority
- split
- splitFull
- Properties
Clip
-s are the core objects of a Layer
. Each clip may exist in
a single layer but may control several TrackElement
-s that span
several Track
-s. A clip will ensure that all its children share the
same TimelineElement:start and TimelineElement:duration in
their tracks, which will match the TimelineElement:start and
TimelineElement:duration of the clip itself. Therefore, changing
the timing of the clip will change the timing of the children, and a
change in the timing of a child will change the timing of the clip and
subsequently all its siblings. As such, a clip can be treated as a
singular object in its layer.
For most uses of a Timeline
, it is often sufficient to only
interact with Clip
-s directly, which will take care of creating and
organising the elements of the timeline's tracks.
Core Children
In more detail, clips will usually have some *core* TrackElement
children, which are created by the clip when it is added to a layer in
a timeline. The type and form of these core children will depend on the
clip's subclass. You can use trackElementIsCore
to determine
whether a track element is considered such a core track element. Note,
if a core track element is part of a clip, it will always be treated as
a core *child* of the clip. You can connect to the
Container::childAdded signal to be notified of their creation.
When a child is added to a clip, the timeline will select its tracks using Timeline::selectTracksForObject. Note that it may be the case that the child will still have no set TrackElement:track after this process. For example, if the timeline does not have a track of the corresponding Track:trackType. A clip can safely contain such children, which may have their track set later, although they will play no functioning role in the timeline in the meantime.
If a clip may create track elements with various
TrackElement:trackType(s), such as a UriClip
, but you only
want it to create a subset of these types, you should set the
Clip:supportedFormats of the clip to the subset of types. This
should be done *before* adding the clip to a layer.
If a clip will produce several core elements of the same
TrackElement:trackType, you should connect to the timeline's
Timeline::selectTracksForObject signal to coordinate which
tracks each element should land in. Note, no two core children within a
clip can share the same Track
, so you should not select the same
track for two separate core children. Provided you stick to this rule,
it is still safe to select several tracks for the same core child, the
core child will be copied into the additional tracks. You can manually
add the child to more tracks later using clipAddChildToTrack
.
If you do not wish to use a core child, you can always select no track.
The TimelineElement:inPoint of the clip will control the
TimelineElement:inPoint of its core children to be the same
value if their TrackElement:hasInternalSource is set to True
.
The TimelineElement:maxDuration of the clip is the minimum
TimelineElement:maxDuration of its core children. If you set its
value to anything other than its current value, this will also set the
TimelineElement:maxDuration of all its core children to the same
value if their TrackElement:hasInternalSource is set to True
.
As a special case, whilst a clip does not yet have any core children,
its TimelineElement:maxDuration may be set to indicate what its
value will be once they are created.
Effects
Some subclasses (tSourceClip
and BaseEffectClip
) may also allow
their objects to have additional non-core BaseEffect
-s elements as
children. These are additional effects that are applied to the output
data of the core elements. They can be added to the clip using
clipAddTopEffect
, which will take care of adding the effect to
the timeline's tracks. The new effect will be placed between the clip's
core track elements and its other effects. As such, the newly added
effect will be applied to any source data **before** the other existing
effects. You can change the ordering of effects using
clipSetTopEffectIndex
.
Tracks are selected for top effects in the same way as core children.
If you add a top effect to a clip before it is part of a timeline, and
later add the clip to a timeline, the track selection for the top
effects will occur just after the track selection for the core
children. If you add a top effect to a clip that is already part of a
timeline, the track selection will occur immediately. Since a top
effect must be applied on top of a core child, if you use
Timeline::selectTracksForObject, you should ensure that the
added effects are destined for a Track
that already contains a core
child.
In addition, if the core child in the track is not TrackElement:active, then neither can any of its effects be TrackElement:active. Therefore, if a core child is made in-active, all of the additional effects in the same track will also become in-active. Similarly, if an effect is set to be active, then the core child will also become active, but other effects will be left alone. Finally, if an active effect is added to the track of an in-active core child, it will become in-active as well. Note, in contrast, setting a core child to be active, or an effect to be in-active will *not* change the other children in the same track.
Time Effects
Some effects also change the timing of their data (see BaseEffect
for what counts as a time effect). Note that a BaseEffectClip
will
refuse time effects, but a Source
will allow them.
When added to a clip, time effects may adjust the timing of other
children in the same track. Similarly, when changing the order of
effects, making them (in)-active, setting their time property values
or removing time effects. These can cause the Clip:durationLimit
to change in value. However, if such an operation would ever cause the
TimelineElement:duration to shrink such that a clip's Source
is
totally overlapped in the timeline, the operation would be prevented.
Note that the same can happen when adding non-time effects with a
finite TimelineElement:maxDuration.
Therefore, when working with time effects, you should -- more so than
usual -- not assume that setting the properties of the clip's children
will succeed. In particular, you should use
timelineElementSetChildPropertyFull
when setting the time
properties.
If you wish to preserve the *internal* duration of a source in a clip during these time effect operations, you can do something like the following.
c code
void do_time_effect_change (GESClip * clip) { GList *tmp, *children; GESTrackElement *source; GstClockTime source_outpoint; GstClockTime new_end; GError *error = NULL; // choose some active source in a track to preserve the internal // duration of source = ges_clip_get_track_element (clip, NULL, GES_TYPE_SOURCE); // note its current internal end time source_outpoint = ges_clip_get_internal_time_from_timeline_time ( clip, source, GES_TIMELINE_ELEMENT_END (clip), NULL); // handle invalid out-point // stop the children's control sources from clamping when their // out-point changes with a change in the time effects children = ges_container_get_children (GES_CONTAINER (clip), FALSE); for (tmp = children; tmp; tmp = tmp->next) ges_track_element_set_auto_clamp_control_sources (tmp->data, FALSE); // add time effect, or set their children properties, or move them around ... // user can make sure that if a time effect changes one source, we should // also change the time effect for another source. E.g. if // "GstVideorate::rate" is set to 2.0, we also set "GstPitch::rate" to // 2.0 // Note the duration of the clip may have already changed if the // duration-limit of the clip dropped below its current value new_end = ges_clip_get_timeline_time_from_internal_time ( clip, source, source_outpoint, &error); // handle error if (!ges_timeline_elemnet_edit_full (GES_TIMELINE_ELEMENT (clip), -1, GES_EDIT_MODE_TRIM, GES_EDGE_END, new_end, &error)) // handle error for (tmp = children; tmp; tmp = tmp->next) ges_track_element_set_auto_clamp_control_sources (tmp->data, TRUE); g_list_free_full (children, gst_object_unref); gst_object_unref (source); }
Synopsis
- newtype Clip = Clip (ManagedPtr Clip)
- class (GObject o, IsDescendantOf Clip o) => IsClip o
- toClip :: (MonadIO m, IsClip o) => o -> m Clip
- clipAddAsset :: (HasCallStack, MonadIO m, IsClip a, IsAsset b) => a -> b -> m (Maybe TrackElement)
- clipAddChildToTrack :: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b, IsTrack c) => a -> b -> c -> m TrackElement
- clipAddTopEffect :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> Int32 -> m ()
- clipFindTrackElement :: (HasCallStack, MonadIO m, IsClip a, IsTrack b) => a -> Maybe b -> GType -> m (Maybe TrackElement)
- clipFindTrackElements :: (HasCallStack, MonadIO m, IsClip a, IsTrack b) => a -> Maybe b -> [TrackType] -> GType -> m [TrackElement]
- clipGetDurationLimit :: (HasCallStack, MonadIO m, IsClip a) => a -> m Word64
- clipGetInternalTimeFromTimelineTime :: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b) => a -> b -> Word64 -> m Word64
- clipGetLayer :: (HasCallStack, MonadIO m, IsClip a) => a -> m (Maybe Layer)
- clipGetSupportedFormats :: (HasCallStack, MonadIO m, IsClip a) => a -> m [TrackType]
- clipGetTimelineTimeFromInternalTime :: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b) => a -> b -> Word64 -> m Word64
- clipGetTimelineTimeFromSourceFrame :: (HasCallStack, MonadIO m, IsClip a) => a -> Int64 -> m Word64
- clipGetTopEffectIndex :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> m Int32
- clipGetTopEffectPosition :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> m Int32
- clipGetTopEffects :: (HasCallStack, MonadIO m, IsClip a) => a -> m [TrackElement]
- clipMoveToLayer :: (HasCallStack, MonadIO m, IsClip a, IsLayer b) => a -> b -> m Bool
- clipMoveToLayerFull :: (HasCallStack, MonadIO m, IsClip a, IsLayer b) => a -> b -> m ()
- clipRemoveTopEffect :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> m ()
- clipSetSupportedFormats :: (HasCallStack, MonadIO m, IsClip a) => a -> [TrackType] -> m ()
- clipSetTopEffectIndex :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> Word32 -> m Bool
- clipSetTopEffectIndexFull :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> Word32 -> m ()
- clipSetTopEffectPriority :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> Word32 -> m Bool
- clipSplit :: (HasCallStack, MonadIO m, IsClip a) => a -> Word64 -> m (Maybe Clip)
- clipSplitFull :: (HasCallStack, MonadIO m, IsClip a) => a -> Word64 -> m (Maybe Clip)
- getClipDurationLimit :: (MonadIO m, IsClip o) => o -> m Word64
- getClipLayer :: (MonadIO m, IsClip o) => o -> m (Maybe Layer)
- constructClipSupportedFormats :: (IsClip o, MonadIO m) => [TrackType] -> m (GValueConstruct o)
- getClipSupportedFormats :: (MonadIO m, IsClip o) => o -> m [TrackType]
- setClipSupportedFormats :: (MonadIO m, IsClip o) => o -> [TrackType] -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Clip Source # | |
GObject Clip Source # | |
Defined in GI.GES.Objects.Clip | |
ManagedPtrNewtype Clip Source # | |
Defined in GI.GES.Objects.Clip toManagedPtr :: Clip -> ManagedPtr Clip | |
TypedObject Clip Source # | |
Defined in GI.GES.Objects.Clip | |
HasParentTypes Clip Source # | |
Defined in GI.GES.Objects.Clip | |
IsGValue (Maybe Clip) Source # | Convert |
Defined in GI.GES.Objects.Clip gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Clip -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Clip) | |
type ParentTypes Clip Source # | |
Defined in GI.GES.Objects.Clip |
class (GObject o, IsDescendantOf Clip o) => IsClip o Source #
Instances
(GObject o, IsDescendantOf Clip o) => IsClip o Source # | |
Defined in GI.GES.Objects.Clip |
Methods
Click to display all available methods, including inherited ones
Methods
add, addAsset, addChildProperty, addChildToTrack, addMetasFromString, addTopEffect, bindProperty, bindPropertyFull, checkMetaRegistered, copy, edit, editFull, findTrackElement, findTrackElements, forceFloating, foreach, freezeNotify, getv, isFloating, listChildrenProperties, lookupChild, metasToString, moveToLayer, moveToLayerFull, notify, notifyByPspec, paste, ref, refSink, registerMeta, registerMetaBoolean, registerMetaDate, registerMetaDateTime, registerMetaDouble, registerMetaFloat, registerMetaInt, registerMetaInt64, registerMetaString, registerMetaUint, registerMetaUint64, registerStaticMeta, remove, removeChildProperty, removeTopEffect, ripple, rippleEnd, rollEnd, rollStart, runDispose, split, splitFull, stealData, stealQdata, thawNotify, trim, ungroup, unref, watchClosure.
Getters
getAsset, getBoolean, getChildProperty, getChildPropertyByPspec, getChildren, getData, getDate, getDateTime, getDouble, getDuration, getDurationLimit, getFloat, getId, getInpoint, getInt, getInt64, getInternalTimeFromTimelineTime, getLayer, getLayerPriority, getMarkerList, getMaxDuration, getMeta, getName, getNaturalFramerate, getParent, getPriority, getProperty, getQdata, getStart, getString, getSupportedFormats, getTimeline, getTimelineTimeFromInternalTime, getTimelineTimeFromSourceFrame, getTopEffectIndex, getTopEffectPosition, getTopEffects, getToplevelParent, getTrackTypes, getUint, getUint64.
Setters
setAsset, setBoolean, setChildProperty, setChildPropertyByPspec, setChildPropertyFull, setData, setDataFull, setDate, setDateTime, setDouble, setDuration, setFloat, setInpoint, setInt, setInt64, setMarkerList, setMaxDuration, setMeta, setName, setParent, setPriority, setProperty, setStart, setString, setSupportedFormats, setTimeline, setTopEffectIndex, setTopEffectIndexFull, setTopEffectPriority, setUint, setUint64.
addAsset
:: (HasCallStack, MonadIO m, IsClip a, IsAsset b) | |
=> a |
|
-> b |
|
-> m (Maybe TrackElement) | Returns: The newly created element, or
|
Extracts a TrackElement
from an asset and adds it to the clip.
This can be used to add effects that derive from the asset to the
clip, but this method is not intended to be used to create the core
elements of the clip.
addChildToTrack
:: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b, IsTrack c) | |
=> a |
|
-> b |
|
-> c |
|
-> m TrackElement | Returns: The element that was added to |
Adds the track element child of the clip to a specific track.
If the given child is already in another track, this will create a copy of the child, add it to the clip, and add this copy to the track.
You should only call this whilst a clip is part of a Timeline
, and
for tracks that are in the same timeline.
This method is an alternative to using the Timeline::selectTracksForObject signal, but can be used to complement it when, say, you wish to copy a clip's children from one track into a new one.
When the child is a core child, it must be added to a track that does not already contain another core child of the same clip. If it is not a core child (an additional effect), then it must be added to a track that already contains one of the core children of the same clip.
This method can also fail if the adding the track element to the track
would break a configuration rule of the corresponding Timeline
,
such as causing three sources to overlap at a single time, or causing
a source to completely overlap another in the same track.
Since: 1.18
addTopEffect
:: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () | (Can throw |
Add a top effect to a clip at the given index.
Unlike using containerAdd
, this allows you to set the index
in advance. It will also check that no error occurred during the track
selection for the effect.
Note, only subclasses of ClipClass
that have
GES_CLIP_CLASS_CAN_ADD_EFFECTS
set to True
(such as SourceClip
and BaseEffectClip
) can have additional top effects added.
Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is added.
Since: 1.18
findTrackElement
:: (HasCallStack, MonadIO m, IsClip a, IsTrack b) | |
=> a |
|
-> Maybe b |
|
-> GType |
|
-> m (Maybe TrackElement) | Returns: The element controlled by
|
Finds an element controlled by the clip. If track
is given,
then only the track elements in track
are searched for. If type
is
given, then this function searches for a track element of the given
type
.
Note, if multiple track elements in the clip match the given criteria,
this will return the element amongst them with the highest
TimelineElement:priority (numerically, the smallest). See
clipFindTrackElements
if you wish to find all such elements.
findTrackElements
clipFindTrackElements Source #
:: (HasCallStack, MonadIO m, IsClip a, IsTrack b) | |
=> a |
|
-> Maybe b |
|
-> [TrackType] |
|
-> GType |
|
-> m [TrackElement] | Returns: A list of all
the |
Finds the TrackElement
-s controlled by the clip that match the
given criteria. If track
is given as Nothing
and trackType
is given as
GES_TRACK_TYPE_UNKNOWN
, then the search will match all elements in any
track, including those with no track, and of any
TrackElement:trackType. Otherwise, if track
is not Nothing
, but
trackType
is GES_TRACK_TYPE_UNKNOWN
, then only the track elements in
track
are searched for. Otherwise, if trackType
is not
GES_TRACK_TYPE_UNKNOWN
, but track
is Nothing
, then only the track
elements whose TrackElement:trackType matches trackType
are
searched for. Otherwise, when both are given, the track elements that
match **either** criteria are searched for. Therefore, if you wish to
only find elements in a specific track, you should give the track as
track
, but you should not give the track's Track:trackType as
trackType
because this would also select elements from other tracks
of the same type.
You may also give type
to _further_ restrict the search to track
elements of the given type
.
getDurationLimit
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> m Word64 | Returns: The duration-limit of |
Gets the Clip:durationLimit of the clip.
Since: 1.18
getInternalTimeFromTimelineTime
clipGetInternalTimeFromTimelineTime Source #
:: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b) | |
=> a |
|
-> b |
|
-> Word64 |
|
-> m Word64 | Returns: The time in the internal coordinates of |
Convert the timeline time to an internal source time of the child.
This will take any time effects placed on the clip into account (see
BaseEffect
for what time effects are supported, and how to
declare them in GES).
When timelineTime
is above the TimelineElement:start of clip
,
this will return the internal time at which the content that appears at
timelineTime
in the output of the timeline is created in child
. For
example, if timelineTime
corresponds to the current seek position,
this would let you know which part of a media file is being read.
This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its TimelineElement:maxDuration.
If, instead, timelineTime
is below the current
TimelineElement:start of clip
, this will return what you would
need to set the TimelineElement:inPoint of child
to if you set
the TimelineElement:start of clip
to timelineTime
and wanted
to keep the content of child
currently found at the current
TimelineElement:start of clip
at the same timeline position. If
this would be negative, the conversion fails. This is useful for
determining what TimelineElement:inPoint would result from a
GES_EDIT_MODE_TRIM
to timelineTime
.
Note that whilst a clip has no time effects, this second return is
equivalent to finding the internal time at which the content that
appears at timelineTime
in the timeline can be found in child
if it
had indefinite extent in both directions. However, with non-linear time
effects this second return will be more distinct.
In either case, the returned time would be appropriate to use for the TimelineElement:inPoint or TimelineElement:maxDuration of the child.
See clipGetTimelineTimeFromInternalTime
, which performs the
reverse.
Since: 1.18
getLayer
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> m (Maybe Layer) | Returns: The layer |
Gets the Clip:layer of the clip.
getSupportedFormats
clipGetSupportedFormats Source #
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> m [TrackType] | Returns: The |
Gets the Clip:supportedFormats of the clip.
getTimelineTimeFromInternalTime
clipGetTimelineTimeFromInternalTime Source #
:: (HasCallStack, MonadIO m, IsClip a, IsTrackElement b) | |
=> a |
|
-> b |
|
-> Word64 |
|
-> m Word64 | Returns: The time in the timeline coordinates corresponding to
|
Convert the internal source time from the child to a timeline time.
This will take any time effects placed on the clip into account (see
BaseEffect
for what time effects are supported, and how to
declare them in GES).
When internalTime
is above the TimelineElement:inPoint of
child
, this will return the timeline time at which the internal
content found at internalTime
appears in the output of the timeline's
track. For example, this would let you know where in the timeline a
particular scene in a media file would appear.
This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its Clip:durationLimit.
If, instead, internalTime
is below the current
TimelineElement:inPoint of child
, this will return what you would
need to set the TimelineElement:start of clip
to if you set the
TimelineElement:inPoint of child
to internalTime
and wanted to
keep the content of child
currently found at the current
TimelineElement:start of clip
at the same timeline position. If
this would be negative, the conversion fails. This is useful for
determining what position to use in a GES_EDIT_MODE_TRIM
if you wish
to trim to a specific point in the internal content, such as a
particular scene in a media file.
Note that whilst a clip has no time effects, this second return is
equivalent to finding the timeline time at which the content of child
at internalTime
would be found in the timeline if it had indefinite
extent in both directions. However, with non-linear time effects this
second return will be more distinct.
In either case, the returned time would be appropriate to use in
timelineElementEdit
for GES_EDIT_MODE_TRIM
, and similar, if
you wish to use a particular internal point as a reference. For
example, you could choose to end a clip at a certain internal
'out-point', similar to the TimelineElement:inPoint, by
translating the desired end time into the timeline coordinates, and
using this position to trim the end of a clip.
See clipGetInternalTimeFromTimelineTime
, which performs the
reverse, or clipGetTimelineTimeFromSourceFrame
which does
the same conversion, but using frame numbers.
Since: 1.18
getTimelineTimeFromSourceFrame
clipGetTimelineTimeFromSourceFrame Source #
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> Int64 |
|
-> m Word64 | Returns: The timestamp corresponding to |
Convert the source frame number to a timeline time. This acts the same
as clipGetTimelineTimeFromInternalTime
using the core
children of the clip and using the frame number to specify the internal
position, rather than a timestamp.
The returned timeline time can be used to seek or edit to a specific frame.
Note that you can get the frame timestamp of a particular clip asset
with clipAssetGetFrameTime
.
Since: 1.18
getTopEffectIndex
clipGetTopEffectIndex Source #
:: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) | |
=> a |
|
-> b |
|
-> m Int32 | Returns: The index of |
Gets the internal index of an effect in the clip. The index of effects in a clip will run from 0 to n-1, where n is the total number of effects. If two effects share the same TrackElement:track, the effect with the numerically lower index will be applied to the source data **after** the other effect, i.e. output data will always flow from a higher index effect to a lower index effect.
getTopEffectPosition
clipGetTopEffectPosition :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> m Int32 Source #
No description available in the introspection data.
getTopEffects
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> m [TrackElement] | Returns: A list of all
|
Gets the BaseEffect
-s that have been added to the clip. The
returned list is ordered by their internal index in the clip. See
clipGetTopEffectIndex
.
moveToLayer
:: (HasCallStack, MonadIO m, IsClip a, IsLayer b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
See clipMoveToLayerFull
, which also gives an error.
moveToLayerFull
:: (HasCallStack, MonadIO m, IsClip a, IsLayer b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Moves a clip to a new layer. If the clip already exists in a layer, it is first removed from its current layer before being added to the new layer.
Since: 1.18
removeTopEffect
:: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Remove a top effect from the clip.
Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is removed.
Since: 1.18
setSupportedFormats
clipSetSupportedFormats Source #
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> [TrackType] |
|
-> m () |
Sets the Clip:supportedFormats of the clip. This should normally only be called by subclasses, which should be responsible for updating its value, rather than the user.
setTopEffectIndex
clipSetTopEffectIndex Source #
:: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) | |
=> a |
|
-> b |
|
-> Word32 |
|
-> m Bool | Returns: |
See clipSetTopEffectIndexFull
, which also gives an error.
setTopEffectIndexFull
clipSetTopEffectIndexFull Source #
:: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) | |
=> a |
|
-> b |
|
-> Word32 |
|
-> m () | (Can throw |
Set the index of an effect within the clip. See
clipGetTopEffectIndex
. The new index must be an existing
index of the clip. The effect is moved to the new index, and the other
effects may be shifted in index accordingly to otherwise maintain the
ordering.
Since: 1.18
setTopEffectPriority
clipSetTopEffectPriority :: (HasCallStack, MonadIO m, IsClip a, IsBaseEffect b) => a -> b -> Word32 -> m Bool Source #
No description available in the introspection data.
split
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> Word64 |
|
-> m (Maybe Clip) | Returns: The newly created clip resulting
from the splitting |
See clipSplitFull
, which also gives an error.
splitFull
:: (HasCallStack, MonadIO m, IsClip a) | |
=> a |
|
-> Word64 |
|
-> m (Maybe Clip) | Returns: The newly created clip resulting
from the splitting |
Splits a clip at the given timeline position into two clips. The clip must already have a Clip:layer.
The original clip's TimelineElement:duration is reduced such that its end point matches the split position. Then a new clip is created in the same layer, whose TimelineElement:start matches the split position and TimelineElement:duration will be set such that its end point matches the old end point of the original clip. Thus, the two clips together will occupy the same positions in the timeline as the original clip did.
The children of the new clip will be new copies of the original clip's children, so it will share the same sources and use the same operations.
The new clip will also have its TimelineElement:inPoint set so
that any internal data will appear in the timeline at the same time.
Thus, when the timeline is played, the playback of data should
appear the same. This may be complicated by any additional
Effect
-s that have been placed on the original clip that depend on
the playback time or change the data consumption rate of sources. This
method will attempt to translate these effects such that the playback
appears the same. In such complex situations, you may get a better
result if you place the clip in a separate sub Project
, which only
contains this clip (and its effects), and in the original layer
create two neighbouring UriClip
-s that reference this sub-project,
but at a different TimelineElement:inPoint.
Since: 1.18
Properties
durationLimit
The maximum TimelineElement:duration that can be *currently* set
for the clip, taking into account the TimelineElement:inPoint,
TimelineElement:maxDuration, TrackElement:active, and
TrackElement:track properties of its children, as well as any
time effects. If there is no limit, this will be set to
CLOCK_TIME_NONE
.
Note that whilst a clip has no children in any tracks, the limit will
be unknown, and similarly set to CLOCK_TIME_NONE
.
If the duration-limit would ever go below the current TimelineElement:duration of the clip due to a change in the above variables, its TimelineElement:duration will be set to the new limit.
Since: 1.18
getClipDurationLimit :: (MonadIO m, IsClip o) => o -> m Word64 Source #
Get the value of the “duration-limit
” property.
When overloading is enabled, this is equivalent to
get
clip #durationLimit
layer
The layer this clip lies in.
If you want to connect to this property's Object::notify signal,
you should connect to it with g_signal_connect_after()
since the
signal emission may be stopped internally.
getClipLayer :: (MonadIO m, IsClip o) => o -> m (Maybe Layer) Source #
Get the value of the “layer
” property.
When overloading is enabled, this is equivalent to
get
clip #layer
supportedFormats
The TrackType
-s that the clip supports, which it can create
TrackElement
-s for. Note that this can be a combination of
TrackType
flags to indicate support for several
TrackElement:trackType elements.
constructClipSupportedFormats :: (IsClip o, MonadIO m) => [TrackType] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “supported-formats
” property. This is rarely needed directly, but it is used by new
.
getClipSupportedFormats :: (MonadIO m, IsClip o) => o -> m [TrackType] Source #
Get the value of the “supported-formats
” property.
When overloading is enabled, this is equivalent to
get
clip #supportedFormats
setClipSupportedFormats :: (MonadIO m, IsClip o) => o -> [TrackType] -> m () Source #
Set the value of the “supported-formats
” property.
When overloading is enabled, this is equivalent to
set
clip [ #supportedFormats:=
value ]