[−][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>
See LayerExt::add_asset_full
, which also gives an error.
asset
The asset to extract the new clip from
start
The TimelineElement:start
value to set on the new clip
If start == #GST_CLOCK_TIME_NONE
, it will be added to the end
of self
, i.e. it will be set to self
's duration
inpoint
The TimelineElement:in-point
value to set on the new
clip
duration
The TimelineElement:duration
value to set on the new
clip
track_types
The Clip:supported-formats
to set on the the new
clip, or TrackType::Unknown
to use the default
Returns
The newly created clip.
fn add_asset_full<P: IsA<Asset>>(
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>
Extracts a new clip from an asset and adds it to the layer with the given properties.
Feature: v1_18
asset
The asset to extract the new clip from
start
The TimelineElement:start
value to set on the new clip
If start == #GST_CLOCK_TIME_NONE
, it will be added to the end
of self
, i.e. it will be set to self
's duration
inpoint
The TimelineElement:in-point
value to set on the new
clip
duration
The TimelineElement:duration
value to set on the new
clip
track_types
The Clip:supported-formats
to set on the the new
clip, or TrackType::Unknown
to use the default
Returns
The newly created clip.
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
See LayerExt::add_clip_full
, which also gives an error.
clip
The clip to add
Returns
true
if clip
was properly added to self
, or false
if self
refused to add clip
.
fn add_clip_full<P: IsA<Clip>>(&self, clip: &P) -> Result<(), Error>
Adds the given clip to the layer. If the method succeeds, the layer will take ownership of the clip.
This method will fail and return false
if clip
already resides in
some layer. It can also fail if the additional clip breaks some
compositional rules (see TimelineElement
).
Feature: v1_18
clip
The clip to add
Returns
true
if clip
was properly added to self
, or false
if self
refused to add clip
.
fn get_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool
Gets whether the layer is active for the given track. See
LayerExt::set_active_for_tracks
.
Feature: v1_18
track
The Track
to check if self
is currently active for
Returns
true
if self
is active for track
, or false
otherwise.
fn get_auto_transition(&self) -> bool
Gets the Layer:auto-transition
of the layer.
Returns
true
if transitions are automatically added to self
.
fn get_clips(&self) -> Vec<Clip>
fn get_clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>
Gets the clips within the layer that appear between start
and end
.
start
Start of the interval
end
End of the interval
Returns
A list of Clip
-s
that intersect the interval [start, end)
in self
.
fn get_duration(&self) -> ClockTime
Retrieves the duration of the layer, which is the difference between the start of the layer (always time 0) and the end (which will be the end time of the final clip).
Returns
The duration of self
.
fn get_priority(&self) -> u32
Get the priority of the layer. When inside a timeline, this is its
index in the timeline. See TimelineExt::move_layer
.
Returns
The priority of self
within its timeline.
fn get_timeline(&self) -> Option<Timeline>
Gets the timeline that the layer is a part of.
Returns
The timeline that self
is currently part of, or None
if it is not associated with any
timeline.
fn is_empty(&self) -> bool
Convenience method to check if the layer is empty (doesn't contain
any Clip
), or not.
Returns
true
if self
is empty, false
if it contains at least
one clip.
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
Removes the given clip from the layer.
clip
The clip to remove
Returns
true
if clip
was removed from self
, or false
if the
operation failed.
fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool
Activate or deactivate track elements in tracks
(or in all tracks if tracks
is None
).
When a layer is deactivated for a track, all the TrackElement
-s in
the track that belong to a Clip
in the layer will no longer be
active in the track, regardless of their individual
TrackElement:active
value.
Note that by default a layer will be active for all of its timeline's tracks.
Feature: v1_18
active
Whether elements in tracks
should be active or not
tracks
The list of
tracks self
should be (de-)active in, or None
to include all the tracks
in the self
's timeline
Returns
true
if the operation worked false
otherwise.
fn set_auto_transition(&self, auto_transition: bool)
Sets Layer:auto-transition
for the layer. Use
TimelineExt::set_auto_transition
if you want all layers within a
Timeline
to have Layer:auto-transition
set to true
. Use this
method if you want different values for different layers (and make sure
to keep Timeline:auto-transition
as false
for the corresponding
timeline).
auto_transition
Whether transitions should be automatically added to the layer
fn set_priority(&self, priority: u32)
Sets the layer to the given priority. See Layer:priority
.
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_asset_full<P: IsA<Asset>>(
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>
[src]
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>
[src]
fn add_clip_full<P: IsA<Clip>>(&self, clip: &P) -> Result<(), Error>
[src]
fn get_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool
[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_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool
[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