pub struct CVPixelBufferPool { /* private fields */ }CVPixelBufferPool only.Expand description
Implementations§
Source§impl CVPixelBufferPool
impl CVPixelBufferPool
Sourcepub unsafe fn create(
allocator: Option<&CFAllocator>,
pool_attributes: Option<&CFDictionary>,
pixel_buffer_attributes: Option<&CFDictionary>,
pool_out: NonNull<*mut CVPixelBufferPool>,
) -> CVReturn
Available on crate feature CVReturn only.
pub unsafe fn create( allocator: Option<&CFAllocator>, pool_attributes: Option<&CFDictionary>, pixel_buffer_attributes: Option<&CFDictionary>, pool_out: NonNull<*mut CVPixelBufferPool>, ) -> CVReturn
CVReturn only.Creates a new Pixel Buffer pool.
Parameter allocator: The CFAllocatorRef to use for allocating this buffer pool. May be NULL.
Parameter attributes: A CFDictionaryRef containing the attributes to be used for creating new PixelBuffers within the pool.
Parameter poolOut: The newly created pool will be placed here
Returns: Returns kCVReturnSuccess on success
§Safety
pool_attributesgenerics must be of the correct type.pixel_buffer_attributesgenerics must be of the correct type.pool_outmust be a valid pointer.
Sourcepub fn attributes(&self) -> Option<CFRetained<CFDictionary>>
pub fn attributes(&self) -> Option<CFRetained<CFDictionary>>
Returns the pool attributes dictionary for a CVPixelBufferPool
Parameter pool: The CVPixelBufferPoolRef to retrieve the attributes from
Returns: Returns the pool attributes dictionary, or NULL on failure.
Sourcepub fn pixel_buffer_attributes(&self) -> Option<CFRetained<CFDictionary>>
pub fn pixel_buffer_attributes(&self) -> Option<CFRetained<CFDictionary>>
Returns the attributes of pixel buffers that will be created from this pool.
This function is provided for those cases where you may need to know some information about the buffers that will be created up front.
Parameter pool: The CVPixelBufferPoolRef to retrieve the attributes from
Returns: Returns the pixel buffer attributes dictionary, or NULL on failure.
Sourcepub unsafe fn create_pixel_buffer(
allocator: Option<&CFAllocator>,
pixel_buffer_pool: &CVPixelBufferPool,
pixel_buffer_out: NonNull<*mut CVPixelBuffer>,
) -> CVReturn
Available on crate features CVBuffer and CVImageBuffer and CVPixelBuffer and CVReturn only.
pub unsafe fn create_pixel_buffer( allocator: Option<&CFAllocator>, pixel_buffer_pool: &CVPixelBufferPool, pixel_buffer_out: NonNull<*mut CVPixelBuffer>, ) -> CVReturn
CVBuffer and CVImageBuffer and CVPixelBuffer and CVReturn only.Creates a new PixelBuffer object from the pool.
The function creates a new (attachment-free) CVPixelBuffer using the pixel buffer attributes specifed during pool creation.
Parameter allocator: The CFAllocatorRef to use for creating the pixel buffer. May be NULL.
Parameter pool: The CVPixelBufferPool that should create the new CVPixelBuffer.
Parameter pixelBufferOut: The newly created pixel buffer will be placed here
Returns: Returns kCVReturnSuccess on success
§Safety
pixel_buffer_out must be a valid pointer.
Sourcepub unsafe fn create_pixel_buffer_with_aux_attributes(
allocator: Option<&CFAllocator>,
pixel_buffer_pool: &CVPixelBufferPool,
aux_attributes: Option<&CFDictionary>,
pixel_buffer_out: NonNull<*mut CVPixelBuffer>,
) -> CVReturn
Available on crate features CVBuffer and CVImageBuffer and CVPixelBuffer and CVReturn only.
pub unsafe fn create_pixel_buffer_with_aux_attributes( allocator: Option<&CFAllocator>, pixel_buffer_pool: &CVPixelBufferPool, aux_attributes: Option<&CFDictionary>, pixel_buffer_out: NonNull<*mut CVPixelBuffer>, ) -> CVReturn
CVBuffer and CVImageBuffer and CVPixelBuffer and CVReturn only.§Safety
aux_attributesgenerics must be of the correct type.pixel_buffer_outmust be a valid pointer.
Source§impl CVPixelBufferPool
impl CVPixelBufferPool
Sourcepub fn flush(&self, options: CVPixelBufferPoolFlushFlags)
Available on crate feature CVBase only.
pub fn flush(&self, options: CVPixelBufferPoolFlushFlags)
CVBase only.Frees as many buffers from the pool as possible.
By default, this function will free all aged out buffers. Setting the kCVPixelBufferPoolFlushExcessBuffers flag will cause this call to free all unused buffers regardless of age.
Parameter pool: The CVPixelBufferPool to be flushed.
Parameter options: Set to kCVPixelBufferPoolFlushExcessBuffers to free all unused buffers
regardless of their age.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CVPixelBufferPool
impl AsRef<AnyObject> for CVPixelBufferPool
Source§impl AsRef<CFType> for CVPixelBufferPool
impl AsRef<CFType> for CVPixelBufferPool
Source§impl AsRef<CVPixelBufferPool> for CVPixelBufferPool
impl AsRef<CVPixelBufferPool> for CVPixelBufferPool
Source§impl Borrow<AnyObject> for CVPixelBufferPool
impl Borrow<AnyObject> for CVPixelBufferPool
Source§impl Borrow<CFType> for CVPixelBufferPool
impl Borrow<CFType> for CVPixelBufferPool
Source§impl ConcreteType for CVPixelBufferPool
impl ConcreteType for CVPixelBufferPool
Source§impl Debug for CVPixelBufferPool
impl Debug for CVPixelBufferPool
Source§impl Deref for CVPixelBufferPool
impl Deref for CVPixelBufferPool
Source§impl Hash for CVPixelBufferPool
impl Hash for CVPixelBufferPool
Source§impl Message for CVPixelBufferPool
impl Message for CVPixelBufferPool
Source§impl PartialEq for CVPixelBufferPool
impl PartialEq for CVPixelBufferPool
Source§impl RefEncode for CVPixelBufferPool
impl RefEncode for CVPixelBufferPool
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CVPixelBufferPool
impl Type for CVPixelBufferPool
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more