Struct gstreamer::Bin[]

pub struct Bin(_, _);

Bin is an element that can contain other Element, allowing them to be managed as a group. Pads from the child elements can be ghosted to the bin, see GhostPad. This makes the bin look like any other elements and enables creation of higher-level abstraction elements.

A new Bin is created with Bin::new. Use a Pipeline instead if you want to create a toplevel bin because a normal bin doesn't have a bus or handle clock distribution of its own.

After the bin has been created you will typically add elements to it with BinExt::add. You can remove elements with BinExt::remove.

An element can be retrieved from a bin with BinExt::get_by_name, using the elements name. BinExt::get_by_name_recurse_up is mainly used for internal purposes and will query the parent bins when the element is not found in the current bin.

An iterator of elements in a bin can be retrieved with BinExt::iterate_elements. Various other iterators exist to retrieve the elements in a bin.

GstObjectExt::unref is used to drop your reference to the bin.

The Bin::element-added signal is fired whenever a new element is added to the bin. Likewise the Bin::element-removed signal is fired whenever an element is removed from the bin.

Notes

A Bin internally intercepts every Message posted by its children and implements the following default behaviour for each of them:

A Bin implements the following default behaviour for answering to a Query:

A Bin will by default forward any event sent to it to all sink (EventTypeFlags::Downstream) or source (EventTypeFlags::Upstream) elements depending on the event type. If all the elements return true, the bin will also return true, else false is returned. If no elements of the required type are in the bin, the event handler will return true.

Implements

BinExt, ElementExt, GstObjectExt, glib::object::ObjectExt, ChildProxyExt

Methods

impl Bin
[src]

Creates a new bin with the given name.

name

the name of the new bin

Returns

a new Bin

Trait Implementations

impl Clone for Bin

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Bin

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Bin

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl StaticType for Bin

Returns the type identifier of Self.

impl<T: IsA<Object>> PartialEq<T> for Bin

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Bin

impl<T: IsA<Object>> PartialOrd<T> for Bin

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for Bin

Formats the value using the given formatter. Read more

impl IsA<Element> for Bin

impl IsA<Object> for Bin

impl IsA<ChildProxy> for Bin

impl IsA<Object> for Bin

impl Send for Bin
[src]

impl Sync for Bin
[src]

impl IsA<Bin> for Pipeline