Trait gstreamer_editing_services::prelude::TrackElementExt [−][src]
pub trait TrackElementExt: 'static {
Show methods
fn add_children_props<P: IsA<Element>>(
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
);
fn clamp_control_source(&self, property_name: &str);
fn edit(
&self,
layers: &[Layer],
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), BoolError>;
fn is_auto_clamp_control_sources(&self) -> bool;
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>;
fn element(&self) -> Option<Element>;
fn gnlobject(&self) -> Option<Element>;
fn nleobject(&self) -> Option<Element>;
fn track(&self) -> Option<Track>;
fn track_type(&self) -> TrackType;
fn has_internal_source(&self) -> bool;
fn is_active(&self) -> bool;
fn is_core(&self) -> bool;
fn remove_control_binding(
&self,
property_name: &str
) -> Result<(), BoolError>;
fn set_active(&self, active: bool) -> bool;
fn set_auto_clamp_control_sources(&self, auto_clamp: bool);
fn set_control_source<P: IsA<ControlSource>>(
&self,
source: &P,
property_name: &str,
binding_type: &str
) -> bool;
fn set_has_internal_source(&self, has_internal_source: bool) -> bool;
fn set_track_type(&self, type_: TrackType);
fn connect_control_binding_added<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_control_binding_removed<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_track_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_track_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Expand description
Required methods
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
ges_timeline_element_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)[src]
fn clamp_control_source(&self, property_name: &str)[src]v1_18 only.Clamp the GstTimedValueControlSource for the specified child property
to lie between the property::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
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.
property_name
The name of the child property to clamp the control source of
Since 1.18
Edits the element within its track.
Deprecated since 1.18
use ges_timeline_element_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
fn is_auto_clamp_control_sources(&self) -> bool[src]
fn is_auto_clamp_control_sources(&self) -> bool[src]v1_18 only.Gets property::TrackElement::auto-clamp-control-sources.
Returns
Whether the control sources for the child properties of
self are automatically clamped.
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>[src]
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>[src]Gets the control binding that was created for the specified child
property of the track element using
set_control_source(). The given property_name must
be the same name of the child property that was passed to
set_control_source().
property_name
The name of the child property to return the control binding of
Returns
The control binding that was
created for the specified child property of self, or None if
property_name does not correspond to any control binding.
Get the gst::Element that the track element’s underlying nleobject
controls.
Returns
The gst::Element being controlled by the
nleobject that self wraps.
Get the GNonLin object this object is controlling.
Deprecated
use ges_track_element_get_nleobject instead.
Returns
The GNonLin object this object is controlling.
fn track_type(&self) -> TrackType[src]
fn track_type(&self) -> TrackType[src]fn has_internal_source(&self) -> bool[src]
fn has_internal_source(&self) -> bool[src]v1_18 only.v1_18 only.Get whether the given track element is a core track element. That is,
it was created by the create_track_elements GESClipClass 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 GESTitleClip or another UriClip with a different
property::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.
Returns
true if element is a core track element.
Removes the gst::ControlBinding that was created for the specified child
property of the track element using
set_control_source(). The given property_name must
be the same name of the child property that was passed to
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[src]
fn set_active(&self, active: bool) -> bool[src]fn set_auto_clamp_control_sources(&self, auto_clamp: bool)[src]
fn set_auto_clamp_control_sources(&self, auto_clamp: bool)[src]v1_18 only.Sets property::TrackElement::auto-clamp-control-sources. If set to true, this
will immediately clamp all the control sources.
auto_clamp
Whether to automatically clamp the control sources for the
child properties of self
fn set_control_source<P: IsA<ControlSource>>(
&self,
source: &P,
property_name: &str,
binding_type: &str
) -> bool[src]
fn set_control_source<P: IsA<ControlSource>>(
&self,
source: &P,
property_name: &str,
binding_type: &str
) -> bool[src]Creates a gst::ControlBinding for the specified child property of the
track element using the given control source. The given property_name
should refer to an existing child property of the track element, as
used in ges_timeline_element_lookup_child().
If binding_type is “direct”, then the control binding is created with
gst_direct_control_binding_new() using the given control source. If
binding_type is “direct-absolute”, it is created with
gst_direct_control_binding_new_absolute() instead.
source
The control source to bind the child property to
property_name
The name of the child property to control
binding_type
The type of binding to create (“direct” or “direct-absolute”)
Returns
true if the specified child property could be bound to
source, or false if an error occurred.
fn set_has_internal_source(&self, has_internal_source: bool) -> bool[src]
fn set_has_internal_source(&self, has_internal_source: bool) -> bool[src]v1_18 only.Sets property::TrackElement::has-internal-source for the element. If this is
set to false, this method will also set the
property::TimelineElement::in-point of the element to 0 and its
property::TimelineElement::max-duration to GST_CLOCK_TIME_NONE.
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)[src]
fn set_track_type(&self, type_: TrackType)[src]fn connect_control_binding_added<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_control_binding_added<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]This is emitted when a control binding is added to a child property of the track element.
control_binding
The control binding that has been added
fn connect_control_binding_removed<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_control_binding_removed<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]This is emitted when a control binding is removed from a child property of the track element.
control_binding
The control binding that has been removed
fn connect_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]v1_18 only.fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]v1_18 only.fn connect_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]fn connect_track_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]Implementors
fn add_children_props<P: IsA<Element>>(
&self,
element: &P,
wanted_categories: &[&str],
blacklist: &[&str],
whitelist: &[&str]
)[src]v1_18 only.Since 1.18
v1_18 only.v1_18 only.v1_18 only.fn set_control_source<P: IsA<ControlSource>>(
&self,
source: &P,
property_name: &str,
binding_type: &str
) -> bool[src]v1_18 only.fn connect_control_binding_added<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]fn connect_control_binding_removed<F: Fn(&Self, &ControlBinding) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]v1_18 only.v1_18 only.