Struct core_video::pixel_buffer::CVPixelBuffer
source · pub struct CVPixelBuffer(/* private fields */);Implementations§
source§impl CVPixelBuffer
impl CVPixelBuffer
pub fn new( pixel_format: OSType, width: usize, height: usize, options: Option<&CFDictionary<CFString, CFType>> ) -> Result<CVPixelBuffer, CVReturn>
pub unsafe fn new_with_bytes( pixel_format: OSType, width: usize, height: usize, base_address: *mut c_void, bytes_per_row: usize, release_callback: CVPixelBufferReleaseBytesCallback, release_ref_con: *mut c_void, options: Option<&CFDictionary<CFString, CFType>> ) -> Result<CVPixelBuffer, CVReturn>
pub unsafe fn new_with_planar_bytes( pixel_format: OSType, width: usize, height: usize, data_ptr: *mut c_void, data_size: usize, number_of_planes: usize, plane_base_address: Vec<*mut c_void>, plane_width: Vec<usize>, plane_height: Vec<usize>, plane_bytes_per_row: Vec<usize>, release_callback: CVPixelBufferReleasePlanarBytesCallback, release_ref_con: *mut c_void, options: Option<&CFDictionary<CFString, CFType>> ) -> Result<CVPixelBuffer, CVReturn>
pub fn lock_base_address(&self, options: CVPixelBufferLockFlags) -> CVReturn
pub fn unlock_base_address(&self, options: CVPixelBufferLockFlags) -> CVReturn
pub fn get_width(&self) -> usize
pub fn get_height(&self) -> usize
pub fn get_pixel_format(&self) -> OSType
pub fn get_base_address(&self) -> *mut c_void
pub fn get_bytes_per_row(&self) -> usize
pub fn is_planar(&self) -> bool
pub fn get_plane_count(&self) -> usize
pub fn get_width_of_plane(&self, plane_index: usize) -> usize
pub fn get_height_of_plane(&self, plane_index: usize) -> usize
pub fn get_base_address_of_plane(&self, plane_index: usize) -> *mut c_void
pub fn get_bytes_per_row_of_plane(&self, plane_index: usize) -> usize
pub fn get_extended_pixels(&self) -> (usize, usize, usize, usize)
pub fn fill_extended_pixels(&self) -> CVReturn
pub fn copy_creation_attributes(&self) -> Option<CFDictionary<CFString, CFType>>
source§impl CVPixelBuffer
impl CVPixelBuffer
pub fn from_io_surface( io_surface: &IOSurface, options: Option<&CFDictionary<CFString, CFType>> ) -> Result<CVPixelBuffer, CVReturn>
pub fn get_io_surface(&self) -> Option<IOSurface>
Trait Implementations§
source§impl Clone for CVPixelBuffer
impl Clone for CVPixelBuffer
source§fn clone(&self) -> CVPixelBuffer
fn clone(&self) -> CVPixelBuffer
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 CVPixelBuffer
impl Debug for CVPixelBuffer
source§impl Drop for CVPixelBuffer
impl Drop for CVPixelBuffer
source§impl PartialEq for CVPixelBuffer
impl PartialEq for CVPixelBuffer
source§fn eq(&self, other: &CVPixelBuffer) -> bool
fn eq(&self, other: &CVPixelBuffer) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TCFType for CVPixelBuffer
impl TCFType for CVPixelBuffer
§type Ref = *mut __CVBuffer
type Ref = *mut __CVBuffer
The reference type wrapped inside this type.
source§fn as_concrete_TypeRef(&self) -> CVPixelBufferRef
fn as_concrete_TypeRef(&self) -> CVPixelBufferRef
Returns the object as its concrete
TypeRef.source§unsafe fn wrap_under_get_rule(reference: CVPixelBufferRef) -> Self
unsafe fn wrap_under_get_rule(reference: CVPixelBufferRef) -> 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: CVPixelBufferRef) -> Self
unsafe fn wrap_under_create_rule(reference: CVPixelBufferRef) -> 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 TCVBuffer for CVPixelBuffer
impl TCVBuffer for CVPixelBuffer
source§impl TCVImageBuffer for CVPixelBuffer
impl TCVImageBuffer for CVPixelBuffer
fn as_image_buffer(&self) -> CVImageBuffer
fn into_image_buffer(self) -> CVImageBufferwhere
Self: Sized,
source§impl<'a> ToVoid<CVPixelBuffer> for &'a CVPixelBuffer
impl<'a> ToVoid<CVPixelBuffer> for &'a CVPixelBuffer
source§impl ToVoid<CVPixelBuffer> for CVPixelBufferRef
impl ToVoid<CVPixelBuffer> for CVPixelBufferRef
source§impl ToVoid<CVPixelBuffer> for CVPixelBuffer
impl ToVoid<CVPixelBuffer> for CVPixelBuffer
impl ConcreteCFType for CVPixelBuffer
impl Eq for CVPixelBuffer
Auto Trait Implementations§
impl Freeze for CVPixelBuffer
impl RefUnwindSafe for CVPixelBuffer
impl !Send for CVPixelBuffer
impl !Sync for CVPixelBuffer
impl Unpin for CVPixelBuffer
impl UnwindSafe for CVPixelBuffer
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