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

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 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 Buffer to append.

Returns

the new 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 get_size(&self) -> usize[src]

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

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

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

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

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

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

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

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

pub fn get_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 get_all_memory(&self) -> Option<Memory>[src]

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

pub fn get_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<'a>(&'a self) -> BufferRefCursor<&'a 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]

impl Borrow<BufferRef> for Buffer[src]

impl Clone for Buffer[src]

impl Debug for Buffer[src]

impl Default for Buffer[src]

impl Deref for Buffer[src]

type Target = BufferRef

The resulting type after dereferencing.

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

impl Drop for Buffer[src]

impl Eq for Buffer[src]

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

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

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

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

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

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

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

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

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

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

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

impl GlibPtrDefault for Buffer[src]

type GlibType = *mut GstBuffer

impl PartialEq<Buffer> for Buffer[src]

impl Send for Buffer[src]

impl<'a> Serialize for Buffer[src]

impl SetValue for Buffer[src]

impl SetValueOptional for Buffer[src]

impl StaticType for Buffer[src]

impl Sync for Buffer[src]

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

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

type Storage = &'a Self

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

type Storage = &'a Self

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

type Storage = &'a mut Self

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]

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