pub struct CMFormatDescription(/* private fields */);Implementations§
Source§impl CMFormatDescription
impl CMFormatDescription
pub fn from_raw(ptr: *mut c_void) -> Option<Self>
Sourcepub unsafe fn from_ptr(ptr: *mut c_void) -> Self
pub unsafe fn from_ptr(ptr: *mut c_void) -> Self
§Safety
The caller must ensure the pointer is a valid CMFormatDescription pointer.
pub fn as_ptr(&self) -> *mut c_void
Sourcepub fn media_type_raw(&self) -> u32
pub fn media_type_raw(&self) -> u32
Get the media type as a raw u32 value
Sourcepub fn media_type(&self) -> FourCharCode
pub fn media_type(&self) -> FourCharCode
Get the media type as FourCharCode
Sourcepub fn media_subtype_raw(&self) -> u32
pub fn media_subtype_raw(&self) -> u32
Get the media subtype (codec type) as a raw u32 value
Sourcepub fn media_subtype(&self) -> FourCharCode
pub fn media_subtype(&self) -> FourCharCode
Get the media subtype as FourCharCode
Sourcepub fn extensions(&self) -> Option<*const c_void>
pub fn extensions(&self) -> Option<*const c_void>
Get format description extensions
Sourcepub fn is_closed_caption(&self) -> bool
pub fn is_closed_caption(&self) -> bool
Check if this is a closed caption format description
Sourcepub fn is_metadata(&self) -> bool
pub fn is_metadata(&self) -> bool
Check if this is a metadata format description
Sourcepub fn is_timecode(&self) -> bool
pub fn is_timecode(&self) -> bool
Check if this is a timecode format description
Sourcepub fn media_type_string(&self) -> String
pub fn media_type_string(&self) -> String
Get a human-readable string for the media type
Sourcepub fn media_subtype_string(&self) -> String
pub fn media_subtype_string(&self) -> String
Get a human-readable string for the media subtype (codec)
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn audio_is_float(&self) -> bool
pub fn audio_is_float(&self) -> bool
Check if audio is float format (based on format flags)
Sourcepub 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)