Struct CMFormatDescription
pub struct CMFormatDescription(/* private fields */);Expand description
Owned wrapper around CMFormatDescriptionRef.
Implementations§
§impl CMFormatDescription
impl CMFormatDescription
pub fn from_raw(ptr: *mut c_void) -> Option<CMFormatDescription>
pub fn from_raw(ptr: *mut c_void) -> Option<CMFormatDescription>
Wraps a +1 retained CMFormatDescriptionRef and returns None for null.
pub const unsafe fn from_ptr(ptr: *mut c_void) -> CMFormatDescription
pub const unsafe fn from_ptr(ptr: *mut c_void) -> CMFormatDescription
Wraps a raw CMFormatDescriptionRef by taking ownership without retaining it.
§Safety
The caller must ensure ptr is a valid +1 retained CMFormatDescriptionRef.
pub fn media_type_raw(&self) -> u32
pub fn media_type_raw(&self) -> u32
Get the media type as a raw u32 value
pub fn media_type(&self) -> FourCharCode
pub fn media_type(&self) -> FourCharCode
Get the media type as FourCharCode
pub fn media_subtype_raw(&self) -> u32
pub fn media_subtype_raw(&self) -> u32
Get the media subtype (codec type) as a raw u32 value
pub fn media_subtype(&self) -> FourCharCode
pub fn media_subtype(&self) -> FourCharCode
Get the media subtype as FourCharCode
pub fn extensions(&self) -> Option<*const c_void>
pub fn extensions(&self) -> Option<*const c_void>
Get format description extensions
pub fn is_closed_caption(&self) -> bool
pub fn is_closed_caption(&self) -> bool
Check if this is a closed caption format description
pub fn is_metadata(&self) -> bool
pub fn is_metadata(&self) -> bool
Check if this is a metadata format description
pub fn is_timecode(&self) -> bool
pub fn is_timecode(&self) -> bool
Check if this is a timecode format description
pub fn media_type_string(&self) -> String
pub fn media_type_string(&self) -> String
Get a human-readable string for the media type
pub fn media_subtype_string(&self) -> String
pub fn media_subtype_string(&self) -> String
Get a human-readable string for the media subtype (codec)
pub fn audio_sample_rate(&self) -> Option<f64>
pub fn audio_sample_rate(&self) -> Option<f64>
Get the audio sample rate in Hz
Returns None if this is not an audio format description.
pub fn audio_channel_count(&self) -> Option<u32>
pub fn audio_channel_count(&self) -> Option<u32>
Get the number of audio channels
Returns None if this is not an audio format description.
pub fn audio_bits_per_channel(&self) -> Option<u32>
pub fn audio_bits_per_channel(&self) -> Option<u32>
Get the bits per audio channel
Returns None if this is not an audio format description.
pub fn audio_bytes_per_frame(&self) -> Option<u32>
pub fn audio_bytes_per_frame(&self) -> Option<u32>
Get the bytes per audio frame
Returns None if this is not an audio format description.
pub fn audio_format_flags(&self) -> Option<u32>
pub fn audio_format_flags(&self) -> Option<u32>
Get the audio format flags
Returns None if this is not an audio format description.
pub fn audio_is_float(&self) -> bool
pub fn audio_is_float(&self) -> bool
Check if audio is float format (based on format flags)
pub fn audio_is_big_endian(&self) -> bool
pub fn audio_is_big_endian(&self) -> bool
Check if audio is big-endian (based on format flags)
Trait Implementations§
§impl Clone for CMFormatDescription
impl Clone for CMFormatDescription
§fn clone(&self) -> CMFormatDescription
fn clone(&self) -> CMFormatDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more