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.
ElementExt
, GstObjectExt
, glib::object::ObjectExt
Creates an element for handling the given URI.
Whether to create a source or a sink
URI to create an element for
Name of created element, can be None
.
a new element or None
if none
could be created
Performs copy-assignment from source
. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Returns the type identifier of Self
.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
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
Formats the value using the given formatter. Read more