pub struct VTCompressionSession(/* private fields */);Implementations§
Source§impl VTCompressionSession
impl VTCompressionSession
pub fn new( width: i32, height: i32, codec_type: CMVideoCodecType, encoder_specification: CFDictionary<CFString, CFType>, source_image_buffer_attributes: CFDictionary<CFString, CFType>, compressed_data_allocator: CFAllocator, ) -> Result<VTCompressionSession, OSStatus>
pub unsafe fn new_with_callback( width: i32, height: i32, codec_type: CMVideoCodecType, encoder_specification: CFDictionary<CFString, CFType>, source_image_buffer_attributes: CFDictionary<CFString, CFType>, compressed_data_allocator: CFAllocator, output_callback: Option<*const VTCompressionOutputCallback>, output_callback_ref_con: Option<*mut c_void>, ) -> Result<VTCompressionSession, OSStatus>
pub fn invalidate(&self)
pub fn get_pixel_buffer_pool(&self) -> CVPixelBufferPool
pub fn prepare_to_encode_frames(&self) -> Result<(), OSStatus>
pub unsafe fn encode_frame( &self, image_buffer: CVImageBuffer, presentation_time_stamp: CMTime, duration: CMTime, frame_properties: CFDictionary<CFString, CFType>, source_frame_refcon: *mut c_void, ) -> Result<VTEncodeInfoFlags, OSStatus>
pub fn encode_frame_with_closure<F>( &self, image_buffer: CVImageBuffer, presentation_time_stamp: CMTime, duration: CMTime, frame_properties: CFDictionary<CFString, CFType>, closure: F, ) -> Result<VTEncodeInfoFlags, OSStatus>
pub fn complete_frames( &self, complete_until_presentation_time_stamp: CMTime, ) -> Result<(), OSStatus>
pub fn begin_pass( &self, begin_pass_flags: VTCompressionSessionOptionFlags, ) -> Result<(), OSStatus>
pub fn end_pass(&self) -> Result<Boolean, OSStatus>
pub fn get_time_ranges_for_next_pass( &self, ) -> Result<Vec<CMTimeRange>, OSStatus>
Trait Implementations§
Source§impl Clone for VTCompressionSession
impl Clone for VTCompressionSession
Source§impl Debug for VTCompressionSession
impl Debug for VTCompressionSession
Source§impl Drop for VTCompressionSession
impl Drop for VTCompressionSession
Source§impl PartialEq for VTCompressionSession
impl PartialEq for VTCompressionSession
Source§impl TCFType for VTCompressionSession
impl TCFType for VTCompressionSession
Source§fn as_concrete_TypeRef(&self) -> VTCompressionSessionRef
fn as_concrete_TypeRef(&self) -> VTCompressionSessionRef
Returns the object as its concrete
TypeRef.Source§unsafe fn wrap_under_get_rule(reference: VTCompressionSessionRef) -> Self
unsafe fn wrap_under_get_rule(reference: VTCompressionSessionRef) -> 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: VTCompressionSessionRef) -> Self
unsafe fn wrap_under_create_rule(reference: VTCompressionSessionRef) -> 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 TVTSession for VTCompressionSession
impl TVTSession for VTCompressionSession
fn as_session(&self) -> VTSession
fn into_session(self) -> VTSessionwhere
Self: Sized,
Source§impl<'a> ToVoid<VTCompressionSession> for &'a VTCompressionSession
impl<'a> ToVoid<VTCompressionSession> for &'a VTCompressionSession
impl ConcreteCFType for VTCompressionSession
impl Eq for VTCompressionSession
Auto Trait Implementations§
impl Freeze for VTCompressionSession
impl RefUnwindSafe for VTCompressionSession
impl !Send for VTCompressionSession
impl !Sync for VTCompressionSession
impl Unpin for VTCompressionSession
impl UnwindSafe for VTCompressionSession
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