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

pub struct Caps(_);

Methods

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) -> Self[src]

pub unsafe fn into_ptr(self) -> *mut GstCaps[src]

pub fn copy(&self) -> Self[src]

impl Caps[src]

pub fn builder(name: &str) -> Builder[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 fixate(caps: Self) -> 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 gst_caps_ref.

Returns

the fixated caps

pub fn merge(caps: Self, other: Self) -> 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(caps: Self, structure: Structure) -> Self[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(
    caps: Self,
    structure: Structure,
    features: Option<CapsFeatures>
) -> Self
[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(caps: Self) -> 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 gst_caps_ref.

Returns

the normalized Caps

pub fn simplify(caps: Self) -> 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(caps: Self) -> 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.

Returns

truncated caps

Methods from Deref<Target = GstRc<CapsRef>>

pub fn make_mut(&mut self) -> &mut T[src]

pub fn get_mut(&mut self) -> Option<&mut T>[src]

pub fn is_writable(&self) -> bool[src]

pub fn add_parent<U: MiniObject>(&self, parent: &U)[src]

pub fn remove_parent<U: MiniObject>(&self, parent: &U)[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 = GstRc<CapsRef>

The resulting type after dereferencing.

impl DerefMut for Caps[src]

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

impl Display for Caps[src]

impl Eq for Caps[src]

impl From<GstRc<CapsRef>> 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]

impl Into<GstRc<CapsRef>> for Caps[src]

impl PartialEq<Caps> for Caps[src]

impl Serialize for Caps[src]

impl SetValue for Caps[src]

impl SetValueOptional for Caps[src]

impl StaticType for Caps[src]

impl StructuralEq for Caps[src]

impl StructuralPartialEq 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 = Stash<'a, *const GstCaps, GstRc<CapsRef>>

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

type Storage = Stash<'a, *mut GstCaps, GstRc<CapsRef>>

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

type Storage = StashMut<'a, *mut GstCaps, GstRc<CapsRef>>

Auto Trait Implementations

impl RefUnwindSafe for Caps

impl Send for Caps

impl Sync 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: 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.