Struct gstreamer::CapsFeatures

source ·
pub struct CapsFeatures(/* private fields */);
Expand description

CapsFeatures can optionally be set on a Caps to add requirements for additional features for a specific 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 CapsFeatures are equivalent with the CapsFeatures that only contain GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANY CapsFeatures as created by new_any() are equal to any other CapsFeatures and can be used to specify that any CapsFeatures would be supported, e.g. for elements that don’t touch buffer memory. Caps with ANY CapsFeatures are considered non-fixed and during negotiation some CapsFeatures have to be selected.

Examples for caps features would be the requirement of a specific Memory types or the requirement of having a specific GstMeta on the buffer. Features are given as a string of the format memory:GstMemoryTypeName or meta:GstMetaAPIName.

Implementations§

source§

impl CapsFeatures

source

pub fn new(features: impl IntoIterator<Item = impl IntoGStr>) -> Self

Creates a new CapsFeatures with the given features. The last argument must be None.

§feature1

name of first feature to set

§Returns

a new, empty CapsFeatures

source

pub fn from_quarks(features: impl IntoIterator<Item = Quark>) -> Self

source

pub fn new_empty() -> Self

Creates a new, empty CapsFeatures.

§Returns

a new, empty CapsFeatures

source

pub fn new_any() -> Self

Creates a new, ANY CapsFeatures. This will be equal to any other CapsFeatures but caps with these are unfixed.

§Returns

a new, ANY CapsFeatures

Methods from Deref<Target = CapsFeaturesRef>§

source

pub fn as_ptr(&self) -> *const GstCapsFeatures

source

pub fn as_mut_ptr(&self) -> *mut GstCapsFeatures

source

pub fn is_empty(&self) -> bool

source

pub fn is_any(&self) -> bool

source

pub fn contains(&self, feature: impl IntoGStr) -> bool

source

pub fn contains_quark(&self, feature: Quark) -> bool

source

pub fn size(&self) -> usize

source

pub fn nth(&self, idx: usize) -> Option<&GStr>

source

pub fn nth_quark(&self, idx: usize) -> Option<Quark>

source

pub fn add(&mut self, feature: impl IntoGStr)

source

pub fn remove(&mut self, feature: impl IntoGStr)

source

pub fn add_from_quark(&mut self, feature: Quark)

source

pub fn remove_by_quark(&mut self, feature: Quark)

source

pub fn iter(&self) -> Iter<'_>

source

pub fn is_equal(&self, other: &CapsFeaturesRef) -> bool

Trait Implementations§

source§

impl AsMut<CapsFeaturesRef> for CapsFeatures

source§

fn as_mut(&mut self) -> &mut CapsFeaturesRef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<CapsFeaturesRef> for CapsFeatures

source§

fn as_ref(&self) -> &CapsFeaturesRef

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<CapsFeaturesRef> for CapsFeatures

source§

fn borrow(&self) -> &CapsFeaturesRef

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<CapsFeaturesRef> for CapsFeatures

source§

fn borrow_mut(&mut self) -> &mut CapsFeaturesRef

Mutably borrows from an owned value. Read more
source§

impl Clone for CapsFeatures

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CapsFeatures

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for CapsFeatures

§

type Target = CapsFeaturesRef

The resulting type after dereferencing.
source§

fn deref(&self) -> &CapsFeaturesRef

Dereferences the value.
source§

impl DerefMut for CapsFeatures

source§

fn deref_mut(&mut self) -> &mut CapsFeaturesRef

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for CapsFeatures

source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for CapsFeatures

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for CapsFeatures

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> From<&'a GStr> for CapsFeatures

source§

