#[repr(transparent)]
pub struct Caps { /* private fields */ }

Implementations

Creates a new Caps that is empty. That is, the returned Caps contains no media formats. The Caps is guaranteed to be writable.

Returns

the new Caps

Creates a new Caps that indicates that it is compatible with any media format.

Returns

the new Caps

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

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 to self if it is not already expressed by self.

structure

the Structure to merge

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>

This is supported on crate feature v1_20 only.

Trait Implementations

Performs the conversion.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Creates a value from an iterator. Read more

Creates a value from an iterator. Read more

Creates a value from an iterator. Read more

The associated error which can be returned from parsing.

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

Value type checker.

Get the contained value from a Value. Read more

Value type checker.

Get the contained value from a Value. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Returns the type identifier of Self.

Transfer: none. Read more

Transfer: full. Read more

Transfer: container. Read more

Transfer: none. Read more

Transfer: full. Read more

Transfer: container. Read more

Transfer: none. Read more

Convert a value to a Value.

Returns the type identifer of self. Read more

Convert an Option to a Value.

Type to get the Type from. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Returns a SendValue clone of self.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.