[][src]Trait gstreamer_editing_services::GESContainerExt

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 get_children(&self, recursive: bool) -> Vec<TimelineElement>;
fn remove<P: IsA<TimelineElement>>(
        &self,
        child: &P
    ) -> Result<(), BoolError>;
fn ungroup(&self, recursive: bool) -> Vec<Container>;
fn get_property_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_property_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Container methods.

Implementors

Clip, Container, Group

Required methods

fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), BoolError>

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the 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::get_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.

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

👎 Deprecated

Edits the container within its timeline.

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

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.

fn get_children(&self, recursive: bool) -> Vec<TimelineElement>

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.

fn remove<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), BoolError>

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.

fn ungroup(&self, recursive: bool) -> Vec<Container>

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

fn get_property_height(&self) -> u32

The span of the container's children's 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).

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

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

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

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

element

The child that was removed

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

Loading content...

Implementors

impl<O: IsA<Container>> GESContainerExt for O[src]

Loading content...