fn from(value: &'a GStr) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for CapsFeatures

source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a, const N: usize> From<[&'a GStr; N]> for CapsFeatures

source§

fn from(value: [&'a GStr; N]) -> Self

Converts to this type from the input type.
source§

impl<'a, const N: usize> From<[&'a str; N]> for CapsFeatures

source§

fn from(value: [&'a str; N]) -> Self

Converts to this type from the input type.
source§

impl<const N: usize> From<[GString; N]> for CapsFeatures

source§

fn from(value: [GString; N]) -> Self

Converts to this type from the input type.
source§

impl<const N: usize> From<[Quark; N]> for CapsFeatures

source§

fn from(value: [Quark; N]) -> Self

Converts to this type from the input type.
source§

impl<const N: usize> From<[String; N]> for CapsFeatures

source§

fn from(value: [String; N]) -> Self

Converts to this type from the input type.
source§

impl From<CapsFeatures> for Value

source§

fn from(v: CapsFeatures) -> Value

Converts to this type from the input type.
source§

impl From<Quark> for CapsFeatures

source§

fn from(value: Quark) -> Self

Converts to this type from the input type.
source§

impl FromGlibPtrFull<*const GstCapsFeatures> for CapsFeatures

source§

impl FromGlibPtrFull<*mut GstCapsFeatures> for CapsFeatures

source§

impl FromGlibPtrNone<*const GstCapsFeatures> for CapsFeatures

source§

impl FromGlibPtrNone<*mut GstCapsFeatures> for CapsFeatures

source§

impl<'a> FromIterator<&'a GStr> for CapsFeatures

source§

fn from_iter<T: IntoIterator<Item = &'a GStr>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<'a> FromIterator<&'a str> for CapsFeatures

source§

fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<GString> for CapsFeatures

source§

fn from_iter<T: IntoIterator<Item = GString>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Quark> for CapsFeatures

source§

fn from_iter<T: IntoIterator<Item = Quark>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<String> for CapsFeatures

source§

fn from_iter<T: IntoIterator<Item = String>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromStr for CapsFeatures

§

type Err = BoolError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl<'a> FromValue<'a> for CapsFeatures

§

type Checker = GenericValueTypeOrNoneChecker<CapsFeatures>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl GlibPtrDefault for CapsFeatures

source§

impl IntoGlibPtr<*mut GstCapsFeatures> for CapsFeatures

source§

unsafe fn into_glib_ptr(self) -> *mut GstCapsFeatures

Transfer: full.
source§

impl Serialize for CapsFeatures

source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
source§

impl StaticType for CapsFeatures

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl<'a> ToGlibPtr<'a, *const GstCapsFeatures> for CapsFeatures

§

type Storage = PhantomData<&'a CapsFeatures>

source§

fn to_glib_none(&'a self) -> Stash<'a, *const GstCapsFeatures, Self>

Transfer: none. Read more
source§

fn to_glib_full(&self) -> *const GstCapsFeatures

Transfer: full. Read more
source§

fn to_glib_container(&'a self) -> Stash<'a, P, Self>

Transfer: container. Read more
source§

impl<'a> ToGlibPtr<'a, *mut GstCapsFeatures> for CapsFeatures

§

type Storage = PhantomData<&'a CapsFeatures>

source§

fn to_glib_none(&'a self) -> Stash<'a, *mut GstCapsFeatures, Self>

Transfer: none. Read more
source§

fn to_glib_full(&self) -> *mut GstCapsFeatures

Transfer: full. Read more
source§

fn to_glib_container(&'a self) -> Stash<'a, P, Self>

Transfer: container. Read more
source§

impl<'a> ToGlibPtrMut<'a, *mut GstCapsFeatures> for CapsFeatures

§

type Storage = PhantomData<&'a mut CapsFeatures>

source§

fn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstCapsFeatures, Self>

Transfer: none. Read more
source§

impl ToValue for CapsFeatures

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
source§

impl ToValueOptional for CapsFeatures

source§

fn to_value_optional(s: Option<&Self>) -> Value

Convert an Option to a Value.
source§

impl ValueType for CapsFeatures

§

type Type = CapsFeatures

Type to get the Type from. Read more
source§

impl Send for CapsFeatures

source§

impl Sync for CapsFeatures

source§

impl TransparentPtrType for CapsFeatures

source§

impl ValueTypeOptional for CapsFeatures

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> TransparentType for T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,