Trait gstreamer::ChildProxyExt[][src]

pub trait ChildProxyExt {
    fn child_added<P: IsA<Object>>(&self, child: &P, name: &str);
fn child_removed<P: IsA<Object>>(&self, child: &P, name: &str);
fn get_child_by_index(&self, index: u32) -> Option<Object>;
fn get_child_by_name(&self, name: &str) -> Option<Object>;
fn get_children_count(&self) -> u32;
fn connect_child_added<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_child_removed<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all ChildProxy methods.

Implementors

Bin, ChildProxy, Pipeline

Required Methods

Emits the "child-added" signal.

child

the newly added child

name

the name of the new child

Emits the "child-removed" signal.

child

the removed child

name

the name of the old child

Fetches a child by its number.

index

the child's position in the child list

Returns

the child object or None if not found (index too high). Unref after usage.

MT safe.

Looks up a child element by the given name.

This virtual method has a default implementation that uses Object together with GstObjectExt::get_name. If the interface is to be used with GObjects, this methods needs to be overridden.

name

the child's name

Returns

the child object or None if not found. Unref after usage.

MT safe.

Gets the number of child objects this parent contains.

Returns

the number of child objects

MT safe.

Will be emitted after the object was added to the child_proxy.

object

the gobject::Object that was added

name

the name of the new child

Will be emitted after the object was removed from the child_proxy.

object

the gobject::Object that was removed

name

the name of the old child

Implementors