Struct gstreamer::caps::Caps [−][src]
pub struct Caps { /* fields omitted */ }
Implementations
impl Caps
[src]
impl Caps
[src]pub unsafe fn from_glib_none(ptr: *const GstCaps) -> Self
[src]
pub unsafe fn from_glib_full(ptr: *const GstCaps) -> Self
[src]
pub unsafe fn from_glib_borrow(ptr: *const GstCaps) -> Borrowed<Self>
[src]
pub unsafe fn replace_ptr(&mut self, ptr: *mut GstCaps)
[src]
pub fn make_mut(&mut self) -> &mut CapsRef
[src]
pub fn get_mut(&mut self) -> Option<&mut CapsRef>
[src]
pub fn is_writable(&self) -> bool
[src]
pub unsafe fn into_ptr(self) -> *mut GstCaps
[src]
impl Caps
[src]
impl Caps
[src]pub fn builder(name: &str) -> Builder<NoFeature>
[src]
pub fn builder_full() -> BuilderFull<SomeFeatures>
[src]
pub fn builder_full_with_features(
features: CapsFeatures
) -> BuilderFull<SomeFeatures>
[src]
features: CapsFeatures
) -> BuilderFull<SomeFeatures>
pub fn builder_full_with_any_features() -> BuilderFull<AnyFeatures>
[src]
pub fn new_empty() -> Self
[src]
pub fn new_empty() -> Self
[src]Creates a new crate::Caps
that is empty. That is, the returned
crate::Caps
contains no media formats.
The crate::Caps
is guaranteed to be writable.
Caller is responsible for unreffing the returned caps.
Returns
the new crate::Caps
pub fn new_any() -> Self
[src]
pub fn new_any() -> Self
[src]Creates a new crate::Caps
that indicates that it is compatible with
any media format.
Returns
the new crate::Caps
pub fn new_simple(
name: &str,
values: &[(&str, &(dyn ToSendValue + Sync))]
) -> Self
[src]
pub fn new_simple(
name: &str,
values: &[(&str, &(dyn ToSendValue + Sync))]
) -> Self
[src]Creates a new crate::Caps
that contains one crate::Structure
. The
structure is defined by the arguments, which have the same format
as crate::Structure::new()
.
Caller is responsible for unreffing the returned caps.
media_type
the media type of the structure
fieldname
first field to set
Returns
the new crate::Caps
pub fn from_iter<'a, I>(iter: I) -> Self where
I: IntoIterator<Item = &'a StructureRef>,
[src]
I: IntoIterator<Item = &'a StructureRef>,
pub fn from_iter_with_features<'a, 'b, I>(iter: I) -> Self where
I: IntoIterator<Item = (&'a StructureRef, &'b CapsFeaturesRef)>,
[src]
I: IntoIterator<Item = (&'a StructureRef, &'b CapsFeaturesRef)>,
pub fn fixate(&mut self)
[src]
pub fn fixate(&mut self)
[src]Modifies the given self
into a representation with only fixed
values. First the caps will be truncated and then the first structure will be
fixated with [crate::Structure::fixate()
].
This function takes ownership of self
and will call gst_caps_make_writable()
on it so you must not use self
afterwards unless you keep an additional
reference to it with gst_caps_ref()
.
Note that it is not guaranteed that the returned caps have exactly one
structure. If self
are empty caps then then returned caps will be
the empty too and contain no structure at all.
Calling this function with any caps is not allowed.
Returns
the fixated caps
pub fn merge(&mut self, other: Self)
[src]
pub fn merge(&mut self, other: Self)
[src]Appends the structures contained in caps2
to self
if they are not yet
expressed by self
. The structures in caps2
are not copied – they are
transferred to a writable copy of self
, and then caps2
is freed.
If either caps is ANY, the resulting caps will be ANY.
caps2
the crate::Caps
to merge in
Returns
the merged caps.
pub fn merge_structure(&mut self, structure: Structure)
[src]
pub fn merge_structure(&mut self, structure: Structure)
[src]Appends structure
to self
if its not already expressed by self
.
structure
the crate::Structure
to merge
Returns
the merged caps.
pub fn merge_structure_full(
&mut self,
structure: Structure,
features: Option<CapsFeatures>
)
[src]
pub fn merge_structure_full(
&mut self,
structure: Structure,
features: Option<CapsFeatures>
)
[src]Appends structure
with features
to self
if its not already expressed by self
.
structure
the crate::Structure
to merge
features
the crate::CapsFeatures
to merge
Returns
the merged caps.
pub fn normalize(&mut self)
[src]
pub fn normalize(&mut self)
[src]Returns a crate::Caps
that represents the same set of formats as
self
, but contains no lists. Each list is expanded into separate
GstStructures
.
This function takes ownership of self
and will call gst_caps_make_writable()
on it so you must not use self
afterwards unless you keep an additional
reference to it with gst_caps_ref()
.
Returns
the normalized crate::Caps
pub fn simplify(&mut self)
[src]
pub fn simplify(&mut self)
[src]Converts the given self
into a representation that represents the
same set of formats, but in a simpler form. Component structures that are
identical are merged. Component structures that have values that can be
merged are also merged.
This function takes ownership of self
and will call gst_caps_make_writable()
on it if necessary, so you must not use self
afterwards unless you keep an
additional reference to it with gst_caps_ref()
.
This method does not preserve the original order of self
.
Returns
The simplified caps.
pub fn truncate(&mut self)
[src]
pub fn truncate(&mut self)
[src]Discard all but the first structure from self
. Useful when
fixating.
This function takes ownership of self
and will call gst_caps_make_writable()
on it if necessary, so you must not use self
afterwards unless you keep an
additional reference to it with gst_caps_ref()
.
Note that it is not guaranteed that the returned caps have exactly one
structure. If self
is any or empty caps then then returned caps will be
the same and contain no structure at all.
Returns
truncated caps
Methods from Deref<Target = CapsRef>
pub unsafe fn as_ptr(&self) -> *const GstCaps
[src]
pub unsafe fn as_mut_ptr(&self) -> *mut GstCaps
[src]
pub fn copy(&self) -> Caps
[src]
pub fn structure(&self, idx: u32) -> Option<&StructureRef>
[src]
pub fn features(&self, idx: u32) -> Option<&CapsFeaturesRef>
[src]
pub fn size(&self) -> u32
[src]
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>
impl<'a> Iterator for Iter<'a> type Item = &'a StructureRef;
[src]
Notable traits for Iter<'a>
impl<'a> Iterator for Iter<'a> type Item = &'a StructureRef;
pub fn iter_with_features(&self) -> IterFeatures<'_>ⓘNotable traits for IterFeatures<'a>
impl<'a> Iterator for IterFeatures<'a> type Item = (&'a StructureRef, &'a CapsFeaturesRef);
[src]
Notable traits for IterFeatures<'a>
impl<'a> Iterator for IterFeatures<'a> type Item = (&'a StructureRef, &'a CapsFeaturesRef);
pub fn can_intersect(&self, other: &Self) -> bool
[src]
pub fn intersect(&self, other: &Self) -> Caps
[src]
pub fn intersect_with_mode(&self, other: &Self, mode: CapsIntersectMode) -> Caps
[src]
pub fn is_always_compatible(&self, other: &Self) -> bool
[src]
pub fn is_any(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_fixed(&self) -> bool
[src]
pub fn is_equal_fixed(&self, other: &Self) -> bool
[src]
pub fn is_strictly_equal(&self, other: &Self) -> bool
[src]
pub fn is_subset(&self, superset: &Self) -> bool
[src]
pub fn is_subset_structure(&self, structure: &StructureRef) -> bool
[src]
pub fn is_subset_structure_full(
&self,
structure: &StructureRef,
features: Option<&CapsFeaturesRef>
) -> bool
[src]
&self,
structure: &StructureRef,
features: Option<&CapsFeaturesRef>
) -> bool
pub fn subtract(&self, other: &Self) -> Caps
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Caps
[src]
impl<'de> Deserialize<'de> for Caps
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *const *mut GstCaps> for Caps
[src]
impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *const *mut GstCaps> for Caps
[src]unsafe fn from_glib_none_as_vec(ptr: *const *mut GstCaps) -> Vec<Self>
[src]
unsafe fn from_glib_container_as_vec(_: *const *mut GstCaps) -> Vec<Self>
[src]
unsafe fn from_glib_full_as_vec(_: *const *mut GstCaps) -> Vec<Self>
[src]
impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *mut *mut GstCaps> for Caps
[src]
impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *mut *mut GstCaps> for Caps
[src]unsafe fn from_glib_none_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>
[src]
unsafe fn from_glib_container_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>
[src]
unsafe fn from_glib_full_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>
[src]
impl FromGlibPtrBorrow<*const GstCaps> for Caps
[src]
impl FromGlibPtrBorrow<*const GstCaps> for Caps
[src]unsafe fn from_glib_borrow(ptr: *const GstCaps) -> Borrowed<Self>
[src]
unsafe fn from_glib_borrow(ptr: *const GstCaps) -> Borrowed<Self>
[src]Safety Read more
impl FromGlibPtrBorrow<*mut GstCaps> for Caps
[src]
impl FromGlibPtrBorrow<*mut GstCaps> for Caps
[src]unsafe fn from_glib_borrow(ptr: *mut GstCaps) -> Borrowed<Self>
[src]
unsafe fn from_glib_borrow(ptr: *mut GstCaps) -> Borrowed<Self>
[src]Safety Read more
impl FromGlibPtrFull<*const GstCaps> for Caps
[src]
impl FromGlibPtrFull<*const GstCaps> for Caps
[src]unsafe fn from_glib_full(ptr: *const GstCaps) -> Self
[src]
unsafe fn from_glib_full(ptr: *const GstCaps) -> Self
[src]Safety Read more
impl FromGlibPtrFull<*mut GstCaps> for Caps
[src]
impl FromGlibPtrFull<*mut GstCaps> for Caps
[src]unsafe fn from_glib_full(ptr: *mut GstCaps) -> Self
[src]
unsafe fn from_glib_full(ptr: *mut GstCaps) -> Self
[src]Safety Read more
impl FromGlibPtrNone<*const GstCaps> for Caps
[src]
impl FromGlibPtrNone<*const GstCaps> for Caps
[src]unsafe fn from_glib_none(ptr: *const GstCaps) -> Self
[src]
unsafe fn from_glib_none(ptr: *const GstCaps) -> Self
[src]Safety Read more
impl FromGlibPtrNone<*mut GstCaps> for Caps
[src]
impl FromGlibPtrNone<*mut GstCaps> for Caps
[src]unsafe fn from_glib_none(ptr: *mut GstCaps) -> Self
[src]
unsafe fn from_glib_none(ptr: *mut GstCaps) -> Self
[src]Safety Read more
impl<'a> FromValue<'a> for Caps
[src]
impl<'a> FromValue<'a> for Caps
[src]type Checker = GenericValueTypeOrNoneChecker<Self>
type Checker = GenericValueTypeOrNoneChecker<Self>
Value type checker.
unsafe fn from_value(value: &'a Value) -> Self
[src]
unsafe fn from_value(value: &'a Value) -> Self
[src]Get the contained value from a Value
. Read more
impl GlibPtrDefault for Caps
[src]
impl GlibPtrDefault for Caps
[src]impl StaticType for Caps
[src]
impl StaticType for Caps
[src]fn static_type() -> Type
[src]
fn static_type() -> Type
[src]Returns the type identifier of Self
.
impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstCaps> for Caps
[src]
impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstCaps> for Caps
[src]type Storage = (Vec<Stash<'a, *mut GstCaps, Caps>>, Option<Vec<*mut GstCaps>>)
fn to_glib_none_from_slice(
t: &'a [Caps]
) -> (*const *mut GstCaps, Self::Storage)
[src]
t: &'a [Caps]
) -> (*const *mut GstCaps, Self::Storage)
fn to_glib_container_from_slice(
_: &'a [Caps]
) -> (*const *mut GstCaps, Self::Storage)
[src]
_: &'a [Caps]
) -> (*const *mut GstCaps, Self::Storage)
fn to_glib_full_from_slice(_: &[Caps]) -> *const *mut GstCaps
[src]
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstCaps> for Caps
[src]
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstCaps> for Caps
[src]type Storage = (Vec<Stash<'a, *mut GstCaps, Self>>, Option<Vec<*mut GstCaps>>)
fn to_glib_none_from_slice(t: &'a [Caps]) -> (*mut *mut GstCaps, Self::Storage)
[src]
fn to_glib_container_from_slice(
t: &'a [Caps]
) -> (*mut *mut GstCaps, Self::Storage)
[src]
t: &'a [Caps]
) -> (*mut *mut GstCaps, Self::Storage)
fn to_glib_full_from_slice(t: &[Caps]) -> *mut *mut GstCaps
[src]
impl<'a> ToGlibPtr<'a, *const GstCaps> for Caps
[src]
impl<'a> ToGlibPtr<'a, *const GstCaps> for Caps
[src]type Storage = &'a Self
fn to_glib_none(&'a self) -> Stash<'a, *const GstCaps, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const GstCaps, Self>
[src]Transfer: none. Read more
fn to_glib_full(&self) -> *const GstCaps
[src]
fn to_glib_full(&self) -> *const GstCaps
[src]Transfer: full. Read more
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]Transfer: container. Read more
impl<'a> ToGlibPtr<'a, *mut GstCaps> for Caps
[src]
impl<'a> ToGlibPtr<'a, *mut GstCaps> for Caps
[src]type Storage = &'a Self
fn to_glib_none(&'a self) -> Stash<'a, *mut GstCaps, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut GstCaps, Self>
[src]Transfer: none. Read more
fn to_glib_full(&self) -> *mut GstCaps
[src]
fn to_glib_full(&self) -> *mut GstCaps
[src]Transfer: full. Read more
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]Transfer: container. Read more
impl<'a> ToGlibPtrMut<'a, *mut GstCaps> for Caps
[src]
impl<'a> ToGlibPtrMut<'a, *mut GstCaps> for Caps
[src]impl ToValueOptional for Caps
[src]
impl ToValueOptional for Caps
[src]fn to_value_optional(s: Option<&Self>) -> Value
[src]
fn to_value_optional(s: Option<&Self>) -> Value
[src]Convert an Option
to a Value
.
impl Eq for Caps
[src]
impl Send for Caps
[src]
impl Sync for Caps
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]pub fn to_send_value(&self) -> SendValue
[src]
pub fn to_send_value(&self) -> SendValue
[src]Returns a SendValue
clone of self
.
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,