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
impl CapsFeatures
sourcepub fn new(features: impl IntoIterator<Item = impl IntoGStr>) -> Self
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
pub fn from_quarks(features: impl IntoIterator<Item = Quark>) -> Self
sourcepub fn new_any() -> Self
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>§
pub fn as_ptr(&self) -> *const GstCapsFeatures
pub fn as_mut_ptr(&self) -> *mut GstCapsFeatures
pub fn is_empty(&self) -> bool
pub fn is_any(&self) -> bool
pub fn contains(&self, feature: impl IntoGStr) -> bool
pub fn contains_quark(&self, feature: Quark) -> bool
pub fn size(&self) -> usize
pub fn nth(&self, idx: usize) -> Option<&GStr>
pub fn nth_quark(&self, idx: usize) -> Option<Quark>
pub fn add(&mut self, feature: impl IntoGStr)
pub fn remove(&mut self, feature: impl IntoGStr)
pub fn add_from_quark(&mut self, feature: Quark)
pub fn remove_by_quark(&mut self, feature: Quark)
pub fn iter(&self) -> Iter<'_>
pub fn is_equal(&self, other: &CapsFeaturesRef) -> bool
Trait Implementations§
source§impl AsMut<CapsFeaturesRef> for CapsFeatures
impl AsMut<CapsFeaturesRef> for CapsFeatures
source§fn as_mut(&mut self) -> &mut CapsFeaturesRef
fn as_mut(&mut self) -> &mut CapsFeaturesRef
source§impl AsRef<CapsFeaturesRef> for CapsFeatures
impl AsRef<CapsFeaturesRef> for CapsFeatures
source§fn as_ref(&self) -> &CapsFeaturesRef
fn as_ref(&self) -> &CapsFeaturesRef
source§impl Borrow<CapsFeaturesRef> for CapsFeatures
impl Borrow<CapsFeaturesRef> for CapsFeatures
source§fn borrow(&self) -> &CapsFeaturesRef
fn borrow(&self) -> &CapsFeaturesRef
source§impl BorrowMut<CapsFeaturesRef> for CapsFeatures
impl BorrowMut<CapsFeaturesRef> for CapsFeatures
source§fn borrow_mut(&mut self) -> &mut CapsFeaturesRef
fn borrow_mut(&mut self) -> &mut CapsFeaturesRef
source§impl Clone for CapsFeatures
impl Clone for CapsFeatures
source§impl Debug for CapsFeatures
impl Debug for CapsFeatures
source§impl Deref for CapsFeatures
impl Deref for CapsFeatures
§type Target = CapsFeaturesRef
type Target = CapsFeaturesRef
source§fn deref(&self) -> &CapsFeaturesRef
fn deref(&self) -> &CapsFeaturesRef
source§impl DerefMut for CapsFeatures
impl DerefMut for CapsFeatures
source§fn deref_mut(&mut self) -> &mut CapsFeaturesRef
fn deref_mut(&mut self) -> &mut CapsFeaturesRef
source§impl<'de> Deserialize<'de> for CapsFeatures
impl<'de> Deserialize<'de> for CapsFeatures
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl Display for CapsFeatures
impl Display for CapsFeatures
source§impl Drop for CapsFeatures
impl Drop for CapsFeatures
source§impl<'a> From<&'a GStr> for CapsFeatures
impl<'a> From<&'a GStr> for CapsFeatures
source§impl<'a> From<&'a str> for CapsFeatures
impl<'a> From<&'a str> for CapsFeatures
source§impl From<CapsFeatures> for Value
impl From<CapsFeatures> for Value
source§fn from(v: CapsFeatures) -> Value
fn from(v: CapsFeatures) -> Value
source§impl From<Quark> for CapsFeatures
impl From<Quark> for CapsFeatures
source§impl FromGlibPtrFull<*const GstCapsFeatures> for CapsFeatures
impl FromGlibPtrFull<*const GstCapsFeatures> for CapsFeatures
source§unsafe fn from_glib_full(ptr: *const GstCapsFeatures) -> Self
unsafe fn from_glib_full(ptr: *const GstCapsFeatures) -> Self
source§impl FromGlibPtrFull<*mut GstCapsFeatures> for CapsFeatures
impl FromGlibPtrFull<*mut GstCapsFeatures> for CapsFeatures
source§unsafe fn from_glib_full(ptr: *mut GstCapsFeatures) -> Self
unsafe fn from_glib_full(ptr: *mut GstCapsFeatures) -> Self
source§impl FromGlibPtrNone<*const GstCapsFeatures> for CapsFeatures
impl FromGlibPtrNone<*const GstCapsFeatures> for CapsFeatures
source§unsafe fn from_glib_none(ptr: *const GstCapsFeatures) -> Self
unsafe fn from_glib_none(ptr: *const GstCapsFeatures) -> Self
source§impl FromGlibPtrNone<*mut GstCapsFeatures> for CapsFeatures
impl FromGlibPtrNone<*mut GstCapsFeatures> for CapsFeatures
source§unsafe fn from_glib_none(ptr: *mut GstCapsFeatures) -> Self
unsafe fn from_glib_none(ptr: *mut GstCapsFeatures) -> Self
source§impl<'a> FromIterator<&'a GStr> for CapsFeatures
impl<'a> FromIterator<&'a GStr> for CapsFeatures
source§impl<'a> FromIterator<&'a str> for CapsFeatures
impl<'a> FromIterator<&'a str> for CapsFeatures
source§impl FromIterator<GString> for CapsFeatures
impl FromIterator<GString> for CapsFeatures
source§impl FromIterator<Quark> for CapsFeatures
impl FromIterator<Quark> for CapsFeatures
source§impl FromIterator<String> for CapsFeatures
impl FromIterator<String> for CapsFeatures
source§impl FromStr for CapsFeatures
impl FromStr for CapsFeatures
source§impl<'a> FromValue<'a> for CapsFeatures
impl<'a> FromValue<'a> for CapsFeatures
§type Checker = GenericValueTypeOrNoneChecker<CapsFeatures>
type Checker = GenericValueTypeOrNoneChecker<CapsFeatures>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl GlibPtrDefault for CapsFeatures
impl GlibPtrDefault for CapsFeatures
type GlibType = *mut GstCapsFeatures
source§impl IntoGlibPtr<*mut GstCapsFeatures> for CapsFeatures
impl IntoGlibPtr<*mut GstCapsFeatures> for CapsFeatures
source§unsafe fn into_glib_ptr(self) -> *mut GstCapsFeatures
unsafe fn into_glib_ptr(self) -> *mut GstCapsFeatures
source§impl Serialize for CapsFeatures
impl Serialize for CapsFeatures
source§impl StaticType for CapsFeatures
impl StaticType for CapsFeatures
source§fn static_type() -> Type
fn static_type() -> Type
Self
.source§impl<'a> ToGlibPtr<'a, *const GstCapsFeatures> for CapsFeatures
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>
fn to_glib_none(&'a self) -> Stash<'a, *const GstCapsFeatures, Self>
source§fn to_glib_full(&self) -> *const GstCapsFeatures
fn to_glib_full(&self) -> *const GstCapsFeatures
source§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
source§impl<'a> ToGlibPtr<'a, *mut GstCapsFeatures> for CapsFeatures
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>
fn to_glib_none(&'a self) -> Stash<'a, *mut GstCapsFeatures, Self>
source§fn to_glib_full(&self) -> *mut GstCapsFeatures
fn to_glib_full(&self) -> *mut GstCapsFeatures
source§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
source§impl<'a> ToGlibPtrMut<'a, *mut GstCapsFeatures> for CapsFeatures
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>
fn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstCapsFeatures, Self>
source§impl ToValue for CapsFeatures
impl ToValue for CapsFeatures
source§impl ToValueOptional for CapsFeatures
impl ToValueOptional for CapsFeatures
source§impl ValueType for CapsFeatures
impl ValueType for CapsFeatures
§type Type = CapsFeatures
type Type = CapsFeatures
Type
from. Read moreimpl Send for CapsFeatures
impl Sync for CapsFeatures
impl TransparentPtrType for CapsFeatures
impl ValueTypeOptional for CapsFeatures
Auto Trait Implementations§
impl Freeze for CapsFeatures
impl RefUnwindSafe for CapsFeatures
impl Unpin for CapsFeatures
impl UnwindSafe for CapsFeatures
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.