Struct gstreamer::caps::Caps [−][src]
pub struct Caps { /* fields omitted */ }
Implementations
Creates a new Caps
that contains one Structure
. The
structure is defined by the arguments, which have the same format
as Structure::new()
.
media_type
the media type of the structure
fieldname
first field to set
Returns
the new Caps
pub fn from_iter_with_features<'a, 'b, I>(iter: I) -> Self where
I: IntoIterator<Item = (&'a StructureRef, &'b CapsFeaturesRef)>,
[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 gst_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 the 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
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 Caps
to merge in
Returns
the merged caps.
Appends structure
with features
to self
if its not already expressed by self
.
structure
the Structure
to merge
features
the CapsFeatures
to merge
Returns
the merged caps.
Returns a Caps
that represents the same set of formats as
self
, but contains no lists. Each list is expanded into separate
Structure
.
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 Caps
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.
Discards 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 the returned caps will be
the same and contain no structure at all.
Returns
truncated caps
Methods from Deref<Target = CapsRef>
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>
impl<'a> Iterator for Iter<'a> type Item = &'a StructureRef;
[src]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]pub fn is_subset_structure_full(
&self,
structure: &StructureRef,
features: Option<&CapsFeaturesRef>
) -> bool
[src]Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Safety Read more
Safety Read more
Safety Read more
Safety Read more
type Checker = GenericValueTypeOrNoneChecker<Self>
type Checker = GenericValueTypeOrNoneChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
Returns the type identifier of Self
.
Convert an Option
to a Value
.
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]