Struct gstreamer::Element[]

pub struct Element(_, _);

GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating Element subclasses.

The name of a Element can be get with gst_element_get_name and set with gst_element_set_name. For speed, GST_ELEMENT_NAME() can be used in the core when using the appropriate locking. Do not use this in plug-ins or applications in order to retain ABI compatibility.

Elements can have pads (of the type Pad). These pads link to pads on other elements. Buffer flow between these linked pads. A Element has a glib::List of Pad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with ElementExt::add_pad and ElementExt::remove_pad.

An existing pad of an element can be retrieved by name with ElementExt::get_static_pad. A new dynamic pad can be created using ElementExt::request_pad with a PadTemplate. An iterator of all pads can be retrieved with ElementExt::iterate_pads.

Elements can be linked through their pads. If the link is straightforward, use the ElementExt::link convenience function to link two elements, or ElementExt::link_many for more elements in a row. Use ElementExt::link_filtered to link two elements constrained by a specified set of Caps. For finer control, use ElementExt::link_pads and ElementExt::link_pads_filtered to specify the pads to link on each element by name.

Each element has a state (see State). You can get and set the state of an element with ElementExt::get_state and ElementExt::set_state. Setting a state triggers a StateChange. To get a string representation of a State, use Element::state_get_name.

You can get and set a Clock on an element using ElementExt::get_clock and ElementExt::set_clock. Some elements can provide a clock for the pipeline if the ElementFlags::ProvideClock flag is set. With the ElementExt::provide_clock method one can retrieve the clock provided by such an element. Not all elements require a clock to operate correctly. If the ElementFlags::RequireClock() flag is set, a clock should be set on the element with ElementExt::set_clock.

Note that clock selection and distribution is normally handled by the toplevel Pipeline so the clock functions are only to be used in very specific situations.

Implements

ElementExt, GstObjectExt, glib::object::ObjectExt

Methods

impl Element
[src]

Creates an element for handling the given URI.

type_

Whether to create a source or a sink

uri

URI to create an element for

elementname

Name of created element, can be None.

Returns

a new element or None if none could be created

impl Element
[src]

Trait Implementations

impl IsA<Element> for Bin

impl Clone for Element

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Element

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

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

impl Ord for Element

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 Element

Returns the type identifier of Self.

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

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

This method tests for !=.

impl Eq for Element

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

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 Element

Formats the value using the given formatter. Read more

impl IsA<Object> for Element

impl IsA<Object> for Element

impl Send for Element
[src]

impl Sync for Element
[src]

impl IsA<Element> for Pipeline

impl IsA<Element> for TagSetter

impl IsA<Element> for TocSetter