#[repr(transparent)]pub struct Buffer {
obj: NonNull<GstBuffer>,
}
Fields§
§obj: NonNull<GstBuffer>
Implementations§
source§impl Buffer
impl Buffer
pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const *const GstBuffer) -> &'a Self
pub unsafe fn from_glib_none(ptr: *const GstBuffer) -> Self
pub unsafe fn from_glib_full(ptr: *const GstBuffer) -> Self
pub unsafe fn from_glib_borrow(ptr: *const GstBuffer) -> Borrowed<Self>
pub unsafe fn replace_ptr(&mut self, ptr: *mut GstBuffer)
pub fn make_mut(&mut self) -> &mut BufferRef
pub fn get_mut(&mut self) -> Option<&mut BufferRef>
pub fn is_writable(&self) -> bool
pub fn upcast(self) -> MiniObject
source§impl Buffer
impl Buffer
pub fn new() -> Self
pub fn with_size(size: usize) -> Result<Self, BoolError>
pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Self
pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Self
pub fn into_mapped_buffer_readable(self) -> Result<MappedBuffer<Readable>, Self>
pub fn into_mapped_buffer_writable(self) -> Result<MappedBuffer<Writable>, Self>
pub fn into_cursor_readable(self) -> BufferCursor<Readable> ⓘ
pub fn into_cursor_writable(self) -> Result<BufferCursor<Writable>, BoolError>
pub fn append(&mut self, other: Self)
Methods from Deref<Target = BufferRef>§
pub fn as_ptr(&self) -> *const GstBuffer
pub fn as_mut_ptr(&self) -> *mut GstBuffer
pub fn copy(&self) -> Buffer
pub fn upcast_ref(&self) -> &MiniObjectRef
pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, BoolError>
fn memory_range_into_idx_len( &self, range: impl RangeBounds<u32>, ) -> Result<(u32, i32), BoolError>
pub fn map_range_readable( &self, range: impl RangeBounds<u32>, ) -> Result<BufferMap<'_, Readable>, BoolError>
pub(crate) fn byte_range_into_offset_len( &self, range: impl RangeBounds<usize>, ) -> Result<(usize, usize), 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_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 offset(&self) -> u64
pub fn offset_end(&self) -> u64
pub fn pts(&self) -> Option<ClockTime>
pub fn dts(&self) -> Option<ClockTime>
pub fn dts_or_pts(&self) -> Option<ClockTime>
pub fn duration(&self) -> Option<ClockTime>
pub fn flags(&self) -> BufferFlags
pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<'_, T>>
pub fn iter_meta<T: MetaAPI>(&self) -> MetaIter<'_, T> ⓘ
pub fn foreach_meta<F: FnMut(MetaRef<'_, Meta>) -> ControlFlow<(), ()>>( &self, func: F, ) -> bool
pub fn find_memory( &self, range: impl RangeBounds<usize>, ) -> Option<(Range<u32>, usize)>
pub fn all_memory(&self) -> Option<Memory>
pub fn memory(&self, idx: u32) -> Option<Memory>
pub fn memory_range(&self, range: impl RangeBounds<u32>) -> Option<Memory>
pub fn is_all_memory_writable(&self) -> bool
pub fn is_memory_range_writable(&self, range: impl RangeBounds<u32>) -> bool
pub fn n_memory(&self) -> u32
pub fn peek_memory(&self, idx: u32) -> &MemoryRef
pub fn iter_memories(&self) -> Iter<'_> ⓘ
pub fn iter_memories_owned(&self) -> IterOwned<'_> ⓘ
pub fn as_cursor_readable(&self) -> BufferRefCursor<&BufferRef> ⓘ
pub fn dump(&self) -> Dump<'_>
pub fn dump_range(&self, range: impl RangeBounds<usize>) -> Dump<'_>
Trait Implementations§
source§impl Extend<Buffer> for BufferListRef
impl Extend<Buffer> for BufferListRef
source§fn extend<T: IntoIterator<Item = Buffer>>(&mut self, iter: T)
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)
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 From<Buffer> for BufferList
impl From<Buffer> for BufferList
source§impl FromIterator<Buffer> for BufferList
impl FromIterator<Buffer> for BufferList
source§impl FromIterator<Memory> for Buffer
impl FromIterator<Memory> for Buffer
source§impl<'a> FromValue<'a> for &'a Buffer
impl<'a> FromValue<'a> for &'a Buffer
source§type Checker = GenericValueTypeOrNoneChecker<&'a Buffer>
type Checker = GenericValueTypeOrNoneChecker<&'a Buffer>
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> FromValue<'a> for Buffer
impl<'a> FromValue<'a> for Buffer
source§type Checker = GenericValueTypeOrNoneChecker<Buffer>
type Checker = GenericValueTypeOrNoneChecker<Buffer>
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 HasParamSpec for Buffer
impl HasParamSpec for Buffer
source§impl IntoGlibPtr<*mut GstBuffer> for Buffer
impl IntoGlibPtr<*mut GstBuffer> for Buffer
source§unsafe fn into_glib_ptr(self) -> *mut GstBuffer
unsafe fn into_glib_ptr(self) -> *mut GstBuffer
Transfer: full.
source§impl StaticType for Buffer
impl StaticType for Buffer
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer
impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer
type Storage = (PhantomData<&'a [Buffer]>, Option<Vec<*mut GstBuffer>>)
fn to_glib_none_from_slice( t: &'a [Buffer], ) -> (*const *mut GstBuffer, Self::Storage)
fn to_glib_container_from_slice( _: &'a [Buffer], ) -> (*const *mut GstBuffer, Self::Storage)
fn to_glib_full_from_slice(_: &[Buffer]) -> *const *mut GstBuffer
source§impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer
type Storage = (PhantomData<&'a [Buffer]>, Option<Vec<*mut GstBuffer>>)
fn to_glib_none_from_slice( t: &'a [Buffer], ) -> (*mut *mut GstBuffer, Self::Storage)
fn to_glib_container_from_slice( t: &'a [Buffer], ) -> (*mut *mut GstBuffer, Self::Storage)
fn to_glib_full_from_slice(t: &[Buffer]) -> *mut *mut GstBuffer
source§impl<'a> ToGlibPtr<'a, *const GstBuffer> for Buffer
impl<'a> ToGlibPtr<'a, *const GstBuffer> for Buffer
type Storage = PhantomData<&'a Buffer>
source§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
source§impl ToValueOptional for Buffer
impl ToValueOptional for Buffer
source§fn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an
Option
to a Value
.impl Eq for Buffer
impl Send for Buffer
impl Sync for Buffer
impl TransparentPtrType for Buffer
impl ValueTypeOptional for Buffer
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
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> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§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.
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.