Trait gstreamer_editing_services::prelude::GESTrackExt [−][src]
pub trait GESTrackExt: 'static {}Show methods
fn add_element<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), BoolError>; fn add_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>; fn commit(&self) -> bool; fn caps(&self) -> Option<Caps>; fn elements(&self) -> Vec<TrackElement>; fn is_mixing(&self) -> bool; fn restriction_caps(&self) -> Option<Caps>; fn timeline(&self) -> Option<Timeline>; fn remove_element<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), BoolError>; fn remove_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>; fn set_mixing(&self, mixing: bool); fn set_restriction_caps(&self, caps: &Caps); fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P); fn update_restriction_caps(&self, caps: &Caps); fn duration(&self) -> u64; fn id(&self) -> Option<GString>; fn set_id(&self, id: Option<&str>); fn get_property_restriction_caps(&self) -> Option<Caps>; fn track_type(&self) -> TrackType; fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_mixing_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_restriction_caps_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), BoolError>
[src]
See Self::add_element()
, which also gives an error.
object
The element to add
Returns
true
if object
was successfully added to self
.
fn add_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]
&self,
object: &P
) -> Result<(), Error>
v1_18
only.Adds the given track element to the track, which takes ownership of the element.
Note that this can fail if it would break a configuration rule of the
track’s crate::Timeline
.
Note that a crate::TrackElement
can only be added to one track.
object
The element to add
Returns
true
if object
was successfully added to self
.
fn commit(&self) -> bool
[src]
Commits all the pending changes for the elements contained in the track.
When changes are made to the timing or priority of elements within a
track, they are not directly executed for the underlying
nlecomposition
and its children. This method will finally execute
these changes so they are reflected in the data output of the track.
Any pending changes will be executed in the backend. The
[crate::Timeline::commited
] signal will be emitted once this has completed.
Note that crate::prelude::TimelineExt::commit()
will call this method on all of its
tracks, so you are unlikely to need to use this directly.
Returns
true
if pending changes were committed, or false
if nothing
needed to be committed.
fn caps(&self) -> Option<Caps>
[src]
fn elements(&self) -> Vec<TrackElement>
[src]
Gets the track elements contained in the track. The returned list is
sorted by the element’s [crate::TimelineElement:priority
] and
[crate::TimelineElement:start
].
Returns
A list of
all the crate::TrackElement
-s in self
.
fn is_mixing(&self) -> bool
[src]
fn restriction_caps(&self) -> Option<Caps>
[src]
v1_18
only.fn timeline(&self) -> Option<Timeline>
[src]
Get the timeline this track belongs to.
Returns
The timeline that self
belongs to, or None
if
it does not belong to a timeline.
fn remove_element<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), BoolError>
[src]
&self,
object: &P
) -> Result<(), BoolError>
See Self::remove_element_full()
, which also returns an error.
object
The element to remove
Returns
true
if object
was successfully removed from self
.
fn remove_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]
&self,
object: &P
) -> Result<(), Error>
v1_18
only.Removes the given track element from the track, which revokes ownership of the element.
object
The element to remove
Returns
true
if object
was successfully removed from self
.
fn set_mixing(&self, mixing: bool)
[src]
fn set_restriction_caps(&self, caps: &Caps)
[src]
Sets the [crate::Track:restriction-caps
] for the track.
NOTE: Restriction caps are not taken into account when using [
crate::Pipeline:mode
]=[crate::PipelineFlags::SmartRender
].
caps
The new restriction-caps for self
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P)
[src]
Informs the track that it belongs to the given timeline. Calling this
does not actually add the track to the timeline. For that, you should
use crate::prelude::TimelineExt::add_track()
, which will also take care of informing
the track that it belongs to the timeline. As such, there is no need
for you to call this method.
fn update_restriction_caps(&self, caps: &Caps)
[src]
Updates the [crate::Track:restriction-caps
] of the track using the fields
found in the given caps. Each of the crate::gst::Structure
-s in caps
is
compared against the existing structure with the same index in the
current [crate::Track:restriction-caps
]. If there is no corresponding
existing structure at that index, then the new structure is simply
copied to that index. Otherwise, any fields in the new structure are
copied into the existing structure. This will replace existing values,
and may introduce new ones, but any fields ‘missing’ in the new
structure are left unchanged in the existing structure.
For example, if the existing [crate::Track:restriction-caps
] are
“video/x-raw, width=480, height=360”, and the updating caps is
“video/x-raw, format=I420, width=500; video/x-bayer, width=400”, then
the new [crate::Track:restriction-caps
] after calling this will be
“video/x-raw, width=500, height=360, format=I420; video/x-bayer,
width=400”.
caps
The caps to update the restriction-caps with
fn duration(&self) -> u64
[src]
fn id(&self) -> Option<GString>
[src]
v1_18
only.fn set_id(&self, id: Option<&str>)
[src]
v1_18
only.fn get_property_restriction_caps(&self) -> Option<Caps>
[src]
The capabilities that specifies the final output format of the
crate::Track
. For example, for a video track, it would specify the
height, width, framerate and other properties of the stream.
You may change this property after the track has been added to a
crate::Timeline
, but it must remain compatible with the track’s
[crate::Track:caps
].
Default value: GST_CAPS_ANY
.
fn track_type(&self) -> TrackType
[src]
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
This signal will be emitted once the changes initiated by
Self::commit()
have been executed in the backend. In particular,
this will be emitted whenever the underlying nlecomposition
has been
committed (see nlecomposition::commited
).
fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Will be emitted after a track element is removed from the track.
effect
The element that was removed
fn connect_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
v1_18
only.fn connect_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_restriction_caps_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Track>> GESTrackExt for O
[src]
impl<O: IsA<Track>> GESTrackExt for O
[src]fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), BoolError>
[src]
fn add_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]
fn add_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]v1_18
only.fn commit(&self) -> bool
[src]
fn caps(&self) -> Option<Caps>
[src]
fn elements(&self) -> Vec<TrackElement>
[src]
fn is_mixing(&self) -> bool
[src]
fn restriction_caps(&self) -> Option<Caps>
[src]
fn restriction_caps(&self) -> Option<Caps>
[src]v1_18
only.fn timeline(&self) -> Option<Timeline>
[src]
fn remove_element<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), BoolError>
[src]
&self,
object: &P
) -> Result<(), BoolError>
fn remove_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]
fn remove_element_full<P: IsA<TrackElement>>(
&self,
object: &P
) -> Result<(), Error>
[src]v1_18
only.fn set_mixing(&self, mixing: bool)
[src]
fn set_restriction_caps(&self, caps: &Caps)
[src]
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P)
[src]
fn update_restriction_caps(&self, caps: &Caps)
[src]
fn duration(&self) -> u64
[src]
fn get_property_restriction_caps(&self) -> Option<Caps>
[src]
fn track_type(&self) -> TrackType
[src]
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]v1_18
only.fn connect_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_restriction_caps_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId