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

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 crate::Caps that is empty. That is, the returned crate::Caps contains no media formats. The crate::Caps is guaranteed to be writable. Caller is responsible for unreffing the returned caps.

Returns

the new crate::Caps

pub fn new_any() -> Self[src]

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

Returns

the new crate::Caps

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

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

features

the crate::CapsFeatures to merge

Returns

the merged caps.

pub fn normalize(&mut self)[src]

Returns a crate::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 crate::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 gst_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 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 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 structure(&self, idx: u32) -> Option<&StructureRef>[src]

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

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

fn as_ref(&self) -> &CapsRef[src]

Performs the conversion.

impl Borrow<CapsRef> for Caps[src]

fn borrow(&self) -> &CapsRef[src]

Immutably borrows from an owned value. Read more

impl Clone for Caps[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for Caps[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Deref for Caps[src]

type Target = CapsRef

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

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

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Caps[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Drop for Caps[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

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

unsafe fn from_glib_none_num_as_vec(
    ptr: *const *mut GstCaps,
    num: usize
) -> Vec<Self>
[src]

unsafe fn from_glib_container_num_as_vec(
    _: *const *mut GstCaps,
    _: usize
) -> Vec<Self>
[src]

unsafe fn from_glib_full_num_as_vec(
    _: *const *mut GstCaps,
    _: usize
) -> Vec<Self>
[src]

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

unsafe fn from_glib_none_num_as_vec(
    ptr: *mut *mut GstCaps,
    num: usize
) -> Vec<Self>
[src]

unsafe fn from_glib_container_num_as_vec(
    ptr: *mut *mut GstCaps,
    num: usize
) -> Vec<Self>
[src]

unsafe fn from_glib_full_num_as_vec(
    ptr: *mut *mut GstCaps,
    num: usize
) -> Vec<Self>
[src]

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

unsafe fn from_glib_none_as_vec(ptr: *const *mut GstCaps) -> Vec<Self>[src]

unsafe fn from_glib_container_as_vec(_: *const *mut GstCaps) -> Vec<Self>[src]

unsafe fn from_glib_full_as_vec(_: *const *mut GstCaps) -> Vec<Self>[src]

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

unsafe fn from_glib_none_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>[src]

unsafe fn from_glib_container_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>[src]

unsafe fn from_glib_full_as_vec(ptr: *mut *mut GstCaps) -> Vec<Self>[src]

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

unsafe fn from_glib_borrow(ptr: *const GstCaps) -> Borrowed<Self>[src]

Safety Read more

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

unsafe fn from_glib_borrow(ptr: *mut GstCaps) -> Borrowed<Self>[src]

Safety Read more

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

unsafe fn from_glib_full(ptr: *const GstCaps) -> Self[src]

Safety Read more

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

unsafe fn from_glib_full(ptr: *mut GstCaps) -> Self[src]

Safety Read more

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

unsafe fn from_glib_none(ptr: *const GstCaps) -> Self[src]

Safety Read more

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

unsafe fn from_glib_none(ptr: *mut GstCaps) -> Self[src]

Safety Read more

impl FromStr for Caps[src]

type Err = BoolError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

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

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

type Checker = GenericValueTypeOrNoneChecker<Self>

Value type checker.

unsafe fn from_value(value: &'a Value) -> Self[src]

Get the contained value from a Value. Read more

impl GlibPtrDefault for Caps[src]

type GlibType = *mut GstCaps

impl PartialEq<Caps> for Caps[src]

fn eq(&self, other: &Caps) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Serialize for Caps[src]

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>[src]

Serialize this value into the given Serde serializer. Read more

impl StaticType for Caps[src]

fn static_type() -> Type[src]

Returns the type identifier of Self.

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

fn to_glib_none(&'a self) -> Stash<'a, *const GstCaps, Self>[src]

Transfer: none. Read more

fn to_glib_full(&self) -> *const GstCaps[src]

Transfer: full. Read more

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 = &'a Self

fn to_glib_none(&'a self) -> Stash<'a, *mut GstCaps, Self>[src]

Transfer: none. Read more

fn to_glib_full(&self) -> *mut GstCaps[src]

Transfer: full. Read more

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

Transfer: container. Read more

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

type Storage = &'a mut Self

fn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstCaps, Self>[src]

Transfer: none. Read more

impl ToValue for Caps[src]

fn to_value(&self) -> Value[src]

Convert a value to a Value.

fn value_type(&self) -> Type[src]

Returns the type identifer of self. Read more

impl ToValueOptional for Caps[src]

fn to_value_optional(s: Option<&Self>) -> Value[src]

Convert an Option to a Value.

impl ValueType for Caps[src]

type Type = Self

Type to get the Type from. Read more

impl Eq for Caps[src]

impl Send for Caps[src]

impl Sync for Caps[src]

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

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

Immutably borrows from an owned value. Read more

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

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

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

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

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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

pub fn to_send_value(&self) -> SendValue[src]

Returns a SendValue clone of self.

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

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

impl<'a, T, C> FromValueOptional<'a> for T where
    C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
    T: FromValue<'a, Checker = C>, 
[src]