Trait gstreamer_editing_services::prelude::GESContainerExt[][src]

pub trait GESContainerExt: 'static {
    fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), BoolError>;
fn edit(
        &self,
        layers: &[Layer],
        new_layer_priority: i32,
        mode: EditMode,
        edge: Edge,
        position: u64
    ) -> Result<(), BoolError>;
fn children(&self, recursive: bool) -> Vec<TimelineElement>;
fn remove<P: IsA<TimelineElement>>(
        &self,
        child: &P
    ) -> Result<(), BoolError>;
fn ungroup(&self, recursive: bool) -> Vec<Container>;
fn height(&self) -> u32;
fn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_child_removed<F: Fn(&Self, &TimelineElement) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all Container methods.

Implementors

Clip, Container, Group

Required methods

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the property::TimelineElement::parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.

Additionally, the children properties of the newly added element will be shared with the container, meaning they can also be read and set using TimelineElementExt::child_property() and TimelineElementExt::set_child_property() on the container.

child

The element to add as a child

Returns

true if child was successfully added to self.

👎 Deprecated:

Since 1.18

Edits the container within its timeline.

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

new_layer_priority

The priority/index of the layer self should be moved to. -1 means no move

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.

Get the list of timeline elements contained in the container. If recursive is true, and the container contains other containers as children, then their children will be added to the list, in addition to themselves, and so on.

recursive

Whether to recursively get children in self

Returns

The list of TimelineElement-s contained in self.

Removes a timeline element from the container. The element will no longer be controlled by the container.

child

The child to remove

Returns

true if child was successfully removed from self.

Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A Group will simply split into its children. A Clip will split into one Clip per TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the TrackElement-s from the original clip with a matching property::TrackElement::track-type.

If recursive is true, and the container contains other containers as children, then they will also be ungrouped, and so on.

recursive

Whether to recursively ungroup self

Returns

The list of new Container-s created from the splitting of self.

The span of the container’s children’s property::TimelineElement::priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container’s children (maximum - minimum + 1).

Will be emitted after a child is added to the container. Usually, you should connect with g_signal_connect_after() since the signal may be stopped internally.

element

The child that was added

Will be emitted after a child is removed from the container.

element

The child that was removed

Implementors

👎 Deprecated:

Since 1.18