[][src]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 GstBinExt::add. You can remove elements with GstBinExt::remove.

An element can be retrieved from a bin with GstBinExt::get_by_name, using the elements name. GstBinExt::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 GstBinExt::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

GstBinExt, ElementExt, GstObjectExt, glib::object::ObjectExt, ChildProxyExt, ElementExtManual, ChildProxyExtManual

Implementations

impl Bin[src]

pub fn new(name: Option<&str>) -> 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[src]

impl Debug for Bin[src]

impl Eq for Bin[src]

impl Hash for Bin[src]

impl IsA<Bin> for Pipeline[src]

impl IsA<ChildProxy> for Bin[src]

impl IsA<Element> for Bin[src]

impl IsA<Object> for Bin[src]

impl Ord for Bin[src]

impl<T: ObjectType> PartialEq<T> for Bin[src]

impl<T: ObjectType> PartialOrd<T> for Bin[src]

impl Send for Bin[src]

impl StaticType for Bin[src]

impl Sync for Bin[src]

Auto Trait Implementations

impl RefUnwindSafe for Bin

impl Unpin for Bin

impl UnwindSafe for Bin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.