Struct gstreamer::buffer::Buffer[][src]

pub struct Buffer { /* fields omitted */ }

Implementations

impl Buffer[src]

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

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

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

pub unsafe fn replace_ptr(&mut self, ptr: *mut GstBuffer)[src]

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

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

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

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

impl Buffer[src]

pub fn new() -> Self[src]

Creates a newly allocated buffer without any data.

MT safe.

Returns

the new crate::Buffer.

pub fn with_size(size: usize) -> Result<Self, BoolError>[src]

pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Self[src]

pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Self[src]

pub fn into_mapped_buffer_readable(self) -> Result<MappedBuffer<Readable>, Self>[src]

pub fn into_mapped_buffer_writable(self) -> Result<MappedBuffer<Writable>, Self>[src]

pub fn into_cursor_readable(self) -> BufferCursor<Readable>[src]

pub fn into_cursor_writable(self) -> Result<BufferCursor<Writable>, BoolError>[src]

pub fn append(&mut self, other: Self)[src]

Append all the memory from buf2 to self. The result buffer will contain a concatenation of the memory of self and buf2.

buf2

the second source crate::Buffer to append.

Returns

the new crate::Buffer that contains the memory of the two source buffers.

Methods from Deref<Target = BufferRef>

pub unsafe fn as_ptr(&self) -> *const GstBuffer[src]

pub unsafe fn as_mut_ptr(&self) -> *mut GstBuffer[src]

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

pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, BoolError>[src]

pub fn copy_region(
    &self,
    flags: BufferCopyFlags,
    offset: usize,
    size: Option<usize>
) -> Result<Buffer, BoolError>
[src]

pub fn copy_into(
    &self,
    dest: &mut BufferRef,
    flags: BufferCopyFlags,
    offset: usize,
    size: Option<usize>
) -> Result<(), BoolError>
[src]

pub fn copy_to_slice(
    &self,
    offset: usize,
    slice: &mut [u8]
) -> Result<(), usize>
[src]

pub fn copy_deep(&self) -> Result<Buffer, BoolError>[src]

pub fn size(&self) -> usize[src]

pub fn maxsize(&self) -> usize[src]

pub fn offset(&self) -> u64[src]

pub fn offset_end(&self) -> u64[src]

pub fn pts(&self) -> ClockTime[src]

pub fn dts(&self) -> ClockTime[src]

pub fn dts_or_pts(&self) -> ClockTime[src]

pub fn duration(&self) -> ClockTime[src]

pub fn flags(&self) -> BufferFlags[src]

pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<'_, T>>[src]

pub fn iter_meta<T: MetaAPI>(&self) -> MetaIter<'_, T>

Notable traits for MetaIter<'a, T>

impl<'a, T: MetaAPI> Iterator for MetaIter<'a, T> type Item = MetaRef<'a, T>;
[src]

pub fn foreach_meta<F: FnMut(MetaRef<'_, Meta>) -> bool>(&self, func: F) -> bool[src]

pub fn find_memory(
    &self,
    offset: usize,
    size: Option<usize>
) -> Option<(u32, u32, usize)>
[src]

pub fn all_memory(&self) -> Option<Memory>[src]

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

pub fn memory_range(&self, idx: u32, length: Option<u32>) -> Option<Memory>[src]

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

pub fn is_memory_range_writable(&self, idx: u32, length: Option<u16>) -> bool[src]

pub fn n_memory(&self) -> u32[src]

pub fn peek_memory(&self, idx: u32) -> &MemoryRef[src]

pub fn iter_memories(&self) -> Iter<'_>

Notable traits for Iter<'a>

impl<'a> Iterator for Iter<'a> type Item = &'a MemoryRef;
[src]

pub fn iter_memories_owned(&self) -> IterOwned<'_>

Notable traits for IterOwned<'a>

impl<'a> Iterator for IterOwned<'a> type Item = Memory;
[src]

pub fn as_cursor_readable(&self) -> BufferRefCursor<&BufferRef>

Notable traits for BufferRefCursor<&'a BufferRef>

impl<'a> Read for BufferRefCursor<&'a BufferRef>impl<'a> Write for BufferRefCursor<&'a mut BufferRef>
[src]

Trait Implementations

impl AsRef<BufferRef> for Buffer[src]

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

Performs the conversion.

impl Borrow<BufferRef> for Buffer[src]

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

Immutably borrows from an owned value. Read more

impl Clone for Buffer[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 Buffer[src]

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

Formats the value using the given formatter. Read more

impl Default for Buffer[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl Deref for Buffer[src]

type Target = BufferRef

The resulting type after dereferencing.

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

Dereferences the value.

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

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

Deserialize this value from the given Serde deserializer. Read more

impl Drop for Buffer[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl FromGlibContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer[src]

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

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

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

impl FromGlibContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer[src]

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

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

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

impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer[src]

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

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

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

impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer[src]

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

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

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

impl FromGlibPtrBorrow<*const GstBuffer> for Buffer[src]

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

Safety Read more

impl FromGlibPtrBorrow<*mut GstBuffer> for Buffer[src]

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

Safety Read more

impl FromGlibPtrFull<*const GstBuffer> for Buffer[src]

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

Safety Read more

impl FromGlibPtrFull<*mut GstBuffer> for Buffer[src]

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

Safety Read more

impl FromGlibPtrNone<*const GstBuffer> for Buffer[src]

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

Safety Read more

impl FromGlibPtrNone<*mut GstBuffer> for Buffer[src]

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

Safety Read more

impl<'a> FromValue<'a> for Buffer[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 Buffer[src]

type GlibType = *mut GstBuffer

impl PartialEq<Buffer> for Buffer[src]

fn eq(&self, other: &Buffer) -> 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<'a> Serialize for Buffer[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 Buffer[src]

fn static_type() -> Type[src]

Returns the type identifier of Self.

impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer[src]

impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer[src]

type Storage = (Vec<Stash<'a, *mut GstBuffer, Self>>, Option<Vec<*mut GstBuffer>>)

fn to_glib_none_from_slice(
    t: &'a [Buffer]
) -> (*mut *mut GstBuffer, Self::Storage)
[src]

fn to_glib_container_from_slice(
    t: &'a [Buffer]
) -> (*mut *mut GstBuffer, Self::Storage)
[src]

fn to_glib_full_from_slice(t: &[Buffer]) -> *mut *mut GstBuffer[src]

impl<'a> ToGlibPtr<'a, *const GstBuffer> for Buffer[src]

type Storage = &'a Self

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

Transfer: none. Read more

fn to_glib_full(&self) -> *const GstBuffer[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 GstBuffer> for Buffer[src]

type Storage = &'a Self

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

Transfer: none. Read more

fn to_glib_full(&self) -> *mut GstBuffer[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 GstBuffer> for Buffer[src]

type Storage = &'a mut Self

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

Transfer: none. Read more

impl ToValue for Buffer[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 Buffer[src]

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

Convert an Option to a Value.

impl ValueType for Buffer[src]

type Type = Self

Type to get the Type from. Read more

impl Eq for Buffer[src]

impl Send for Buffer[src]

impl Sync for Buffer[src]

Auto Trait Implementations

impl RefUnwindSafe for Buffer

impl Unpin for Buffer

impl UnwindSafe for Buffer

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