[−][src]Trait gstreamer_editing_services::LayerExt
Required methods
fn add_asset<P: IsA<Asset>>(
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, BoolError>
[−]
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, BoolError>
Creates Clip from asset, adds it to layer and returns a reference to it.
asset
The asset to add to
start
The start value to set on the new Clip
,
if start
== GST_CLOCK_TIME_NONE, it will be set to
the current duration of self
inpoint
The inpoint value to set on the new Clip
duration
The duration value to set on the new Clip
track_types
The TrackType
to set on the the new Clip
Returns
Created Clip
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
[−]
Adds the given clip to the layer. Sets the clip's parent, and thus takes ownership of the clip.
An clip can only be added to one layer.
Calling this method will construct and properly set all the media related
elements on clip
. If you need to know when those objects (actually TrackElement
)
are constructed, you should connect to the container::child-added signal which
is emited right after those elements are ready to be used.
clip
the Clip
to add.
Returns
true
if the clip was properly added to the layer, or false
if the self
refuses to add the clip.
fn get_auto_transition(&self) -> bool
[−]
Gets whether transitions are automatically added when objects overlap or not.
Returns
true
if transitions are automatically added, else false
.
fn get_clips(&self) -> Vec<Clip>
[−]
Get the clips this layer contains.
Returns
a glib::List
of
clips. The user is responsible for
unreffing the contained objects and freeing the list.
fn get_clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>
[−]
Gets the clips which appear between start
and end
on self
.
start
start of the interval
end
end of the interval
Returns
a glib::List
of clips intersecting [start
, end
) interval on self
.
fn get_duration(&self) -> ClockTime
[−]
Lets you retrieve the duration of the layer, which means the end time of the last clip inside it
Returns
The duration of a layer
fn get_priority(&self) -> u32
[−]
fn get_timeline(&self) -> Option<Timeline>
[−]
Get the Timeline
in which Layer
currently is.
Returns
the Timeline
in which Layer
currently is or None
if not in any timeline yet.
fn is_empty(&self) -> bool
[−]
Convenience method to check if self
is empty (doesn't contain any clip),
or not.
Returns
true
if self
is empty, false
if it already contains at least
one Clip
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
[−]
Removes the given clip
from the self
and unparents it.
Unparenting it means the reference owned by self
on the clip
will be
removed. If you wish to use the clip
after this function, make sure you
call gst::ObjectExt::ref
before removing it from the self
.
clip
the Clip
to remove
Returns
true
if the clip could be removed, false
if the layer does
not want to remove the clip.
fn set_auto_transition(&self, auto_transition: bool)
[−]
Sets the layer to the given auto_transition
. See the documentation of the
property auto_transition for more information.
auto_transition
whether the auto_transition is active
fn set_priority(&self, priority: u32)
[−]
Sets the layer to the given priority
. See the documentation of the
priority property for more information.
Deprecated since 1.16
use TimelineExt::move_layer
instead. This deprecation means
that you will not need to handle layer priorities at all yourself, GES
will make sure there is never 'gaps' between layer priorities.
priority
the priority to set
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P)
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId
[−]
&self,
f: F
) -> SignalHandlerId
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId
[−]
&self,
f: F
) -> SignalHandlerId
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Layer>> LayerExt for O
[src][−]
fn add_asset<P: IsA<Asset>>(
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, BoolError>
[src]
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, BoolError>
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
[src]
fn get_auto_transition(&self) -> bool
[src]
fn get_clips(&self) -> Vec<Clip>
[src]
fn get_clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>
[src]
fn get_duration(&self) -> ClockTime
[src]
fn get_priority(&self) -> u32
[src]
fn get_timeline(&self) -> Option<Timeline>
[src]
fn is_empty(&self) -> bool
[src]
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
[src]
fn set_auto_transition(&self, auto_transition: bool)
[src]
fn set_priority(&self, priority: u32)
[src]
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P)
[src]
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId