[][src]Struct gstreamer::caps::Caps

pub struct Caps { /* fields omitted */ }

Implementations

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]

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]

pub fn builder_full_with_any_features() -> BuilderFull<AnyFeatures>[src]

pub fn new_empty() -> Self[src]

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

Returns

the new Caps

pub fn new_any() -> Self[src]

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

Returns

the new Caps

pub fn new_simple(name: &str, values: &[(&str, &dyn ToSendValue)]) -> Self[src]

Creates a new Caps that contains one Structure. The structure is defined by the arguments, which have the same format as 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 Caps

pub fn from_iter<'a, I>(iter: I) -> Self where
    I: IntoIterator<Item = &'a StructureRef>, 
[src]

pub fn from_iter_with_features<'a, 'b, I>(iter: I) -> Self where
    I: IntoIterator<Item = (&'a StructureRef, &'b CapsFeaturesRef)>, 
[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 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 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]

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.

pub fn merge_structure(&mut self, structure: Structure)[src]

Appends structure to self if its not already expressed by self.

structure

the Structure to merge

Returns

the merged caps.

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 Structure to merge

features

the CapsFeatures to merge

Returns

the merged caps.

pub fn normalize(&mut self)[src]

Returns a 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 Caps::ref.

Returns

the normalized Caps

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 Caps::ref.

This method does not preserve the original order of self.

Returns

The simplified caps.

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 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 get_structure(&self, idx: u32) -> Option<&StructureRef>[src]

pub fn get_features(&self, idx: u32) -> Option<&CapsFeaturesRef>[src]

pub fn get_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]

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 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]

pub fn subtract(&self, other: &Self) -> Caps[src]

Trait Implementations

impl AsRef<CapsRef> for Caps[src]

impl Borrow<CapsRef> for Caps[src]

impl Clone for Caps[src]

impl Debug for Caps[src]

impl Deref for Caps[src]

type Target = CapsRef

The resulting type after dereferencing.

impl<'de> Deserialize<'de> for Caps[src]

impl Display for Caps[src]

impl Drop for Caps[src]

impl Eq for Caps[src]

impl FromGlibContainerAsVec<*mut GstCaps, *const *mut GstCaps> for Caps[src]

impl FromGlibContainerAsVec<*mut GstCaps, *mut *mut GstCaps> for Caps[src]

impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *const *mut GstCaps> for Caps[src]

impl FromGlibPtrArrayContainerAsVec<*mut GstCaps, *mut *mut GstCaps> for Caps[src]

impl FromGlibPtrBorrow<*const GstCaps> for Caps[src]

impl FromGlibPtrBorrow<*mut GstCaps> for Caps[src]

impl FromGlibPtrFull<*const GstCaps> for Caps[src]

impl FromGlibPtrFull<*mut GstCaps> for Caps[src]

impl FromGlibPtrNone<*const GstCaps> for Caps[src]

impl FromGlibPtrNone<*mut GstCaps> for Caps[src]

impl FromStr for Caps[src]

type Err = BoolError

The associated error which can be returned from parsing.

impl<'a> FromValueOptional<'a> for Caps[src]

impl GlibPtrDefault for Caps[src]

type GlibType = *mut GstCaps

impl PartialEq<Caps> for Caps[src]

impl Send for Caps[src]

impl Serialize for Caps[src]

impl SetValue for Caps[src]

impl SetValueOptional for Caps[src]

impl StaticType for Caps[src]

impl Sync for Caps[src]

impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstCaps> for Caps[src]

impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstCaps> for Caps[src]

impl<'a> ToGlibPtr<'a, *const GstCaps> for Caps[src]

type Storage = &'a Self

impl<'a> ToGlibPtr<'a, *mut GstCaps> for Caps[src]

type Storage = &'a Self

impl<'a> ToGlibPtrMut<'a, *mut GstCaps> for Caps[src]

type Storage = &'a mut Self

Auto Trait Implementations

impl RefUnwindSafe for Caps

impl Unpin for Caps

impl UnwindSafe for Caps

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.