#[repr(transparent)]pub struct BufferRef(_);
Implementations
sourceimpl BufferRef
impl BufferRef
pub unsafe fn as_ptr(&self) -> *const GstBuffer
pub unsafe fn as_mut_ptr(&self) -> *mut GstBuffer
pub unsafe fn from_ptr<'a>(ptr: *const GstBuffer) -> &'a Self
pub unsafe fn from_mut_ptr<'a>(ptr: *mut GstBuffer) -> &'a mut Self
pub fn copy(&self) -> Buffer
pub fn upcast_ref(&self) -> &MiniObjectRef
pub fn upcast_mut(&mut self) -> &mut MiniObjectRef
sourceimpl BufferRef
impl BufferRef
pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, BoolError>
pub fn map_writable(&mut self) -> Result<BufferMap<'_, Writable>, BoolError>
pub fn copy_region(
&self,
flags: BufferCopyFlags,
offset: usize,
size: Option<usize>
) -> Result<Buffer, BoolError>
pub fn copy_into(
&self,
dest: &mut BufferRef,
flags: BufferCopyFlags,
offset: usize,
size: Option<usize>
) -> Result<(), BoolError>
pub fn copy_from_slice(
&mut self,
offset: usize,
slice: &[u8]
) -> Result<(), usize>
pub fn copy_to_slice(
&self,
offset: usize,
slice: &mut [u8]
) -> Result<(), usize>
pub fn copy_deep(&self) -> Result<Buffer, BoolError>
pub fn size(&self) -> usize
pub fn maxsize(&self) -> usize
pub fn set_size(&mut self, size: usize)
pub fn offset(&self) -> u64
pub fn set_offset(&mut self, offset: u64)
pub fn offset_end(&self) -> u64
pub fn set_offset_end(&mut self, offset_end: u64)
pub fn pts(&self) -> Option<ClockTime>
pub fn set_pts(&mut self, pts: impl Into<Option<ClockTime>>)
pub fn dts(&self) -> Option<ClockTime>
pub fn set_dts(&mut self, dts: impl Into<Option<ClockTime>>)
pub fn dts_or_pts(&self) -> Option<ClockTime>
pub fn duration(&self) -> Option<ClockTime>
pub fn set_duration(&mut self, duration: impl Into<Option<ClockTime>>)
pub fn flags(&self) -> BufferFlags
pub fn set_flags(&mut self, flags: BufferFlags)
pub fn unset_flags(&mut self, flags: BufferFlags)
pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<'_, T>>
pub fn meta_mut<T: MetaAPI>(&mut self) -> Option<MetaRefMut<'_, T, Standalone>>
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>;
pub fn iter_meta_mut<T: MetaAPI>(&mut self) -> MetaIterMut<'_, T>ⓘNotable traits for MetaIterMut<'a, T>impl<'a, T: MetaAPI> Iterator for MetaIterMut<'a, T> type Item = MetaRefMut<'a, T, Iterated>;
pub fn foreach_meta<F: FnMut(MetaRef<'_, Meta>) -> ControlFlow<(), ()>>(
&self,
func: F
) -> bool
pub fn foreach_meta_mut<F: FnMut(MetaRefMut<'_, Meta, Iterated>) -> ControlFlow<BufferMetaForeachAction, BufferMetaForeachAction>>(
&mut self,
func: F
) -> bool
pub fn append_memory(&mut self, mem: Memory)
pub fn find_memory(
&self,
offset: usize,
size: Option<usize>
) -> Option<(u32, u32, usize)>
pub fn all_memory(&self) -> Option<Memory>
pub fn max_memory() -> u32
pub fn memory(&self, idx: u32) -> Option<Memory>
pub fn memory_range(&self, idx: u32, length: Option<u32>) -> Option<Memory>
pub fn insert_memory(&mut self, idx: Option<u32>, mem: Memory)
pub fn is_all_memory_writable(&self) -> bool
pub fn is_memory_range_writable(&self, idx: u32, length: Option<u16>) -> bool
pub fn n_memory(&self) -> u32
pub fn peek_memory(&self, idx: u32) -> &MemoryRef
pub fn peek_memory_mut(&mut self, idx: u32) -> Result<&mut MemoryRef, BoolError>
pub fn prepend_memory(&mut self, mem: Memory)
pub fn remove_all_memory(&mut self)
pub fn remove_memory(&mut self, idx: u32)
pub fn remove_memory_range(&mut self, idx: u32, length: Option<u32>)
pub fn replace_all_memory(&mut self, mem: Memory)
pub fn replace_memory(&mut self, idx: u32, mem: Memory)
pub fn replace_memory_range(
&mut self,
idx: u32,
length: Option<u32>,
mem: Memory
)
pub fn iter_memories(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = &'a MemoryRef;
pub fn iter_memories_mut(&mut self) -> Result<IterMut<'_>, BoolError>
pub fn iter_memories_owned(&self) -> IterOwned<'_>ⓘNotable traits for IterOwned<'a>impl<'a> Iterator for IterOwned<'a> type Item = Memory;
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>
pub fn as_cursor_writable(
&mut self
) -> Result<BufferRefCursor<&mut BufferRef>, BoolError>
Trait Implementations
sourceimpl Extend<Memory> for BufferRef
impl Extend<Memory> for BufferRef
sourcefn extend<T: IntoIterator<Item = Memory>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Memory>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬 This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬 This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<'a> FromValue<'a> for &'a BufferRef
impl<'a> FromValue<'a> for &'a BufferRef
type Checker = GenericValueTypeOrNoneChecker<Self>
type Checker = GenericValueTypeOrNoneChecker<Self>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a Value
. Read more
sourceimpl<'a> IntoIterator for &'a BufferRef
impl<'a> IntoIterator for &'a BufferRef
sourceimpl StaticType for BufferRef
impl StaticType for BufferRef
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
sourceimpl ToOwned for BufferRef
impl ToOwned for BufferRef
impl Eq for BufferRef
impl Send for BufferRef
impl Sync for BufferRef
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.