pub struct VTHDRPerFrameMetadataGenerationSession { /* private fields */ }VTHDRPerFrameMetadataGenerationSession only.Expand description
A mechanism for generating HDR Per Frame Metadata and attaching that metadata to a CVPixelBuffer and the backing IOSurface.
VTHDRPerFrameMetadataGenerationSessionRef is a CF type, so call CFRelease to release your object reference.
See also Apple’s documentation
Implementations§
Source§impl VTHDRPerFrameMetadataGenerationSession
impl VTHDRPerFrameMetadataGenerationSession
Sourcepub unsafe fn create(
allocator: Option<&CFAllocator>,
frames_per_second: c_float,
options: Option<&CFDictionary>,
hdr_per_frame_metadata_generation_session_out: NonNull<*mut VTHDRPerFrameMetadataGenerationSession>,
) -> i32
pub unsafe fn create( allocator: Option<&CFAllocator>, frames_per_second: c_float, options: Option<&CFDictionary>, hdr_per_frame_metadata_generation_session_out: NonNull<*mut VTHDRPerFrameMetadataGenerationSession>, ) -> i32
Creates a VTHDRPerFrameMetadataGenerationSession object.
The returned VTHDRPerFrameMetadataGenerationSession object may be used to perform HDR Per Frame Metadata Generation Call CFRelease to release your object reference.
Parameter framesPerSecond: Value must be greater than 0.0
Parameter options: CFDictionary may contain the key kVTHDRPerFrameMetadataGenerationOptionsHDRFormatsKey.
§Safety
optionsgenerics must be of the correct type.hdr_per_frame_metadata_generation_session_outmust be a valid pointer.
Sourcepub unsafe fn attach_metadata(
&self,
pixel_buffer: &CVPixelBuffer,
scene_change: bool,
) -> i32
Available on crate feature objc2-core-video only.
pub unsafe fn attach_metadata( &self, pixel_buffer: &CVPixelBuffer, scene_change: bool, ) -> i32
objc2-core-video only.Attaches the Per Frame Metadata to the CVPixelBuffer and the backing IOSurface
Call this to analyze and attach HDR Metadata. This call will change CVPixelBuffer attachments and backing IOSurface attachments.
Parameter hdrPerFrameMetadataGenerationSession:
Parameter pixelBuffer:
Parameter sceneChange: If this frame changes significantly in brightness from the previous frame, for example going from an indoor scene to an outdoor scene or
from a night scene to a daytime scene, set this to true.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Available on crate feature VTSession only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
VTSession only.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
Available on crate feature VTSession only.
pub fn retain_count(&self) -> usize
VTSession only.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<VTHDRPerFrameMetadataGenerationSession> for VTHDRPerFrameMetadataGenerationSession
impl AsRef<VTHDRPerFrameMetadataGenerationSession> for VTHDRPerFrameMetadataGenerationSession
Source§impl RefEncode for VTHDRPerFrameMetadataGenerationSession
impl RefEncode for VTHDRPerFrameMetadataGenerationSession
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for VTHDRPerFrameMetadataGenerationSession
impl Type for VTHDRPerFrameMetadataGenerationSession
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