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

Trait containing all TrackElement methods.

Implementors

TrackElement

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

This is supported on crate feature 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

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

This is supported on crate feature v1_18 only.

Gets property::TrackElement::auto-clamp-control-sources.

Returns

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

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.

Get the nleobject that this element wraps.

Returns

The nleobject that self wraps.

Get the property::TrackElement::track for the element.

Returns

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

Gets the property::TrackElement::track-type for the element.

Returns

The track-type of self.

This is supported on crate feature v1_18 only.

Gets property::TrackElement::has-internal-source for the element.

Returns

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

Gets property::TrackElement::active for the element.

Returns

true if self is active in its track.

This is supported on crate feature 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.

Sets property::TrackElement::active for the element.

active

Whether self should be active in its track

Returns

true if the property was toggled.

This is supported on crate feature 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

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.

This is supported on crate feature 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.

Sets the property::TrackElement::track-type for the element.

type_

The new track-type for self

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

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

This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.

Implementors

This is supported on crate feature v1_18 only.
👎 Deprecated:

Since 1.18

This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.