[−][src]Trait gstreamer_editing_services::TrackElementExt
Required methods
fn add_children_props<P: IsA<Element>>(
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
)
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
)
Adds all the properties of a gst::Element
that match the criteria as
children properties of the track element. If the name of element
's
gst::ElementFactory
is not in blacklist
, and the factory's
GST_ELEMENT_METADATA_KLASS
contains at least one member of
wanted_categories
(e.g. GST_ELEMENT_FACTORY_KLASS_DECODER
), then
all the properties of element
that are also in whitelist
are added as
child properties of self
using
TimelineElementExt::add_child_property
.
This is intended to be used by subclasses when constructing.
element
The child object to retrieve properties from
wanted_categories
An array of element factory "klass" categories to whitelist, or None
to accept all categories
blacklist
A
blacklist of element factory names, or None
to not blacklist any
element factory
whitelist
A
whitelist of element property names, or None
to whitelist all
writeable properties
fn clamp_control_source(&self, property_name: &str)
Clamp the GstTimedValueControlSource
for the specified child property
to lie between the TimelineElement:in-point
and out-point of the
element. The out-point is the GES_TIMELINE_ELEMENT_END
of the element
translated from the timeline coordinates to the internal source
coordinates of the element.
If the property does not have a GstTimedValueControlSource
set by
TrackElementExt::set_control_source
, nothing happens. Otherwise, if
a timed value for the control source lies before the in-point of the
element, or after its out-point, then it will be removed. At the
in-point and out-point times, a new interpolated value will be placed.
Feature: v1_18
property_name
The name of the child property to clamp the control source of
fn edit(
&self,
layers: &[Layer],
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), BoolError>
&self,
layers: &[Layer],
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), BoolError>
Edits the element within its track.
Deprecated since 1.18
use TimelineElementExt::edit
instead.
layers
A whitelist of layers
where the edit can be performed, None
allows all layers in the
timeline
mode
The edit mode
edge
The edge of self
where the edit should occur
position
The edit position: a new location for the edge of self
(in nanoseconds)
Returns
true
if the edit of self
completed, false
on failure.
fn get_auto_clamp_control_sources(&self) -> bool
Gets TrackElement:auto-clamp-control-sources
.
Feature: v1_18
Returns
Whether the control sources for the child properties of
self
are automatically clamped.
fn get_element(&self) -> Option<Element>
Get the gst::Element
that the track element's underlying nleobject
controls.
Returns
The gst::Element
being controlled by the
nleobject that self
wraps.
fn get_gnlobject(&self) -> Option<Element>
Get the GNonLin object this object is controlling.
Deprecated
use TrackElementExt::get_nleobject
instead.
Returns
The GNonLin object this object is controlling.
fn get_nleobject(&self) -> Option<Element>
fn get_track(&self) -> Option<Track>
Get the TrackElement:track
for the element.
Returns
The track that self
belongs to,
or None
if it does not belong to a track.
fn get_track_type(&self) -> TrackType
fn has_internal_source(&self) -> bool
Gets TrackElement:has-internal-source
for the element.
Feature: v1_18
Returns
true
if self
can have its 'internal time' properties set.
fn is_active(&self) -> bool
fn is_core(&self) -> bool
Get whether the given track element is a core track element. That is,
it was created by the create_track_elements
ClipClass
method for
some Clip
.
Note that such a track element can only be added to a clip that shares
the same Asset
as the clip that created it. For example, you are
allowed to move core children between clips that resulted from
GESContainerExt::ungroup
, but you could not move the core child from a
UriClip
to a TitleClip
or another UriClip
with a different
UriClip:uri
.
Moreover, if a core track element is added to a clip, it will always be
added as a core child. Therefore, if this returns true
, then element
will be a core child of its parent clip.
Feature: v1_18
Returns
true
if element
is a core track element.
fn remove_control_binding(&self, property_name: &str) -> Result<(), BoolError>
Removes the gst::ControlBinding
that was created for the specified child
property of the track element using
TrackElementExt::set_control_source
. The given property_name
must
be the same name of the child property that was passed to
TrackElementExt::set_control_source
.
property_name
The name of the child property to remove the control binding from
Returns
true
if the control binding was removed from the specified
child property of self
, or false
if an error occurred.
fn set_active(&self, active: bool) -> bool
Sets TrackElement:active
for the element.
active
Whether self
should be active in its track
Returns
true
if the property was toggled.
fn set_auto_clamp_control_sources(&self, auto_clamp: bool)
Sets TrackElement:auto-clamp-control-sources
. If set to true
, this
will immediately clamp all the control sources.
Feature: v1_18
auto_clamp
Whether to automatically clamp the control sources for the
child properties of self
fn set_has_internal_source(&self, has_internal_source: bool) -> bool
Sets TrackElement:has-internal-source
for the element. If this is
set to false
, this method will also set the
TimelineElement:in-point
of the element to 0 and its
TimelineElement:max-duration
to GST_CLOCK_TIME_NONE
.
Feature: v1_18
has_internal_source
Whether the self
should be allowed to have its
'internal time' properties set.
Returns
false
if has_internal_source
is forbidden for self
and
true
in any other case.
fn set_track_type(&self, type_: TrackType)
fn get_property_active(&self) -> bool
Whether the effect of the element should be applied in its
TrackElement:track
. If set to false
, it will not be used in
the output of the track.
fn get_property_has_internal_source(&self) -> bool
This property is used to determine whether the 'internal time'
properties of the element have any meaning. In particular, unless
this is set to true
, the TimelineElement:in-point
and
TimelineElement:max-duration
can not be set to any value other
than the default 0 and GST_CLOCK_TIME_NONE
, respectively.
If an element has some internal timed source gst::Element
that it
reads stream data from as part of its function in a Track
, then
you'll likely want to set this to true
to allow the
TimelineElement:in-point
and TimelineElement:max-duration
to
be set.
The default value is determined by the TrackElementClass
default_has_internal_source
class property. For most
SourceClass
-es, this will be true
, with the exception of those
that have a potentially static source, such as ImageSourceClass
and TitleSourceClass
. Otherwise, this will usually be false
.
For most Operation
-s you will likely want to leave this set to
false
. The exception may be for an operation that reads some stream
data from some private internal source as part of manipulating the
input data from the usual linked upstream TrackElement
.
For example, you may want to set this to true
for a
TrackType::Video
operation that wraps a textoverlay
that reads
from a subtitle file and places its text on top of the received video
data. The TimelineElement:in-point
of the element would be used
to shift the initial seek time on the textoverlay
away from 0, and
the TimelineElement:max-duration
could be set to reflect the
time at which the subtitle file runs out of data.
Note that GES can not support track elements that have both internal content and manipulate the timing of their data streams (time effects).
Feature: v1_18
fn connect_property_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_track_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<TrackElement>> TrackElementExt for O
[src]
fn add_children_props<P: IsA<Element>>(
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
)
[src]
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
)
fn clamp_control_source(&self, property_name: &str)
[src]
fn edit(
&self,
layers: &[Layer],
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), BoolError>
[src]
&self,
layers: &[Layer],
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), BoolError>
fn get_auto_clamp_control_sources(&self) -> bool
[src]
fn get_element(&self) -> Option<Element>
[src]
fn get_gnlobject(&self) -> Option<Element>
[src]
fn get_nleobject(&self) -> Option<Element>
[src]
fn get_track(&self) -> Option<Track>
[src]
fn get_track_type(&self) -> TrackType
[src]
fn has_internal_source(&self) -> bool
[src]
fn is_active(&self) -> bool
[src]
fn is_core(&self) -> bool
[src]
fn remove_control_binding(&self, property_name: &str) -> Result<(), BoolError>
[src]
fn set_active(&self, active: bool) -> bool
[src]
fn set_auto_clamp_control_sources(&self, auto_clamp: bool)
[src]
fn set_has_internal_source(&self, has_internal_source: bool) -> bool
[src]
fn set_track_type(&self, type_: TrackType)
[src]
fn get_property_active(&self) -> bool
[src]
fn get_property_has_internal_source(&self) -> bool
[src]
fn connect_property_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_track_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId