Struct core_media::sample_buffer::CMSampleBuffer
source · pub struct CMSampleBuffer(/* private fields */);Implementations§
source§impl CMSampleBuffer
impl CMSampleBuffer
pub unsafe fn new( data_buffer: Option<&CMBlockBuffer>, data_ready: bool, make_data_ready_callback: CMSampleBufferMakeDataReadyCallback, make_data_ready_refcon: *mut c_void, format_description: Option<&CMFormatDescription>, num_samples: CMItemCount, sample_timing_array: Option<&[CMSampleTimingInfo]>, sample_size_array: Option<&[size_t]> ) -> Result<CMSampleBuffer, OSStatus>
pub fn new_with_make_data_ready_closure<F>( data_buffer: Option<&CMBlockBuffer>, data_ready: bool, format_description: Option<&CMFormatDescription>, num_samples: CMItemCount, sample_timing_array: Option<&[CMSampleTimingInfo]>, sample_size_array: Option<&[size_t]>, make_data_ready_closure: Option<F> ) -> Result<CMSampleBuffer, OSStatus>
pub fn new_ready( data_buffer: &CMBlockBuffer, format_description: Option<&CMFormatDescription>, num_samples: CMItemCount, sample_timing_array: Option<&[CMSampleTimingInfo]>, sample_size_array: Option<&[size_t]> ) -> Result<CMSampleBuffer, OSStatus>
pub unsafe fn new_audio_sample_buffer_with_packet_descriptions( data_buffer: Option<&CMBlockBuffer>, data_ready: bool, make_data_ready_callback: CMSampleBufferMakeDataReadyCallback, make_data_ready_refcon: *mut c_void, format_description: &CMFormatDescription, num_samples: CMItemCount, presentation_time_stamp: CMTime, packet_descriptions: Option<&[AudioStreamPacketDescription]> ) -> Result<CMSampleBuffer, OSStatus>
pub fn new_audio_sample_buffer_with_packet_descriptions_and_make_data_ready_closure<F>( data_buffer: Option<&CMBlockBuffer>, data_ready: bool, format_description: &CMFormatDescription, num_samples: CMItemCount, presentation_time_stamp: CMTime, packet_descriptions: Option<&[AudioStreamPacketDescription]>, make_data_ready_closure: Option<F> ) -> Result<CMSampleBuffer, OSStatus>
pub fn new_audio_sample_buffer_ready_with_packet_descriptions( data_buffer: &CMBlockBuffer, format_description: &CMFormatDescription, num_samples: CMItemCount, presentation_time_stamp: CMTime, packet_descriptions: Option<&[AudioStreamPacketDescription]> ) -> Result<CMSampleBuffer, OSStatus>
pub unsafe fn from_image_buffer( image_buffer: &CVImageBuffer, data_ready: bool, make_data_ready_callback: CMSampleBufferMakeDataReadyCallback, make_data_ready_refcon: *mut c_void, format_description: &CMVideoFormatDescription, sample_timing: &CMSampleTimingInfo ) -> Result<CMSampleBuffer, OSStatus>
pub fn from_image_buffer_with_make_data_ready_closure<F>( image_buffer: &CVImageBuffer, data_ready: bool, format_description: &CMVideoFormatDescription, sample_timing: &CMSampleTimingInfo, make_data_ready_closure: Option<F> ) -> Result<CMSampleBuffer, OSStatus>
pub fn from_image_buffer_ready( image_buffer: &CVImageBuffer, format_description: &CMVideoFormatDescription, sample_timing: &CMSampleTimingInfo ) -> Result<CMSampleBuffer, OSStatus>
pub fn copy(&self) -> Result<CMSampleBuffer, OSStatus>
pub fn copy_with_new_timing( &self, sample_timing_array: Option<&[CMSampleTimingInfo]> ) -> Result<CMSampleBuffer, OSStatus>
pub fn copy_for_range( &self, sample_range: CFRange ) -> Result<CMSampleBuffer, OSStatus>
pub fn set_data_buffer( &self, data_buffer: &CMBlockBuffer ) -> Result<(), OSStatus>
pub fn get_data_buffer(&self) -> Option<CMBlockBuffer>
pub fn get_image_buffer(&self) -> Option<CVImageBuffer>
pub fn set_data_buffer_from_audio_buffer_list( &self, flags: u32, buffer_list: &AudioBufferList ) -> Result<(), OSStatus>
pub fn set_data_ready(&self) -> Result<(), OSStatus>
pub fn is_data_ready(&self) -> bool
pub fn set_data_failed(&self, status: OSStatus) -> Result<(), OSStatus>
pub fn has_data_failed(&self) -> (OSStatus, bool)
pub fn make_data_ready(&self) -> Result<(), OSStatus>
pub fn track_data_readiness( &self, sample_buffer_to_track: &CMSampleBuffer ) -> Result<(), OSStatus>
pub fn invalidate(&self) -> Result<(), OSStatus>
pub unsafe fn set_invalidate_callback( &self, invalidate_callback: CMSampleBufferInvalidateCallback, invalidate_ref_con: u64 ) -> Result<(), OSStatus>
pub fn set_invalidate_closure<F>(
&self,
invalidate_closure: Option<F>
) -> Result<(), OSStatus>where
F: Fn(CMSampleBuffer) + 'static,
pub fn is_valid(&self) -> bool
pub fn get_num_samples(&self) -> CMItemCount
pub fn get_duration(&self) -> CMTime
pub fn get_presentation_time_stamp(&self) -> CMTime
pub fn get_decode_time_stamp(&self) -> CMTime
pub fn get_output_duration(&self) -> CMTime
pub fn get_output_presentation_time_stamp(&self) -> CMTime
pub fn set_output_presentation_time_stamp( &self, output_presentation_time_stamp: CMTime ) -> Result<(), OSStatus>
pub fn get_output_decode_time_stamp(&self) -> CMTime
pub fn get_sample_timing_info_array(&self) -> Option<Vec<CMSampleTimingInfo>>
pub fn get_sample_timing_info( &self, sample_index: CMItemCount ) -> Option<CMSampleTimingInfo>
pub fn get_sample_size_array(&self) -> Option<Vec<size_t>>
pub fn get_sample_size(&self, sample_index: CMItemCount) -> size_t
pub fn get_total_sample_size(&self) -> usize
pub fn get_format_description(&self) -> Option<CMFormatDescription>
pub fn get_sample_attachments_array( &self, create_if_necessary: bool ) -> Option<CFArray<CFDictionary<CFString, CFType>>>
pub unsafe fn call_for_each_sample( &self, callback: extern "C" fn(_: CMSampleBufferRef, _: CMItemCount, _: *mut c_void) -> OSStatus, refcon: *mut c_void ) -> Result<(), OSStatus>
pub fn call_closure_for_each_sample<F>( &self, closure: Option<F> ) -> Result<(), OSStatus>
Trait Implementations§
source§impl Clone for CMSampleBuffer
impl Clone for CMSampleBuffer
source§fn clone(&self) -> CMSampleBuffer
fn clone(&self) -> CMSampleBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CMSampleBuffer
impl Debug for CMSampleBuffer
source§impl Drop for CMSampleBuffer
impl Drop for CMSampleBuffer
source§impl PartialEq for CMSampleBuffer
impl PartialEq for CMSampleBuffer
source§fn eq(&self, other: &CMSampleBuffer) -> bool
fn eq(&self, other: &CMSampleBuffer) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TCFType for CMSampleBuffer
impl TCFType for CMSampleBuffer
§type Ref = *mut opaqueCMSampleBuffer
type Ref = *mut opaqueCMSampleBuffer
The reference type wrapped inside this type.
source§fn as_concrete_TypeRef(&self) -> CMSampleBufferRef
fn as_concrete_TypeRef(&self) -> CMSampleBufferRef
Returns the object as its concrete
TypeRef.source§unsafe fn wrap_under_get_rule(reference: CMSampleBufferRef) -> Self
unsafe fn wrap_under_get_rule(reference: CMSampleBufferRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef. The reference count is not adjusted.source§unsafe fn wrap_under_create_rule(reference: CMSampleBufferRef) -> Self
unsafe fn wrap_under_create_rule(reference: CMSampleBufferRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType. The reference count is incremented by one.source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
Returns the object as a wrapped
CFType. Consumes self and avoids changing the reference
count.source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
Returns
true if this value is an instance of another type.source§impl<'a> ToVoid<CMSampleBuffer> for &'a CMSampleBuffer
impl<'a> ToVoid<CMSampleBuffer> for &'a CMSampleBuffer
source§impl ToVoid<CMSampleBuffer> for CMSampleBufferRef
impl ToVoid<CMSampleBuffer> for CMSampleBufferRef
source§impl ToVoid<CMSampleBuffer> for CMSampleBuffer
impl ToVoid<CMSampleBuffer> for CMSampleBuffer
impl ConcreteCFType for CMSampleBuffer
impl Eq for CMSampleBuffer
Auto Trait Implementations§
impl Freeze for CMSampleBuffer
impl RefUnwindSafe for CMSampleBuffer
impl !Send for CMSampleBuffer
impl !Sync for CMSampleBuffer
impl Unpin for CMSampleBuffer
impl UnwindSafe for CMSampleBuffer
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