[][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 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_string(value: &str) -> Option<Self>[src]

Converts caps from a string representation.

The current implementation of serialization will lead to unexpected results when there are nested Caps / Structure deeper than one level.

string

a string to convert to Caps

Returns

a newly allocated 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 From<GstRc<CapsRef>> for Caps[src]

impl AsRef<CapsRef> for Caps[src]

impl Clone for Caps[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Caps[src]

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

impl PartialEq<Caps> for Caps[src]

impl Display for Caps[src]

impl DerefMut for Caps[src]

impl Deref for Caps[src]

type Target = GstRc<CapsRef>

The resulting type after dereferencing.

impl Debug for Caps[src]

impl FromStr for Caps[src]

type Err = ()

The associated error which can be returned from parsing.

impl Borrow<CapsRef> for Caps[src]

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

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

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

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

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

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

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

Transfer: container. Read more

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

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

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

Transfer: container. Read more

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

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

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

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

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

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

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

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

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

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

impl GlibPtrDefault for Caps[src]

impl StaticType for Caps[src]

impl SetValue for Caps[src]

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

impl SetValueOptional for Caps[src]

impl Serialize for Caps[src]

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

Auto Trait Implementations

impl Send for Caps

impl Sync for Caps

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> ToString for T where
    T: Display + ?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.

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[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 GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

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

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

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

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