Skip to main content

BufferRef

Struct BufferRef 

Source
pub struct BufferRef(/* private fields */);

Implementations§

Source§

impl BufferRef

Source

pub fn as_ptr(&self) -> *const GstBuffer

Source

pub fn as_mut_ptr(&self) -> *mut GstBuffer

Source

pub unsafe fn from_ptr<'a>(ptr: *const GstBuffer) -> &'a Self

Source

pub unsafe fn from_mut_ptr<'a>(ptr: *mut GstBuffer) -> &'a mut Self

Source

pub fn copy(&self) -> Buffer

Source

pub fn upcast_ref(&self) -> &MiniObjectRef

Source

pub fn upcast_mut(&mut self) -> &mut MiniObjectRef

Source

pub fn ptr_eq(this: &BufferRef, other: &BufferRef) -> bool

Source

pub fn mark_may_be_leaked(&mut self)

Source§

impl BufferRef

Source

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

Source

pub fn map_writable(&mut self) -> Result<BufferMap<'_, Writable>, BoolError>

Source

pub fn map_range_readable( &self, range: impl RangeBounds<usize>, ) -> Result<BufferMap<'_, Readable>, BoolError>

Source

pub fn map_range_writable( &mut self, range: impl RangeBounds<usize>, ) -> Result<BufferMap<'_, Writable>, BoolError>

Source

pub fn copy_region( &self, flags: BufferCopyFlags, range: impl RangeBounds<usize>, ) -> Result<Buffer, BoolError>

Source

pub fn copy_into( &self, dest: &mut BufferRef, flags: BufferCopyFlags, range: impl RangeBounds<usize>, ) -> Result<(), BoolError>

Source

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

Source

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

Source

pub fn memset( &mut self, range: impl RangeBounds<usize>, val: u8, ) -> Result<usize, BoolError>

Source

pub fn memcmp( &mut self, range: impl RangeBounds<usize>, slice: &[u8], ) -> Result<Ordering, BoolError>

Source

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

Source

pub fn sizes(&self) -> (usize, usize, usize)

Source

pub fn sizes_range( &self, range: impl RangeBounds<usize>, ) -> (usize, usize, usize)

Source

pub fn size(&self) -> usize

Source

pub fn maxsize(&self) -> usize

Source

pub fn set_size(&mut self, size: usize)

Source

pub fn resize( &mut self, range: impl RangeBounds<usize>, ) -> Result<(), BoolError>

Source

pub fn resize_range( &mut self, mem_range: impl RangeBounds<usize>, byte_range: impl RangeBounds<usize>, ) -> Result<(), BoolError>

Source

pub fn offset(&self) -> u64

Source

pub fn set_offset(&mut self, offset: u64)

Source

pub fn offset_end(&self) -> u64

Source

pub fn set_offset_end(&mut self, offset_end: u64)

Source

pub fn pts(&self) -> Option<ClockTime>

Source

pub fn set_pts(&mut self, pts: impl Into<Option<ClockTime>>)

Source

pub fn dts(&self) -> Option<ClockTime>

Source

pub fn set_dts(&mut self, dts: impl Into<Option<ClockTime>>)

Source

pub fn dts_or_pts(&self) -> Option<ClockTime>

Source

pub fn duration(&self) -> Option<ClockTime>

Source

pub fn set_duration(&mut self, duration: impl Into<Option<ClockTime>>)

Source

pub fn flags(&self) -> BufferFlags

Source

pub fn set_flags(&mut self, flags: BufferFlags)

Source

pub fn unset_flags(&mut self, flags: BufferFlags)

Source

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

Source

pub fn meta_mut<T: MetaAPI>(&mut self) -> Option<MetaRefMut<'_, T, Standalone>>

Source

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

Source

pub fn iter_meta_mut<T: MetaAPI>(&mut self) -> MetaIterMut<'_, T>

Source

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

Source

pub fn foreach_meta_mut<F: FnMut(MetaRefMut<'_, Meta, Iterated>) -> ControlFlow<BufferMetaForeachAction, BufferMetaForeachAction>>( &mut self, func: F, ) -> bool

Source

pub fn append_memory(&mut self, mem: Memory)

Source

pub fn find_memory( &self, range: impl RangeBounds<usize>, ) -> Option<(Range<usize>, usize)>

Source

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

Source

pub fn max_memory() -> usize

Source

pub fn memory(&self, idx: usize) -> Option<Memory>

Source

pub fn memory_range(&self, range: impl RangeBounds<usize>) -> Option<Memory>

Source

pub fn insert_memory(&mut self, idx: impl Into<Option<usize>>, mem: Memory)

Source

pub fn is_all_memory_writable(&self) -> bool

Source

pub fn is_memory_range_writable(&self, range: impl RangeBounds<usize>) -> bool

Source

pub fn n_memory(&self) -> usize

Source

pub fn peek_memory(&self, idx: usize) -> &MemoryRef

Source

pub fn peek_memory_mut( &mut self, idx: usize, ) -> Result<&mut MemoryRef, BoolError>

Source

pub fn prepend_memory(&mut self, mem: Memory)

Source

pub fn remove_all_memory(&mut self)

Source

pub fn remove_memory(&mut self, idx: usize)

Source

pub fn remove_memory_range(&mut self, range: impl RangeBounds<usize>)

Source

pub fn replace_all_memory(&mut self, mem: Memory)

Source

pub fn replace_memory(&mut self, idx: usize, mem: Memory)

Source

pub fn replace_memory_range( &mut self, range: impl RangeBounds<usize>, mem: Memory, )

Source

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

Source

pub fn iter_memories_mut(&mut self) -> Result<IterMut<'_>, BoolError>

Source

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

Source

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

Source

pub fn as_cursor_writable( &mut self, ) -> Result<BufferRefCursor<&mut BufferRef>, BoolError>

Source

pub fn dump(&self) -> Dump<'_>

Source

pub fn dump_range(&self, range: impl RangeBounds<usize>) -> Dump<'_>

Trait Implementations§

Source§

impl AsRef<BufferRef> for Buffer

Source§

fn as_ref(&self) -> &BufferRef

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<BufferRef> for Buffer

Source§

fn borrow(&self) -> &BufferRef

Immutably borrows from an owned value. Read more
Source§

impl Debug for BufferRef

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for BufferRef

Source§

impl Extend<Memory> for BufferRef

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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

Source§

type Checker = GenericValueTypeOrNoneChecker<&'a BufferRef>

Value type checker.
Source§

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

Get the contained value from a Value. Read more
Source§

impl GlibPtrDefault for BufferRef

Source§

impl<'a> IntoIterator for &'a BufferRef

Source§

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?
Source§

type Item = &'a MemoryRef

The type of the elements being iterated over.
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl PartialEq for BufferRef

Source§

fn eq(&self, other: &BufferRef) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Buffer> for BufferRef

Source§

fn eq(&self, other: &Buffer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<BufferRef> for Buffer

Source§

fn eq(&self, other: &BufferRef) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Send for BufferRef

Source§

impl Serialize for BufferRef

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StaticType for BufferRef

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Sync for BufferRef

Source§

impl ToOwned for BufferRef

Source§

type Owned = Buffer

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Buffer

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> StaticTypeExt for T
where T: StaticType,

Source§

fn ensure_type()

Ensures that the type has been registered with the type system.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.