Trait gstreamer::prelude::GstBinExt [−][src]
pub trait GstBinExt: 'static {}Show methods
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), BoolError>; fn find_unlinked_pad(&self, direction: PadDirection) -> Option<Pad>; fn by_interface(&self, iface: Type) -> Option<Element>; fn by_name(&self, name: &str) -> Option<Element>; fn by_name_recurse_up(&self, name: &str) -> Option<Element>; fn suppressed_flags(&self) -> ElementFlags; fn recalculate_latency(&self) -> Result<(), BoolError>; fn remove<P: IsA<Element>>(&self, element: &P) -> Result<(), BoolError>; fn set_suppressed_flags(&self, flags: ElementFlags); fn sync_children_states(&self) -> Result<(), BoolError>; fn is_async_handling(&self) -> bool; fn set_async_handling(&self, async_handling: bool); fn is_message_forward(&self) -> bool; fn set_message_forward(&self, message_forward: bool); fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
Expand description
Required methods
Adds the given element to the bin. Sets the element’s parent, and thus takes ownership of the element. An element can only be added to one bin.
If the element’s pads are linked to other pads, the pads will be unlinked before the element is added to the bin.
When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with
ElementExt::set_state()
, or useElementExt::sync_state_with_parent()
. The bin or pipeline will not take care of this for you.
element
the Element
to add
Returns
true
if the element could be added, false
if
the bin does not want to accept the element.
fn find_unlinked_pad(&self, direction: PadDirection) -> Option<Pad>
[src]
fn find_unlinked_pad(&self, direction: PadDirection) -> Option<Pad>
[src]Recursively looks for elements with an unlinked pad of the given
direction within the specified bin and returns an unlinked pad
if one is found, or None
otherwise. If a pad is found, the caller
owns a reference to it and should use gst_object_unref()
on the
pad when it is not needed any longer.
direction
whether to look for an unlinked source or sink pad
Returns
unlinked pad of the given direction.
fn by_interface(&self, iface: Type) -> Option<Element>
[src]
fn by_interface(&self, iface: Type) -> Option<Element>
[src]Looks for an element inside the bin that implements the given
interface. If such an element is found, it returns the element.
You can cast this element to the given interface afterwards. If you want
all elements that implement the interface, use
GstBinExtManual::iterate_all_by_interface()
. This function recurses into child bins.
iface
the GType
of an interface
Returns
A Element
inside the bin
implementing the interface
fn by_name_recurse_up(&self, name: &str) -> Option<Element>
[src]
fn by_name_recurse_up(&self, name: &str) -> Option<Element>
[src]fn suppressed_flags(&self) -> ElementFlags
[src]
fn suppressed_flags(&self) -> ElementFlags
[src]v1_10
only.Returns
the bin’s suppressed ElementFlags
.
fn recalculate_latency(&self) -> Result<(), BoolError>
[src]
fn recalculate_latency(&self) -> Result<(), BoolError>
[src]Queries self
for the current latency and reconfigures this latency on all the
elements using a LATENCY event.
This method is typically called on the pipeline when a GST_MESSAGE_LATENCY
is posted on the bus.
This function simply emits the signal::Bin::do-latency
signal so any custom latency
calculations will be performed.
Returns
true
if the latency could be queried and reconfigured.
Removes the element from the bin, unparenting it as well.
Unparenting the element means that the element will be dereferenced,
so if the bin holds the only reference to the element, the element
will be freed in the process of removing it from the bin. If you
want the element to still exist after removing, you need to call
gst_object_ref()
before removing it from the bin.
If the element’s pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.
element
the Element
to remove
Returns
true
if the element could be removed, false
if
the bin does not want to remove the element.
fn set_suppressed_flags(&self, flags: ElementFlags)
[src]
fn set_suppressed_flags(&self, flags: ElementFlags)
[src]v1_10
only.Suppresses the given flags on the bin. ElementFlags
of a
child element are propagated when it is added to the bin.
When suppressed flags are set, those specified flags will
not be propagated to the bin.
flags
the ElementFlags
to suppress
fn sync_children_states(&self) -> Result<(), BoolError>
[src]
fn sync_children_states(&self) -> Result<(), BoolError>
[src]Synchronizes the state of every child of self
with the state
of self
. See also ElementExt::sync_state_with_parent()
.
Returns
true
if syncing the state was successful for all children,
otherwise false
.
fn is_async_handling(&self) -> bool
[src]
fn is_async_handling(&self) -> bool
[src]If set to true
, the bin will handle asynchronous state changes.
This should be used only if the bin subclass is modifying the state
of its children on its own.
fn set_async_handling(&self, async_handling: bool)
[src]
fn set_async_handling(&self, async_handling: bool)
[src]If set to true
, the bin will handle asynchronous state changes.
This should be used only if the bin subclass is modifying the state
of its children on its own.
fn is_message_forward(&self) -> bool
[src]
fn is_message_forward(&self) -> bool
[src]Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.
The messages are converted to an ELEMENT message with the bin as the
source. The structure of the message is named GstBinForwarded
and contains
a field named message
of type GST_TYPE_MESSAGE
that contains the original
forwarded message.
fn set_message_forward(&self, message_forward: bool)
[src]
fn set_message_forward(&self, message_forward: bool)
[src]Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.
The messages are converted to an ELEMENT message with the bin as the
source. The structure of the message is named GstBinForwarded
and contains
a field named message
of type GST_TYPE_MESSAGE
that contains the original
forwarded message.
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]v1_10
only.fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]v1_10
only.fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]Implementors
v1_10
only.v1_10
only.fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]v1_10
only.fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]v1_10
only.fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]