gstreamermm
1.10.0
|
A set of features in caps. More...
#include <gstreamermm/capsfeatures.h>
Public Member Functions | |
CapsFeatures () | |
CapsFeatures (GstCapsFeatures* gobject, bool make_a_copy=true) | |
CapsFeatures (const CapsFeatures& other) | |
CapsFeatures& | operator= (const CapsFeatures& other) |
CapsFeatures (CapsFeatures&& other) noexcept | |
CapsFeatures& | operator= (CapsFeatures&& other) noexcept |
~CapsFeatures () noexcept | |
void | swap (CapsFeatures& other) noexcept |
GstCapsFeatures* | gobj () |
Provides access to the underlying C instance. More... | |
const GstCapsFeatures* | gobj () const |
Provides access to the underlying C instance. More... | |
GstCapsFeatures* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. More... | |
CapsFeatures (std::initializer_list< Glib::ustring > features) | |
Creates a new Gst::CapsFeatures with the given features. More... | |
Glib::ustring | to_string () const |
Converts features to a human-readable string representation. More... | |
bool | set_parent_refcount (gint* refcount) |
Sets the parent_refcount field of Gst::CapsFeatures. More... | |
bool | is_equal (const Gst::CapsFeatures& features2) const |
Check if features1 and features2 are equal. More... | |
bool | is_any () const |
Check if features is Gst::CAPS_FEATURES_ANY. More... | |
bool | contains (const Glib::ustring& feature) const |
Check if features contains feature. More... | |
bool | contains (GQuark feature) const |
Check if features contains feature. More... | |
guint | get_size () const |
Returns the number of features in features. More... | |
Glib::ustring | get_nth (guint i) const |
Returns the i-th feature of features. More... | |
GQuark | get_nth_id (guint i) const |
Returns the i-th feature of features. More... | |
void | add (const Glib::ustring& feature) |
Adds feature to features. More... | |
void | add (GQuark feature) |
Adds feature to features. More... | |
void | remove (const Glib::ustring& feature) |
Removes feature from features. More... | |
void | remove (GQuark feature) |
Removes feature from features. More... | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Gst::CapsFeatures | create_any () |
Creates a new, ANY Gst::CapsFeatures. More... | |
static Gst::CapsFeatures | create_from_string (const Glib::ustring& features) |
Creates a Gst::CapsFeatures from a string representation. More... | |
static Glib::ustring | memory_system_memory () |
Constant for system memory feature name. More... | |
Protected Attributes | |
GstCapsFeatures* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
void | swap (CapsFeatures& lhs, CapsFeatures& rhs) noexcept |
Gst::CapsFeatures | wrap (GstCapsFeatures* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
A set of features in caps.
Gst::CapsFeatures can optionally be set on a Gst::Caps to add requirements for additional features for a specific Gst::Structure. Caps structures with the same name but with a non-equal set of caps features are not compatible. If a pad supports multiple sets of features it has to add multiple equal structures with different feature sets to the caps.
Empty Gst::CapsFeatures are equivalent with the Gst::CapsFeatures that only contain Gst::CapsFeatures::memory_system_memory(). ANY Gst::CapsFeatures as created by Gst::CapsFeatures::create_any() are equal to any other Gst::CapsFeatures and can be used to specify that any Gst::CapsFeatures would be supported, e.g. for elements that don't touch buffer memory. Gst::Caps with ANY Gst::CapsFeatures are considered non-fixed and during negotiation some Gst::CapsFeatures have to be selected.
Examples for caps features would be the requirement of a specific Gst::Memory types or the requirement of having a specific Gst::Meta on the buffer. Features are given as a string of the format "memory:GstMemoryTypeName" or "meta:GstMetaAPIName".
Last reviewed on 2016-05-16 (1.8.0)
Since: 1.2
Gst::CapsFeatures::CapsFeatures | ( | ) |
|
explicit |
Gst::CapsFeatures::CapsFeatures | ( | const CapsFeatures& | other | ) |
|
noexcept |
|
noexcept |
|
explicit |
Creates a new Gst::CapsFeatures with the given features.
features | name of features to set. |
void Gst::CapsFeatures::add | ( | const Glib::ustring & | feature | ) |
Adds feature to features.
feature | A feature. |
void Gst::CapsFeatures::add | ( | GQuark | feature | ) |
Adds feature to features.
feature | A feature. |
bool Gst::CapsFeatures::contains | ( | const Glib::ustring & | feature | ) | const |
Check if features contains feature.
feature | A feature. |
true
if features contains feature. bool Gst::CapsFeatures::contains | ( | GQuark | feature | ) | const |
Check if features contains feature.
feature | A feature. |
true
if features contains feature.
|
static |
Creates a new, ANY Gst::CapsFeatures.
This will be equal to any other Gst::CapsFeatures but caps with these are unfixed.
Free-function: gst_caps_features_free
|
static |
Creates a Gst::CapsFeatures from a string representation.
Free-function: gst_caps_features_free
features | A string representation of a Gst::CapsFeatures. |
nullptr
when the string could not be parsed. Free with free() after use. Glib::ustring Gst::CapsFeatures::get_nth | ( | guint | i | ) | const |
Returns the i-th feature of features.
i | Index of the feature. |
GQuark Gst::CapsFeatures::get_nth_id | ( | guint | i | ) | const |
Returns the i-th feature of features.
i | Index of the feature. |
guint Gst::CapsFeatures::get_size | ( | ) | const |
Returns the number of features in features.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C instance.
|
inline |
Provides access to the underlying C instance.
GstCapsFeatures* Gst::CapsFeatures::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
bool Gst::CapsFeatures::is_any | ( | ) | const |
Check if features is Gst::CAPS_FEATURES_ANY.
true
if features is Gst::CAPS_FEATURES_ANY. bool Gst::CapsFeatures::is_equal | ( | const Gst::CapsFeatures& | features2 | ) | const |
Check if features1 and features2 are equal.
features2 | A Gst::CapsFeatures. |
true
if features1 and features2 are equal.
|
static |
Constant for system memory feature name.
CapsFeatures& Gst::CapsFeatures::operator= | ( | const CapsFeatures& | other | ) |
|
noexcept |
void Gst::CapsFeatures::remove | ( | const Glib::ustring & | feature | ) |
Removes feature from features.
feature | A feature. |
void Gst::CapsFeatures::remove | ( | GQuark | feature | ) |
Removes feature from features.
feature | A feature. |
bool Gst::CapsFeatures::set_parent_refcount | ( | gint * | refcount | ) |
Sets the parent_refcount field of Gst::CapsFeatures.
This field is used to determine whether a caps features is mutable or not. This function should only be called by code implementing parent objects of Gst::CapsFeatures, as described in the MT Refcounting section of the design documents.
refcount | A pointer to the parent's refcount. |
true
if the parent refcount could be set.
|
noexcept |
Glib::ustring Gst::CapsFeatures::to_string | ( | ) | const |
Converts features to a human-readable string representation.
For debugging purposes its easier to do something like this:
[C example ellipted] This prints the features in human readable form.
|
related |
lhs | The left-hand side |
rhs | The right-hand side |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
|
protected |