Trait gstreamer_editing_services::prelude::LayerExt [−][src]
pub trait LayerExt: 'static {
Show methods
fn add_asset<P: IsA<Asset>>(
&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>;
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>;
fn add_clip_full<P: IsA<Clip>>(&self, clip: &P) -> Result<(), Error>;
fn is_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool;
fn is_auto_transition(&self) -> bool;
fn clips(&self) -> Vec<Clip>;
fn clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>;
fn duration(&self) -> ClockTime;
fn priority(&self) -> u32;
fn timeline(&self) -> Option<Timeline>;
fn is_empty(&self) -> bool;
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>;
fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool;
fn set_auto_transition(&self, auto_transition: bool);
fn set_priority(&self, priority: u32);
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P);
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_auto_transition_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Required methods
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>
See Self::add_asset_full(), which also gives an error.
asset
The asset to extract the new clip from
start
The [crate::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 [crate::TimelineElement:in-point] value to set on the new
clip
duration
The [crate::TimelineElement:duration] value to set on the new
clip
track_types
The [crate::Clip:supported-formats] to set on the the new
clip, or [crate::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>[src]
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>
v1_18 only.Extracts a new clip from an asset and adds it to the layer with the given properties.
asset
The asset to extract the new clip from
start
The [crate::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 [crate::TimelineElement:in-point] value to set on the new
clip
duration
The [crate::TimelineElement:duration] value to set on the new
clip
track_types
The [crate::Clip:supported-formats] to set on the the new
clip, or [crate::TrackType::Unknown] to use the default
Returns
The newly created clip.
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), BoolError>[src]
See Self::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>[src]
v1_18 only.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 crate::TimelineElement).
clip
The clip to add
Returns
true if clip was properly added to self, or false
if self refused to add clip.
fn is_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool[src]
v1_18 only.Gets whether the layer is active for the given track. See
Self::set_active_for_tracks().
track
The crate::Track to check if self is currently active for
Returns
fn is_auto_transition(&self) -> bool[src]
Gets the [crate::Layer:auto-transition] of the layer.
Returns
true if transitions are automatically added to self.
fn clips(&self) -> Vec<Clip>[src]
fn clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>[src]
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 crate::Clip-s
that intersect the interval [start, end) in self.
fn duration(&self) -> ClockTime[src]
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 priority(&self) -> u32[src]
Get the priority of the layer. When inside a timeline, this is its
index in the timeline. See crate::prelude::TimelineExt::move_layer().
Returns
The priority of self within its timeline.
fn timeline(&self) -> Option<Timeline>[src]
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[src]
Convenience method to check if the layer is empty (doesn’t contain
any crate::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>[src]
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[src]
v1_18 only.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 crate::TrackElement-s in
the track that belong to a crate::Clip in the layer will no longer be
active in the track, regardless of their individual
[crate::TrackElement:active] value.
Note that by default a layer will be active for all of its timeline’s tracks.
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
fn set_auto_transition(&self, auto_transition: bool)[src]
Sets [crate::Layer:auto-transition] for the layer. Use
crate::prelude::TimelineExt::set_auto_transition() if you want all layers within a
crate::Timeline to have [crate::Layer:auto-transition] set to true. Use this
method if you want different values for different layers (and make sure
to keep [crate::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)[src]
Since 1.16
Sets the layer to the given priority. See [crate::Layer:priority].
Deprecated since 1.16
use crate::prelude::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)[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_auto_transition_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
Since 1.16
Implementors
impl<O: IsA<Layer>> LayerExt for O[src]
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]
fn add_asset_full<P: IsA<Asset>>(
&self,
asset: &P,
start: ClockTime,
inpoint: ClockTime,
duration: ClockTime,
track_types: TrackType
) -> Result<Clip, Error>[src]v1_18 only.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 add_clip_full<P: IsA<Clip>>(&self, clip: &P) -> Result<(), Error>[src]v1_18 only.fn is_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool[src]
fn is_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool[src]v1_18 only.fn is_auto_transition(&self) -> bool[src]
fn clips(&self) -> Vec<Clip>[src]
fn clips_in_interval(&self, start: ClockTime, end: ClockTime) -> Vec<Clip>[src]
fn duration(&self) -> ClockTime[src]
fn priority(&self) -> u32[src]
fn 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_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool[src]v1_18 only.fn set_auto_transition(&self, auto_transition: bool)[src]
fn set_priority(&self, priority: u32)[src]
fn set_priority(&self, priority: u32)[src]Since 1.16
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_auto_transition_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]Since 1.16