Struct gstreamer::buffer::BufferRef

source ·
#[repr(transparent)]
pub struct BufferRef(GstBuffer);

Tuple Fields§

§0: GstBuffer

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§

impl BufferRef

source

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

source

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

source

fn memory_range_into_idx_len( &self, range: impl RangeBounds<u32>, ) -> Result<(u32, i32), BoolError>

source

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

source

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

source

pub(crate) fn byte_range_into_offset_len( &self, range: impl RangeBounds<usize>, ) -> Result<(usize, usize), 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 copy_deep(&self) -> Result<Buffer, BoolError>

source

pub fn size(&self) -> usize

source

pub fn maxsize(&self) -> usize

source

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

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<u32>, usize)>

source

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

source

pub fn max_memory() -> u32

source

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

source

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

source

pub fn insert_memory(&mut self, idx: u32, mem: Memory)

source

pub fn is_all_memory_writable(&self) -> bool

source

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

source

pub fn n_memory(&self) -> u32

source

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

source

pub fn peek_memory_mut(&mut self, idx: u32) -> 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: u32)

source

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

source

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

source

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

source

pub fn replace_memory_range( &mut self, range: impl RangeBounds<u32>, 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 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<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 · 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 · 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 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 · 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 StaticType for BufferRef

source§

fn static_type() -> Type

Returns the type identifier of Self.
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
source§

impl Eq for BufferRef

source§

impl Send for BufferRef

source§

impl Sync for BufferRef

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.