pub trait TrackElementExt: IsA<TrackElement> + Sealed + 'static {
Show 32 methods // Provided methods fn add_children_props( &self, element: &impl IsA<Element>, 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 child_property(&self, property_name: &str) -> Option<Value> { ... } fn child_property_by_pspec(&self, pspec: impl AsRef<ParamSpec>) -> Value { ... } fn control_binding(&self, property_name: &str) -> Option<ControlBinding> { ... } fn element(&self) -> Option<Element> { ... } fn gnlobject(&self) -> Element { ... } fn nleobject(&self) -> 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 list_children_properties(&self) -> Vec<ParamSpec> { ... } fn lookup_child(&self, prop_name: &str) -> Option<(Element, ParamSpec)> { ... } 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_child_property( &self, property_name: &str, value: &Value, ) -> Result<(), BoolError> { ... } fn set_child_property_by_pspec( &self, pspec: impl AsRef<ParamSpec>, value: &Value, ) { ... } fn set_control_source( &self, source: &impl IsA<ControlSource>, 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

Trait containing all TrackElement methods.

§Implementors

Operation, Source, TrackElement

Provided Methods§

source

fn add_children_props( &self, element: &impl IsA<Element>, 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

source

fn clamp_control_source(&self, property_name: &str)

Clamp the GstTimedValueControlSource for the specified child property to lie between the 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

source

fn edit( &self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64, ) -> Result<(), BoolError>

👎Deprecated: 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

true if the edit of self completed, false on failure.

source

fn is_auto_clamp_control_sources(&self) -> bool

Gets auto-clamp-control-sources.

§Returns

Whether the control sources for the child properties of self are automatically clamped.

source

fn child_property(&self, property_name: &str) -> Option<Value>

In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling [glib::Value::unset()][crate::glib::Value::unset()].

Gets a property of a GstElement contained in self.

Note that ges_track_element_get_child_property is really intended for language bindings, ges_track_element_get_child_properties is much more convenient for C programming.

§Deprecated

Use ges_timeline_element_get_child_property

§property_name

The name of the property

§Returns

true if the property was found, false otherwise.

§value

return location for the property value, it will be initialized if it is initialized with 0

source

fn child_property_by_pspec(&self, pspec: impl AsRef<ParamSpec>) -> Value

Gets a property of a child of self.

§Deprecated

Use ges_timeline_element_get_child_property_by_pspec

§pspec

The glib::ParamSpec that specifies the property you want to get

§Returns
§value

return location for the value

source

fn control_binding(&self, property_name: &str) -> Option<ControlBinding>

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.

source

fn 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.

source

fn gnlobject(&self) -> Element

Get the GNonLin object this object is controlling.

§Deprecated

use ges_track_element_get_nleobject instead.

§Returns

The GNonLin object this object is controlling.

source

fn nleobject(&self) -> Element

Get the nleobject that this element wraps.

§Returns

The nleobject that self wraps.

source

fn track(&self) -> Option<Track>

Get the track for the element.

§Returns

The track that self belongs to, or None if it does not belong to a track.

source

fn track_type(&self) -> TrackType

Gets the track-type for the element.

§Returns

The track-type of self.

source

fn has_internal_source(&self) -> bool

Gets has-internal-source for the element.

§Returns

true if self can have its ‘internal time’ properties set.

source

fn is_active(&self) -> bool

Gets active for the element.

§Returns

true if self is active in its track.

source

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 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 TitleClip or another UriClip with a different 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.

source

fn list_children_properties(&self) -> Vec<ParamSpec>

Gets an array of glib::ParamSpec* for all configurable properties of the children of self.

§Deprecated

Use ges_timeline_element_list_children_properties

§Returns

An array of glib::ParamSpec* which should be freed after use or None if something went wrong.

source

fn lookup_child(&self, prop_name: &str) -> Option<(Element, ParamSpec)>

Looks up which element and pspec would be effected by the given name. If various contained elements have this property name you will get the first one, unless you specify the class name in name.

§Deprecated

Use ges_timeline_element_lookup_child

§prop_name

Name of the property to look up. You can specify the name of the class as such: “ClassName::property-name”, to guarantee that you get the proper GParamSpec in case various GstElement-s contain the same property name. If you don’t do so, you will get the first element found, having this property and the and the corresponding GParamSpec.

§Returns

TRUE if element and pspec could be found. FALSE otherwise. In that case the values for pspec and element are not modified. Unref element after usage.

§element

pointer to a gst::Element that takes the real object to set property on

§pspec

pointer to take the specification describing the property

source

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 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.

source

fn set_active(&self, active: bool) -> bool

Sets active for the element.

§active

Whether self should be active in its track

§Returns

true if the property was toggled.

source

fn set_auto_clamp_control_sources(&self, auto_clamp: bool)

Sets 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

source

fn set_child_property( &self, property_name: &str, value: &Value, ) -> Result<(), BoolError>

Sets a property of a GstElement contained in self.

Note that ges_track_element_set_child_property is really intended for language bindings, ges_track_element_set_child_properties is much more convenient for C programming.

§Deprecated

use ges_timeline_element_set_child_property instead

§property_name

The name of the property

§value

The value

§Returns

true if the property was set, false otherwise.

source

fn set_child_property_by_pspec( &self, pspec: impl AsRef<ParamSpec>, value: &Value, )

Sets a property of a child of self.

§Deprecated

Use ges_timeline_element_set_child_property_by_spec

§pspec

The glib::ParamSpec that specifies the property you want to set

§value

The value

source

fn set_control_source( &self, source: &impl IsA<ControlSource>, property_name: &str, binding_type: &str, ) -> bool

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 TimelineElementExt::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.

source

fn set_has_internal_source(&self, has_internal_source: bool) -> bool

Sets has-internal-source for the element. If this is set to false, this method will also set the in-point of the element to 0 and its 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.

source

fn set_track_type(&self, type_: TrackType)

Sets the track-type for the element.

§type_

The new track-type for self

source

fn connect_control_binding_added<F: Fn(&Self, &ControlBinding) + 'static>( &self, f: F, ) -> SignalHandlerId

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

source

fn connect_control_binding_removed<F: Fn(&Self, &ControlBinding) + 'static>( &self, f: F, ) -> SignalHandlerId

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

source

fn connect_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_track_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§