Struct gstreamer::buffer::Buffer

source ·
#[repr(transparent)]
pub struct Buffer { obj: NonNull<GstBuffer>, }

Fields§

§obj: NonNull<GstBuffer>

Implementations§

source§

impl Buffer

source

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

source

pub unsafe fn from_glib_none(ptr: *const GstBuffer) -> Self

source

pub unsafe fn from_glib_full(ptr: *const GstBuffer) -> Self

source

pub unsafe fn from_glib_borrow(ptr: *const GstBuffer) -> Borrowed<Self>

source

pub unsafe fn replace_ptr(&mut self, ptr: *mut GstBuffer)

source

pub fn make_mut(&mut self) -> &mut BufferRef

source

pub fn get_mut(&mut self) -> Option<&mut BufferRef>

source

pub fn is_writable(&self) -> bool

source

pub fn upcast(self) -> MiniObject

source§

impl Buffer

source

pub fn new() -> Self

source

pub fn with_size(size: usize) -> Result<Self, BoolError>

source

pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Self

source

pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Self

source

pub fn into_mapped_buffer_readable(self) -> Result<MappedBuffer<Readable>, Self>

source

pub fn into_mapped_buffer_writable(self) -> Result<MappedBuffer<Writable>, Self>

source

pub fn into_cursor_readable(self) -> BufferCursor<Readable>

source

pub fn into_cursor_writable(self) -> Result<BufferCursor<Writable>, BoolError>

source

pub fn append(&mut self, other: Self)

Methods from Deref<Target = BufferRef>§

source

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

source

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

source

pub fn copy(&self) -> Buffer

source

pub fn upcast_ref(&self) -> &MiniObjectRef

source

pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, 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(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_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 offset(&self) -> u64

source

pub fn offset_end(&self) -> u64

source

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

source

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

source

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

source

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

source

pub fn flags(&self) -> BufferFlags

source

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

source

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

source

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

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 memory(&self, idx: u32) -> Option<Memory>

source

pub fn memory_range(&self, range: impl RangeBounds<u32>) -> Option<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 iter_memories(&self) -> Iter<'_>

source

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

source

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

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 Clone for Buffer

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Buffer

source§

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

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

impl Default for Buffer

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Deref for Buffer

source§

type Target = BufferRef

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Drop for Buffer

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Extend<Buffer> for BufferListRef

source§

fn extend<T: IntoIterator<Item = Buffer>>(&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<const N: usize> From<[Memory; N]> for Buffer

source§

fn from(value: [Memory; N]) -> Self

Converts to this type from the input type.
source§

impl From<Buffer> for BufferList

source§

fn from(value: Buffer) -> Self

Converts to this type from the input type.
source§

impl From<Buffer> for Value

source§

fn from(v: Buffer) -> Value

Converts to this type from the input type.
source§

impl From<Memory> for Buffer

source§

fn from(value: Memory) -> Self

Converts to this type from the input type.
source§

impl FromGlibContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer

source§

impl FromGlibContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer

source§

impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer

source§

impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer

source§

impl FromGlibPtrBorrow<*const GstBuffer> for Buffer

source§

impl FromGlibPtrBorrow<*mut GstBuffer> for Buffer

source§

impl FromGlibPtrFull<*const GstBuffer> for Buffer

source§

unsafe fn from_glib_full(ptr: *const GstBuffer) -> Self

Safety Read more
source§

impl FromGlibPtrFull<*mut GstBuffer> for Buffer

source§

unsafe fn from_glib_full(ptr: *mut GstBuffer) -> Self

Safety Read more
source§

impl FromGlibPtrNone<*const GstBuffer> for Buffer

source§

unsafe fn from_glib_none(ptr: *const GstBuffer) -> Self

Safety Read more
source§

impl FromGlibPtrNone<*mut GstBuffer> for Buffer

source§

unsafe fn from_glib_none(ptr: *mut GstBuffer) -> Self

Safety Read more
source§

impl FromIterator<Buffer> for BufferList

source§

fn from_iter<T: IntoIterator<Item = Buffer>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Memory> for Buffer

source§

fn from_iter<T: IntoIterator<Item = Memory>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<'a> FromValue<'a> for &'a Buffer

source§

type Checker = GenericValueTypeOrNoneChecker<&'a Buffer>

Value type checker.
source§

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

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

impl<'a> FromValue<'a> for Buffer

source§

type Checker = GenericValueTypeOrNoneChecker<Buffer>

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 Buffer

source§

impl HasParamSpec for Buffer

source§

type ParamSpec = ParamSpecBoxed

source§

type SetValue = Buffer

Preferred value to be used as setter for the associated ParamSpec.
source§

type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, Buffer>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl IntoGlibPtr<*mut GstBuffer> for Buffer

source§

unsafe fn into_glib_ptr(self) -> *mut GstBuffer

Transfer: full.
source§

impl IsMiniObject for Buffer

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 Buffer

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 StaticType for Buffer

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer

source§

impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer

source§

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

source§

type Storage = PhantomData<&'a Buffer>

source§

fn to_glib_none(&'a self) -> Stash<'a, *const GstBuffer, Self>

Transfer: none. Read more
source§

fn to_glib_full(&self) -> *const GstBuffer

Transfer: full. Read more
source§

fn to_glib_container(&'a self) -> Stash<'a, P, Self>

Transfer: container. Read more
source§

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

source§

type Storage = PhantomData<&'a Buffer>

source§

fn to_glib_none(&'a self) -> Stash<'a, *mut GstBuffer, Self>

Transfer: none. Read more
source§

fn to_glib_full(&self) -> *mut GstBuffer

Transfer: full. Read more
source§

fn to_glib_container(&'a self) -> Stash<'a, P, Self>

Transfer: container. Read more
source§

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

source§

type Storage = PhantomData<&'a mut Buffer>

source§

fn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstBuffer, Self>

Transfer: none. Read more
source§

impl ToValue for Buffer

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
source§

impl ToValueOptional for Buffer

source§

fn to_value_optional(s: Option<&Self>) -> Value

Convert an Option to a Value.
source§

impl ValueType for Buffer

source§

type Type = Buffer

Type to get the Type from. Read more
source§

impl Eq for Buffer

source§

impl Send for Buffer

source§

impl Sync for Buffer

source§

impl TransparentPtrType for Buffer

source§

impl ValueTypeOptional for Buffer

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

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> IntoClosureReturnValue for T
where T: Into<Value>,

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> Property for T
where T: HasParamSpec,

source§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

source§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

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

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T> TransparentType for T

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> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

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

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,