pub struct BufferRef(/* private fields */);
Implementations§
source§impl BufferRef
impl BufferRef
pub fn as_ptr(&self) -> *const GstBuffer
pub 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
pub fn ptr_eq(this: &BufferRef, other: &BufferRef) -> bool
source§impl BufferRef
impl BufferRef
pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, BoolError>
pub fn map_writable(&mut self) -> Result<BufferMap<'_, Writable>, BoolError>
pub fn map_range_readable( &self, range: impl RangeBounds<usize>, ) -> Result<BufferMap<'_, Readable>, BoolError>
pub fn map_range_writable( &mut self, range: impl RangeBounds<usize>, ) -> Result<BufferMap<'_, Writable>, BoolError>
pub fn copy_region( &self, flags: BufferCopyFlags, range: impl RangeBounds<usize>, ) -> Result<Buffer, BoolError>
pub fn copy_into( &self, dest: &mut BufferRef, flags: BufferCopyFlags, range: impl RangeBounds<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> ⓘ
pub fn iter_meta_mut<T: MetaAPI>(&mut self) -> MetaIterMut<'_, T> ⓘ
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, range: impl RangeBounds<usize>, ) -> Option<(Range<usize>, usize)>
pub fn all_memory(&self) -> Option<Memory>
pub fn max_memory() -> usize
pub fn memory(&self, idx: usize) -> Option<Memory>
pub fn memory_range(&self, range: impl RangeBounds<usize>) -> Option<Memory>
pub fn insert_memory(&mut self, idx: impl Into<Option<usize>>, mem: Memory)
pub fn is_all_memory_writable(&self) -> bool
pub fn is_memory_range_writable(&self, range: impl RangeBounds<usize>) -> bool
pub fn n_memory(&self) -> usize
pub fn peek_memory(&self, idx: usize) -> &MemoryRef
pub fn peek_memory_mut( &mut self, idx: usize, ) -> 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: usize)
pub fn remove_memory_range(&mut self, range: impl RangeBounds<usize>)
pub fn replace_all_memory(&mut self, mem: Memory)
pub fn replace_memory(&mut self, idx: usize, mem: Memory)
pub fn replace_memory_range( &mut self, range: impl RangeBounds<usize>, mem: Memory, )
pub fn iter_memories(&self) -> Iter<'_> ⓘ
pub fn iter_memories_mut(&mut self) -> Result<IterMut<'_>, BoolError>
pub fn iter_memories_owned(&self) -> IterOwned<'_> ⓘ
pub fn as_cursor_readable(&self) -> BufferRefCursor<&BufferRef> ⓘ
pub fn as_cursor_writable( &mut self, ) -> Result<BufferRefCursor<&mut BufferRef>, BoolError>
pub fn dump(&self) -> Dump<'_>
pub fn dump_range(&self, range: impl RangeBounds<usize>) -> Dump<'_>
Trait Implementations§
source§impl Extend<Memory> for BufferRef
impl Extend<Memory> for BufferRef
source§fn 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
source§fn 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.
source§fn 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
source§impl<'a> FromValue<'a> for &'a BufferRef
impl<'a> FromValue<'a> for &'a BufferRef
§type Checker = GenericValueTypeOrNoneChecker<&'a BufferRef>
type Checker = GenericValueTypeOrNoneChecker<&'a BufferRef>
Value type checker.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl<'a> IntoIterator for &'a BufferRef
impl<'a> IntoIterator for &'a BufferRef
source§impl PartialEq<Buffer> for BufferRef
impl PartialEq<Buffer> for BufferRef
source§impl PartialEq<BufferRef> for Buffer
impl PartialEq<BufferRef> for Buffer
source§impl PartialEq for BufferRef
impl PartialEq for BufferRef
source§impl StaticType for BufferRef
impl StaticType for BufferRef
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl ToOwned for BufferRef
impl ToOwned for BufferRef
impl Eq for BufferRef
impl Send for BufferRef
impl Sync for BufferRef
Auto Trait Implementations§
impl Freeze for BufferRef
impl RefUnwindSafe for BufferRef
impl Unpin for BufferRef
impl UnwindSafe for BufferRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.