use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-audio-types")]
use objc2_core_audio_types::*;
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-video")]
use objc2_core_video::*;
use crate::*;
pub const kCMFormatDescriptionError_InvalidParameter: OSStatus = -12710;
pub const kCMFormatDescriptionError_AllocationFailed: OSStatus = -12711;
pub const kCMFormatDescriptionError_ValueNotAvailable: OSStatus = -12718;
#[doc(alias = "CMFormatDescriptionRef")]
#[repr(C)]
pub struct CMFormatDescription {
inner: [u8; 0],
_p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}
cf_type!(
unsafe impl CMFormatDescription {}
);
#[cfg(feature = "objc2")]
cf_objc2_type!(
unsafe impl RefEncode<"opaqueCMFormatDescription"> for CMFormatDescription {}
);
unsafe impl Send for CMFormatDescription {}
unsafe impl Sync for CMFormatDescription {}
pub type CMMediaType = FourCharCode;
pub const kCMMediaType_Video: CMMediaType = 0x76696465;
pub const kCMMediaType_Audio: CMMediaType = 0x736f756e;
pub const kCMMediaType_Muxed: CMMediaType = 0x6d757878;
pub const kCMMediaType_Text: CMMediaType = 0x74657874;
pub const kCMMediaType_ClosedCaption: CMMediaType = 0x636c6370;
pub const kCMMediaType_Subtitle: CMMediaType = 0x7362746c;
pub const kCMMediaType_TimeCode: CMMediaType = 0x746d6364;
pub const kCMMediaType_Metadata: CMMediaType = 0x6d657461;
pub const kCMMediaType_TaggedBufferGroup: CMMediaType = 0x74626772;
pub const kCMMediaType_AuxiliaryPicture: CMMediaType = 0x61757876;
impl CMFormatDescription {
#[doc(alias = "CMFormatDescriptionCreate")]
#[inline]
pub unsafe fn create(
allocator: Option<&CFAllocator>,
media_type: CMMediaType,
media_sub_type: FourCharCode,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMFormatDescription>,
) -> OSStatus {
extern "C-unwind" {
fn CMFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
media_type: CMMediaType,
media_sub_type: FourCharCode,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMFormatDescription>,
) -> OSStatus;
}
unsafe {
CMFormatDescriptionCreate(
allocator,
media_type,
media_sub_type,
extensions,
format_description_out,
)
}
}
}
unsafe impl ConcreteType for CMFormatDescription {
#[doc(alias = "CMFormatDescriptionGetTypeID")]
#[inline]
fn type_id() -> CFTypeID {
extern "C-unwind" {
fn CMFormatDescriptionGetTypeID() -> CFTypeID;
}
unsafe { CMFormatDescriptionGetTypeID() }
}
}
impl CMFormatDescription {
#[doc(alias = "CMFormatDescriptionEqual")]
#[inline]
pub unsafe fn equal(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
) -> bool {
extern "C-unwind" {
fn CMFormatDescriptionEqual(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
) -> Boolean;
}
let ret = unsafe { CMFormatDescriptionEqual(format_description, other_format_description) };
ret != 0
}
#[doc(alias = "CMFormatDescriptionEqualIgnoringExtensionKeys")]
#[inline]
pub unsafe fn equal_ignoring_extension_keys(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
format_description_extension_keys_to_ignore: Option<&CFType>,
sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
) -> bool {
extern "C-unwind" {
fn CMFormatDescriptionEqualIgnoringExtensionKeys(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
format_description_extension_keys_to_ignore: Option<&CFType>,
sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
) -> Boolean;
}
let ret = unsafe {
CMFormatDescriptionEqualIgnoringExtensionKeys(
format_description,
other_format_description,
format_description_extension_keys_to_ignore,
sample_description_extension_atom_keys_to_ignore,
)
};
ret != 0
}
#[doc(alias = "CMFormatDescriptionGetMediaType")]
#[inline]
pub unsafe fn media_type(&self) -> CMMediaType {
extern "C-unwind" {
fn CMFormatDescriptionGetMediaType(desc: &CMFormatDescription) -> CMMediaType;
}
unsafe { CMFormatDescriptionGetMediaType(self) }
}
#[doc(alias = "CMFormatDescriptionGetMediaSubType")]
#[inline]
pub unsafe fn media_sub_type(&self) -> FourCharCode {
extern "C-unwind" {
fn CMFormatDescriptionGetMediaSubType(desc: &CMFormatDescription) -> FourCharCode;
}
unsafe { CMFormatDescriptionGetMediaSubType(self) }
}
#[doc(alias = "CMFormatDescriptionGetExtensions")]
#[inline]
pub unsafe fn extensions(&self) -> Option<CFRetained<CFDictionary>> {
extern "C-unwind" {
fn CMFormatDescriptionGetExtensions(
desc: &CMFormatDescription,
) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CMFormatDescriptionGetExtensions(self) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
}
extern "C" {
pub static kCMFormatDescriptionExtension_OriginalCompressionSettings: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_VerbatimSampleDescription: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_VerbatimISOSampleEntry: &'static CFString;
}
impl CMFormatDescription {
#[doc(alias = "CMFormatDescriptionGetExtension")]
#[inline]
pub unsafe fn extension(&self, extension_key: &CFString) -> Option<CFRetained<CFPropertyList>> {
extern "C-unwind" {
fn CMFormatDescriptionGetExtension(
desc: &CMFormatDescription,
extension_key: &CFString,
) -> Option<NonNull<CFPropertyList>>;
}
let ret = unsafe { CMFormatDescriptionGetExtension(self, extension_key) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
}
pub type CMAudioCodecType = FourCharCode;
pub const kCMAudioCodecType_AAC_LCProtected: CMAudioCodecType = 0x70616163;
pub const kCMAudioCodecType_AAC_AudibleProtected: CMAudioCodecType = 0x61616163;
#[doc(alias = "CMAudioFormatDescriptionRef")]
pub type CMAudioFormatDescription = CMFormatDescription;
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
asbd: NonNull<AudioStreamBasicDescription>,
layout_size: usize,
layout: *const AudioChannelLayout,
magic_cookie_size: usize,
magic_cookie: *const c_void,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMAudioFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionGetStreamBasicDescription(
desc: &CMAudioFormatDescription,
) -> *const AudioStreamBasicDescription;
}
extern "C-unwind" {
pub fn CMAudioFormatDescriptionGetMagicCookie(
desc: &CMAudioFormatDescription,
size_out: *mut usize,
) -> *const c_void;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionGetChannelLayout(
desc: &CMAudioFormatDescription,
size_out: *mut usize,
) -> *const AudioChannelLayout;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionGetFormatList(
desc: &CMAudioFormatDescription,
size_out: *mut usize,
) -> *const AudioFormatListItem;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionGetRichestDecodableFormat(
desc: &CMAudioFormatDescription,
) -> *const AudioFormatListItem;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-audio-types")]
pub fn CMAudioFormatDescriptionGetMostCompatibleFormat(
desc: &CMAudioFormatDescription,
) -> *const AudioFormatListItem;
}
extern "C-unwind" {
pub fn CMAudioFormatDescriptionCreateSummary(
allocator: Option<&CFAllocator>,
format_description_array: &CFArray,
flags: u32,
format_description_out: NonNull<*const CMAudioFormatDescription>,
) -> OSStatus;
}
pub type CMAudioFormatDescriptionMask = u32;
pub const kCMAudioFormatDescriptionMask_StreamBasicDescription: CMAudioFormatDescriptionMask =
1 << 0;
pub const kCMAudioFormatDescriptionMask_MagicCookie: CMAudioFormatDescriptionMask = 1 << 1;
pub const kCMAudioFormatDescriptionMask_ChannelLayout: CMAudioFormatDescriptionMask = 1 << 2;
pub const kCMAudioFormatDescriptionMask_Extensions: CMAudioFormatDescriptionMask = 1 << 3;
pub const kCMAudioFormatDescriptionMask_All: CMAudioFormatDescriptionMask =
kCMAudioFormatDescriptionMask_StreamBasicDescription
| kCMAudioFormatDescriptionMask_MagicCookie
| kCMAudioFormatDescriptionMask_ChannelLayout
| kCMAudioFormatDescriptionMask_Extensions;
#[inline]
pub unsafe extern "C-unwind" fn CMAudioFormatDescriptionEqual(
format_description: &CMAudioFormatDescription,
other_format_description: &CMAudioFormatDescription,
equality_mask: CMAudioFormatDescriptionMask,
equality_mask_out: *mut CMAudioFormatDescriptionMask,
) -> bool {
extern "C-unwind" {
fn CMAudioFormatDescriptionEqual(
format_description: &CMAudioFormatDescription,
other_format_description: &CMAudioFormatDescription,
equality_mask: CMAudioFormatDescriptionMask,
equality_mask_out: *mut CMAudioFormatDescriptionMask,
) -> Boolean;
}
let ret = unsafe {
CMAudioFormatDescriptionEqual(
format_description,
other_format_description,
equality_mask,
equality_mask_out,
)
};
ret != 0
}
#[doc(alias = "CMVideoFormatDescriptionRef")]
pub type CMVideoFormatDescription = CMFormatDescription;
pub type CMPixelFormatType = FourCharCode;
pub const kCMPixelFormat_32ARGB: CMPixelFormatType = 32;
pub const kCMPixelFormat_32BGRA: CMPixelFormatType = 0x42475241;
pub const kCMPixelFormat_24RGB: CMPixelFormatType = 24;
pub const kCMPixelFormat_16BE555: CMPixelFormatType = 16;
pub const kCMPixelFormat_16BE565: CMPixelFormatType = 0x42353635;
pub const kCMPixelFormat_16LE555: CMPixelFormatType = 0x4c353535;
pub const kCMPixelFormat_16LE565: CMPixelFormatType = 0x4c353635;
pub const kCMPixelFormat_16LE5551: CMPixelFormatType = 0x35353531;
pub const kCMPixelFormat_422YpCbCr8: CMPixelFormatType = 0x32767579;
pub const kCMPixelFormat_422YpCbCr8_yuvs: CMPixelFormatType = 0x79757673;
pub const kCMPixelFormat_444YpCbCr8: CMPixelFormatType = 0x76333038;
pub const kCMPixelFormat_4444YpCbCrA8: CMPixelFormatType = 0x76343038;
pub const kCMPixelFormat_422YpCbCr16: CMPixelFormatType = 0x76323136;
pub const kCMPixelFormat_422YpCbCr10: CMPixelFormatType = 0x76323130;
pub const kCMPixelFormat_444YpCbCr10: CMPixelFormatType = 0x76343130;
pub const kCMPixelFormat_8IndexedGray_WhiteIsZero: CMPixelFormatType = 0x00000028;
pub type CMVideoCodecType = FourCharCode;
pub const kCMVideoCodecType_422YpCbCr8: CMVideoCodecType = kCMPixelFormat_422YpCbCr8;
pub const kCMVideoCodecType_Animation: CMVideoCodecType = 0x726c6520;
pub const kCMVideoCodecType_Cinepak: CMVideoCodecType = 0x63766964;
pub const kCMVideoCodecType_JPEG: CMVideoCodecType = 0x6a706567;
pub const kCMVideoCodecType_JPEG_OpenDML: CMVideoCodecType = 0x646d6231;
pub const kCMVideoCodecType_JPEG_XL: CMVideoCodecType = 0x6a786c63;
pub const kCMVideoCodecType_SorensonVideo: CMVideoCodecType = 0x53565131;
pub const kCMVideoCodecType_SorensonVideo3: CMVideoCodecType = 0x53565133;
pub const kCMVideoCodecType_H263: CMVideoCodecType = 0x68323633;
pub const kCMVideoCodecType_H264: CMVideoCodecType = 0x61766331;
pub const kCMVideoCodecType_HEVC: CMVideoCodecType = 0x68766331;
pub const kCMVideoCodecType_HEVCWithAlpha: CMVideoCodecType = 0x6d757861;
pub const kCMVideoCodecType_DolbyVisionHEVC: CMVideoCodecType = 0x64766831;
pub const kCMVideoCodecType_MPEG4Video: CMVideoCodecType = 0x6d703476;
pub const kCMVideoCodecType_MPEG2Video: CMVideoCodecType = 0x6d703276;
pub const kCMVideoCodecType_MPEG1Video: CMVideoCodecType = 0x6d703176;
pub const kCMVideoCodecType_VP9: CMVideoCodecType = 0x76703039;
pub const kCMVideoCodecType_DVCNTSC: CMVideoCodecType = 0x64766320;
pub const kCMVideoCodecType_DVCPAL: CMVideoCodecType = 0x64766370;
pub const kCMVideoCodecType_DVCProPAL: CMVideoCodecType = 0x64767070;
pub const kCMVideoCodecType_DVCPro50NTSC: CMVideoCodecType = 0x6476356e;
pub const kCMVideoCodecType_DVCPro50PAL: CMVideoCodecType = 0x64763570;
pub const kCMVideoCodecType_DVCPROHD720p60: CMVideoCodecType = 0x64766870;
pub const kCMVideoCodecType_DVCPROHD720p50: CMVideoCodecType = 0x64766871;
pub const kCMVideoCodecType_DVCPROHD1080i60: CMVideoCodecType = 0x64766836;
pub const kCMVideoCodecType_DVCPROHD1080i50: CMVideoCodecType = 0x64766835;
pub const kCMVideoCodecType_DVCPROHD1080p30: CMVideoCodecType = 0x64766833;
pub const kCMVideoCodecType_DVCPROHD1080p25: CMVideoCodecType = 0x64766832;
pub const kCMVideoCodecType_AppleProRes4444XQ: CMVideoCodecType = 0x61703478;
pub const kCMVideoCodecType_AppleProRes4444: CMVideoCodecType = 0x61703468;
pub const kCMVideoCodecType_AppleProRes422HQ: CMVideoCodecType = 0x61706368;
pub const kCMVideoCodecType_AppleProRes422: CMVideoCodecType = 0x6170636e;
pub const kCMVideoCodecType_AppleProRes422LT: CMVideoCodecType = 0x61706373;
pub const kCMVideoCodecType_AppleProRes422Proxy: CMVideoCodecType = 0x6170636f;
pub const kCMVideoCodecType_AppleProResRAW: CMVideoCodecType = 0x6170726e;
pub const kCMVideoCodecType_AppleProResRAWHQ: CMVideoCodecType = 0x61707268;
pub const kCMVideoCodecType_DisparityHEVC: CMVideoCodecType = 0x64697368;
pub const kCMVideoCodecType_DepthHEVC: CMVideoCodecType = 0x64657068;
pub const kCMVideoCodecType_AV1: CMVideoCodecType = 0x61763031;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CMVideoDimensions {
pub width: i32,
pub height: i32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for CMVideoDimensions {
const ENCODING: Encoding = Encoding::Struct("?", &[<i32>::ENCODING, <i32>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for CMVideoDimensions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static kCMFormatDescriptionExtension_FormatName: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_Depth: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_CleanAperture: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureWidth: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureHeight: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureHorizontalOffset: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureVerticalOffset: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureWidthRational: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureHeightRational: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureHorizontalOffsetRational: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_CleanApertureVerticalOffsetRational: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_FieldCount: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_FieldDetail: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionFieldDetail_TemporalTopFirst: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionFieldDetail_TemporalBottomFirst: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionFieldDetail_SpatialFirstLineEarly: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionFieldDetail_SpatialFirstLineLate: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_PixelAspectRatio: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_PixelAspectRatioHorizontalSpacing: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionKey_PixelAspectRatioVerticalSpacing: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ColorPrimaries: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_EBU_3213: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_SMPTE_C: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_DCI_P3: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_P3_D65: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionColorPrimaries_P22: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_TransferFunction: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_SMPTE_240M_1995: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_UseGamma: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_Linear: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionTransferFunction_sRGB: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_GammaLevel: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_YCbCrMatrix: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_601_4: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionYCbCrMatrix_SMPTE_240M_1995: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_FullRangeVideo: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ICCProfile: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_BytesPerRow: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ChromaLocationTopField: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ChromaLocationBottomField: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_Left: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_Center: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_TopLeft: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_Top: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_BottomLeft: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_Bottom: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionChromaLocation_DV420: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionConformsToMPEG2VideoProfile: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ProtectedContentOriginalFormat: &'static CFString;
}
pub const kCMMPEG2VideoProfile_HDV_720p30: i32 = 0x68647631;
pub const kCMMPEG2VideoProfile_HDV_1080i60: i32 = 0x68647632;
pub const kCMMPEG2VideoProfile_HDV_1080i50: i32 = 0x68647633;
pub const kCMMPEG2VideoProfile_HDV_720p24: i32 = 0x68647634;
pub const kCMMPEG2VideoProfile_HDV_720p25: i32 = 0x68647635;
pub const kCMMPEG2VideoProfile_HDV_1080p24: i32 = 0x68647636;
pub const kCMMPEG2VideoProfile_HDV_1080p25: i32 = 0x68647637;
pub const kCMMPEG2VideoProfile_HDV_1080p30: i32 = 0x68647638;
pub const kCMMPEG2VideoProfile_HDV_720p60: i32 = 0x68647639;
pub const kCMMPEG2VideoProfile_HDV_720p50: i32 = 0x68647661;
pub const kCMMPEG2VideoProfile_XDCAM_HD_1080i60_VBR35: i32 = 0x78647632;
pub const kCMMPEG2VideoProfile_XDCAM_HD_1080i50_VBR35: i32 = 0x78647633;
pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p24_VBR35: i32 = 0x78647636;
pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p25_VBR35: i32 = 0x78647637;
pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p30_VBR35: i32 = 0x78647638;
pub const kCMMPEG2VideoProfile_XDCAM_EX_720p24_VBR35: i32 = 0x78647634;
pub const kCMMPEG2VideoProfile_XDCAM_EX_720p25_VBR35: i32 = 0x78647635;
pub const kCMMPEG2VideoProfile_XDCAM_EX_720p30_VBR35: i32 = 0x78647631;
pub const kCMMPEG2VideoProfile_XDCAM_EX_720p50_VBR35: i32 = 0x78647661;
pub const kCMMPEG2VideoProfile_XDCAM_EX_720p60_VBR35: i32 = 0x78647639;
pub const kCMMPEG2VideoProfile_XDCAM_EX_1080i60_VBR35: i32 = 0x78647662;
pub const kCMMPEG2VideoProfile_XDCAM_EX_1080i50_VBR35: i32 = 0x78647663;
pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p24_VBR35: i32 = 0x78647664;
pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p25_VBR35: i32 = 0x78647665;
pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p30_VBR35: i32 = 0x78647666;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p50_CBR50: i32 = 0x78643561;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p60_CBR50: i32 = 0x78643539;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080i60_CBR50: i32 = 0x78643562;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080i50_CBR50: i32 = 0x78643563;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p24_CBR50: i32 = 0x78643564;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p25_CBR50: i32 = 0x78643565;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p30_CBR50: i32 = 0x78643566;
pub const kCMMPEG2VideoProfile_XDCAM_HD_540p: i32 = 0x78646864;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_540p: i32 = 0x78646832;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p24_CBR50: i32 = 0x78643534;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p25_CBR50: i32 = 0x78643535;
pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p30_CBR50: i32 = 0x78643531;
pub const kCMMPEG2VideoProfile_XF: i32 = 0x78667a31;
extern "C" {
pub static kCMFormatDescriptionExtension_TemporalQuality: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_SpatialQuality: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_VerbatimImageDescription: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_Version: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_RevisionLevel: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_Vendor: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionVendor_Apple: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_MasteringDisplayColorVolume: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ContentLightLevelInfo: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ContentColorVolume: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_AlternativeTransferCharacteristics: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_AuxiliaryTypeInfo: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_AlphaChannelMode: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionAlphaChannelMode_StraightAlpha: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionAlphaChannelMode_PremultipliedAlpha: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ContainsAlphaChannel: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_BitsPerComponent: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HorizontalFieldOfView: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_LogTransferFunction: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionLogTransferFunction_AppleLog: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HeroEye: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionHeroEye_Left: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionHeroEye_Right: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_StereoCameraBaseline: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HorizontalDisparityAdjustment: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HasLeftStereoEyeView: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HasRightStereoEyeView: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_HasAdditionalViews: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ProjectionKind: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionProjectionKind_Rectilinear: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionProjectionKind_Equirectangular: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionProjectionKind_HalfEquirectangular: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionProjectionKind_ParametricImmersive: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionProjectionKind_AppleImmersiveVideo: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ViewPackingKind: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionViewPackingKind_SideBySide: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionViewPackingKind_OverUnder: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_CameraCalibrationDataLensCollection: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensAlgorithmKind: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationLensAlgorithmKind_ParametricLens:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensDomain: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationLensDomain_Color: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensIdentifier: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensRole: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationLensRole_Mono: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationLensRole_Left: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationLensRole_Right: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensDistortions: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensFrameAdjustmentsPolynomialX:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_LensFrameAdjustmentsPolynomialY:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_RadialAngleLimit: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrix: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrixProjectionOffset:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrixReferenceDimensions:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_ExtrinsicOriginSource: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionCameraCalibration_ExtrinsicOrientationQuaternion:
&'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_ConvertedFromExternalSphericalTags: &'static CFString;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
codec_type: CMVideoCodecType,
width: i32,
height: i32,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMVideoFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-video")]
pub fn CMVideoFormatDescriptionCreateForImageBuffer(
allocator: Option<&CFAllocator>,
image_buffer: &CVImageBuffer,
format_description_out: NonNull<*const CMVideoFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionCreateFromH264ParameterSets(
allocator: Option<&CFAllocator>,
parameter_set_count: usize,
parameter_set_pointers: NonNull<NonNull<u8>>,
parameter_set_sizes: NonNull<usize>,
nal_unit_header_length: c_int,
format_description_out: NonNull<*const CMFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionCreateFromHEVCParameterSets(
allocator: Option<&CFAllocator>,
parameter_set_count: usize,
parameter_set_pointers: NonNull<NonNull<u8>>,
parameter_set_sizes: NonNull<usize>,
nal_unit_header_length: c_int,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionGetH264ParameterSetAtIndex(
video_desc: &CMFormatDescription,
parameter_set_index: usize,
parameter_set_pointer_out: *mut *const u8,
parameter_set_size_out: *mut usize,
parameter_set_count_out: *mut usize,
nal_unit_header_length_out: *mut c_int,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
video_desc: &CMFormatDescription,
parameter_set_index: usize,
parameter_set_pointer_out: *mut *const u8,
parameter_set_size_out: *mut usize,
parameter_set_count_out: *mut usize,
nal_unit_header_length_out: *mut c_int,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionGetDimensions(
video_desc: &CMVideoFormatDescription,
) -> CMVideoDimensions;
}
#[inline]
pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetPresentationDimensions(
video_desc: &CMVideoFormatDescription,
use_pixel_aspect_ratio: bool,
use_clean_aperture: bool,
) -> CGSize {
extern "C-unwind" {
fn CMVideoFormatDescriptionGetPresentationDimensions(
video_desc: &CMVideoFormatDescription,
use_pixel_aspect_ratio: Boolean,
use_clean_aperture: Boolean,
) -> CGSize;
}
unsafe {
CMVideoFormatDescriptionGetPresentationDimensions(
video_desc,
use_pixel_aspect_ratio as _,
use_clean_aperture as _,
)
}
}
#[inline]
pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetCleanAperture(
video_desc: &CMVideoFormatDescription,
origin_is_at_top_left: bool,
) -> CGRect {
extern "C-unwind" {
fn CMVideoFormatDescriptionGetCleanAperture(
video_desc: &CMVideoFormatDescription,
origin_is_at_top_left: Boolean,
) -> CGRect;
}
unsafe { CMVideoFormatDescriptionGetCleanAperture(video_desc, origin_is_at_top_left as _) }
}
#[inline]
pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers(
) -> CFRetained<CFArray> {
extern "C-unwind" {
fn CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers(
) -> Option<NonNull<CFArray>>;
}
let ret = unsafe { CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers() };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::retain(ret) }
}
#[cfg(feature = "objc2-core-video")]
#[inline]
pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionMatchesImageBuffer(
desc: &CMVideoFormatDescription,
image_buffer: &CVImageBuffer,
) -> bool {
extern "C-unwind" {
fn CMVideoFormatDescriptionMatchesImageBuffer(
desc: &CMVideoFormatDescription,
image_buffer: &CVImageBuffer,
) -> Boolean;
}
let ret = unsafe { CMVideoFormatDescriptionMatchesImageBuffer(desc, image_buffer) };
ret != 0
}
extern "C-unwind" {
pub fn CMVideoFormatDescriptionCopyTagCollectionArray(
format_description: &CMVideoFormatDescription,
tag_collections_out: *mut *const CFArray,
) -> OSStatus;
}
#[doc(alias = "CMTaggedBufferGroupFormatDescriptionRef")]
pub type CMTaggedBufferGroupFormatDescription = CMFormatDescription;
pub type CMTaggedBufferGroupFormatType = FourCharCode;
pub const kCMTaggedBufferGroupFormatType_TaggedBufferGroup: CMTaggedBufferGroupFormatType =
0x74626772;
#[doc(alias = "CMMuxedFormatDescriptionRef")]
pub type CMMuxedFormatDescription = CMFormatDescription;
pub type CMMuxedStreamType = FourCharCode;
pub const kCMMuxedStreamType_MPEG1System: CMMuxedStreamType = 0x6d703173;
pub const kCMMuxedStreamType_MPEG2Transport: CMMuxedStreamType = 0x6d703274;
pub const kCMMuxedStreamType_MPEG2Program: CMMuxedStreamType = 0x6d703270;
pub const kCMMuxedStreamType_DV: CMMuxedStreamType = 0x64762020;
pub const kCMMuxedStreamType_EmbeddedDeviceScreenRecording: CMMuxedStreamType = 0x69737220;
extern "C-unwind" {
pub fn CMMuxedFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
mux_type: CMMuxedStreamType,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMMuxedFormatDescription>,
) -> OSStatus;
}
#[doc(alias = "CMClosedCaptionFormatDescriptionRef")]
pub type CMClosedCaptionFormatDescription = CMFormatDescription;
pub type CMClosedCaptionFormatType = FourCharCode;
pub const kCMClosedCaptionFormatType_CEA608: CMClosedCaptionFormatType = 0x63363038;
pub const kCMClosedCaptionFormatType_CEA708: CMClosedCaptionFormatType = 0x63373038;
pub const kCMClosedCaptionFormatType_ATSC: CMClosedCaptionFormatType = 0x61746363;
#[doc(alias = "CMTextFormatDescriptionRef")]
pub type CMTextFormatDescription = CMFormatDescription;
pub type CMTextFormatType = FourCharCode;
pub const kCMTextFormatType_QTText: CMTextFormatType = 0x74657874;
pub const kCMTextFormatType_3GText: CMTextFormatType = 0x74783367;
pub type CMTextDisplayFlags = u32;
pub const kCMTextDisplayFlag_scrollIn: CMTextDisplayFlags = 0x00000020;
pub const kCMTextDisplayFlag_scrollOut: CMTextDisplayFlags = 0x00000040;
pub const kCMTextDisplayFlag_scrollDirectionMask: CMTextDisplayFlags = 0x00000180;
pub const kCMTextDisplayFlag_scrollDirection_bottomToTop: CMTextDisplayFlags = 0x00000000;
pub const kCMTextDisplayFlag_scrollDirection_rightToLeft: CMTextDisplayFlags = 0x00000080;
pub const kCMTextDisplayFlag_scrollDirection_topToBottom: CMTextDisplayFlags = 0x00000100;
pub const kCMTextDisplayFlag_scrollDirection_leftToRight: CMTextDisplayFlags = 0x00000180;
pub const kCMTextDisplayFlag_continuousKaraoke: CMTextDisplayFlags = 0x00000800;
pub const kCMTextDisplayFlag_writeTextVertically: CMTextDisplayFlags = 0x00020000;
pub const kCMTextDisplayFlag_fillTextRegion: CMTextDisplayFlags = 0x00040000;
pub const kCMTextDisplayFlag_obeySubtitleFormatting: CMTextDisplayFlags = 0x20000000;
pub const kCMTextDisplayFlag_forcedSubtitlesPresent: CMTextDisplayFlags = 0x40000000;
pub const kCMTextDisplayFlag_allSubtitlesForced: CMTextDisplayFlags = 0x80000000;
pub type CMTextJustificationValue = i8;
pub const kCMTextJustification_left_top: CMTextJustificationValue = 0;
pub const kCMTextJustification_centered: CMTextJustificationValue = 1;
pub const kCMTextJustification_bottom_right: CMTextJustificationValue = -1;
extern "C" {
pub static kCMTextFormatDescriptionExtension_DisplayFlags: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_BackgroundColor: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionColor_Red: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionColor_Green: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionColor_Blue: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionColor_Alpha: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_DefaultTextBox: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionRect_Top: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionRect_Left: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionRect_Bottom: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionRect_Right: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_DefaultStyle: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_StartChar: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_Font: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_FontFace: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_ForegroundColor: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_FontSize: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_HorizontalJustification: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_VerticalJustification: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_EndChar: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_FontTable: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_TextJustification: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_Height: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionStyle_Ascent: &'static CFString;
}
extern "C" {
pub static kCMTextFormatDescriptionExtension_DefaultFontName: &'static CFString;
}
extern "C" {
pub static kCMFormatDescriptionExtension_AmbientViewingEnvironment: &'static CFString;
}
extern "C-unwind" {
pub fn CMTextFormatDescriptionGetDisplayFlags(
desc: &CMFormatDescription,
display_flags_out: NonNull<CMTextDisplayFlags>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMTextFormatDescriptionGetJustification(
desc: &CMFormatDescription,
horizonta_justificationl_out: *mut CMTextJustificationValue,
vertical_justification_out: *mut CMTextJustificationValue,
) -> OSStatus;
}
#[inline]
pub unsafe extern "C-unwind" fn CMTextFormatDescriptionGetDefaultTextBox(
desc: &CMFormatDescription,
origin_is_at_top_left: bool,
height_of_text_track: CGFloat,
default_text_box_out: NonNull<CGRect>,
) -> OSStatus {
extern "C-unwind" {
fn CMTextFormatDescriptionGetDefaultTextBox(
desc: &CMFormatDescription,
origin_is_at_top_left: Boolean,
height_of_text_track: CGFloat,
default_text_box_out: NonNull<CGRect>,
) -> OSStatus;
}
unsafe {
CMTextFormatDescriptionGetDefaultTextBox(
desc,
origin_is_at_top_left as _,
height_of_text_track,
default_text_box_out,
)
}
}
extern "C-unwind" {
pub fn CMTextFormatDescriptionGetFontName(
desc: &CMFormatDescription,
local_font_id: u16,
font_name_out: NonNull<*const CFString>,
) -> OSStatus;
}
pub type CMSubtitleFormatType = FourCharCode;
pub const kCMSubtitleFormatType_3GText: CMSubtitleFormatType = 0x74783367;
pub const kCMSubtitleFormatType_WebVTT: CMSubtitleFormatType = 0x77767474;
#[doc(alias = "CMTimeCodeFormatDescriptionRef")]
pub type CMTimeCodeFormatDescription = CMFormatDescription;
pub type CMTimeCodeFormatType = FourCharCode;
pub const kCMTimeCodeFormatType_TimeCode32: CMTimeCodeFormatType = 0x746d6364;
pub const kCMTimeCodeFormatType_TimeCode64: CMTimeCodeFormatType = 0x74633634;
pub const kCMTimeCodeFormatType_Counter32: CMTimeCodeFormatType = 0x636e3332;
pub const kCMTimeCodeFormatType_Counter64: CMTimeCodeFormatType = 0x636e3634;
pub const kCMTimeCodeFlag_DropFrame: u32 = 1 << 0;
pub const kCMTimeCodeFlag_24HourMax: u32 = 1 << 1;
pub const kCMTimeCodeFlag_NegTimesOK: u32 = 1 << 2;
extern "C-unwind" {
#[cfg(feature = "CMTime")]
pub fn CMTimeCodeFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
time_code_format_type: CMTimeCodeFormatType,
frame_duration: CMTime,
frame_quanta: u32,
flags: u32,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMTimeCodeFormatDescription>,
) -> OSStatus;
}
#[cfg(feature = "CMTime")]
impl CMTime {
#[doc(alias = "CMTimeCodeFormatDescriptionGetFrameDuration")]
#[cfg(feature = "CMTime")]
#[inline]
pub unsafe fn code_format_description_get_frame_duration(
time_code_format_description: &CMTimeCodeFormatDescription,
) -> CMTime {
extern "C-unwind" {
fn CMTimeCodeFormatDescriptionGetFrameDuration(
time_code_format_description: &CMTimeCodeFormatDescription,
) -> CMTime;
}
unsafe { CMTimeCodeFormatDescriptionGetFrameDuration(time_code_format_description) }
}
}
extern "C-unwind" {
pub fn CMTimeCodeFormatDescriptionGetFrameQuanta(
time_code_format_description: &CMTimeCodeFormatDescription,
) -> u32;
}
extern "C-unwind" {
pub fn CMTimeCodeFormatDescriptionGetTimeCodeFlags(desc: &CMTimeCodeFormatDescription) -> u32;
}
extern "C" {
pub static kCMTimeCodeFormatDescriptionExtension_SourceReferenceName: &'static CFString;
}
extern "C" {
pub static kCMTimeCodeFormatDescriptionKey_Value: &'static CFString;
}
extern "C" {
pub static kCMTimeCodeFormatDescriptionKey_LangCode: &'static CFString;
}
#[doc(alias = "CMMetadataFormatDescriptionRef")]
pub type CMMetadataFormatDescription = CMFormatDescription;
pub type CMMetadataFormatType = FourCharCode;
pub const kCMMetadataFormatType_ICY: CMMetadataFormatType = 0x69637920;
pub const kCMMetadataFormatType_ID3: CMMetadataFormatType = 0x69643320;
pub const kCMMetadataFormatType_Boxed: CMMetadataFormatType = 0x6d656278;
pub const kCMMetadataFormatType_EMSG: CMMetadataFormatType = 0x656d7367;
extern "C" {
pub static kCMFormatDescriptionExtensionKey_MetadataKeyTable: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_Namespace: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_Value: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_LocalID: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_DataType: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_DataTypeNamespace: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_ConformingDataTypes: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_LanguageTag: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_StructuralDependency: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionKey_SetupData: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescription_StructuralDependencyKey_DependencyIsInvalidFlag:
&'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_Identifier: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_DataType: &'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_ExtendedLanguageTag:
&'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_StructuralDependency:
&'static CFString;
}
extern "C" {
pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_SetupData: &'static CFString;
}
extern "C-unwind" {
pub fn CMMetadataFormatDescriptionCreateWithKeys(
allocator: Option<&CFAllocator>,
metadata_type: CMMetadataFormatType,
keys: Option<&CFArray>,
format_description_out: NonNull<*const CMMetadataFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMMetadataFormatDescriptionCreateWithMetadataSpecifications(
allocator: Option<&CFAllocator>,
metadata_type: CMMetadataFormatType,
metadata_specifications: &CFArray,
format_description_out: NonNull<*const CMMetadataFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMMetadataFormatDescriptionCreateWithMetadataFormatDescriptionAndMetadataSpecifications(
allocator: Option<&CFAllocator>,
source_description: &CMMetadataFormatDescription,
metadata_specifications: &CFArray,
format_description_out: NonNull<*const CMMetadataFormatDescription>,
) -> OSStatus;
}
extern "C-unwind" {
pub fn CMMetadataFormatDescriptionCreateByMergingMetadataFormatDescriptions(
allocator: Option<&CFAllocator>,
source_description: &CMMetadataFormatDescription,
other_source_description: &CMMetadataFormatDescription,
format_description_out: NonNull<*const CMMetadataFormatDescription>,
) -> OSStatus;
}
#[inline]
pub unsafe extern "C-unwind" fn CMMetadataFormatDescriptionGetKeyWithLocalID(
desc: &CMMetadataFormatDescription,
local_key_id: OSType,
) -> Option<CFRetained<CFDictionary>> {
extern "C-unwind" {
fn CMMetadataFormatDescriptionGetKeyWithLocalID(
desc: &CMMetadataFormatDescription,
local_key_id: OSType,
) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CMMetadataFormatDescriptionGetKeyWithLocalID(desc, local_key_id) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[inline]
pub unsafe extern "C-unwind" fn CMMetadataFormatDescriptionGetIdentifiers(
desc: &CMMetadataFormatDescription,
) -> Option<CFRetained<CFArray>> {
extern "C-unwind" {
fn CMMetadataFormatDescriptionGetIdentifiers(
desc: &CMMetadataFormatDescription,
) -> Option<NonNull<CFArray>>;
}
let ret = unsafe { CMMetadataFormatDescriptionGetIdentifiers(desc) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
extern "C-unwind" {
#[deprecated = "renamed to `CMFormatDescription::create`"]
pub fn CMFormatDescriptionCreate(
allocator: Option<&CFAllocator>,
media_type: CMMediaType,
media_sub_type: FourCharCode,
extensions: Option<&CFDictionary>,
format_description_out: NonNull<*const CMFormatDescription>,
) -> OSStatus;
}
#[deprecated = "renamed to `CMFormatDescription::equal`"]
#[inline]
pub unsafe extern "C-unwind" fn CMFormatDescriptionEqual(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
) -> bool {
extern "C-unwind" {
fn CMFormatDescriptionEqual(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
) -> Boolean;
}
let ret = unsafe { CMFormatDescriptionEqual(format_description, other_format_description) };
ret != 0
}
#[deprecated = "renamed to `CMFormatDescription::equal_ignoring_extension_keys`"]
#[inline]
pub unsafe extern "C-unwind" fn CMFormatDescriptionEqualIgnoringExtensionKeys(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
format_description_extension_keys_to_ignore: Option<&CFType>,
sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
) -> bool {
extern "C-unwind" {
fn CMFormatDescriptionEqualIgnoringExtensionKeys(
format_description: Option<&CMFormatDescription>,
other_format_description: Option<&CMFormatDescription>,
format_description_extension_keys_to_ignore: Option<&CFType>,
sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
) -> Boolean;
}
let ret = unsafe {
CMFormatDescriptionEqualIgnoringExtensionKeys(
format_description,
other_format_description,
format_description_extension_keys_to_ignore,
sample_description_extension_atom_keys_to_ignore,
)
};
ret != 0
}
extern "C-unwind" {
#[deprecated = "renamed to `CMFormatDescription::media_type`"]
pub fn CMFormatDescriptionGetMediaType(desc: &CMFormatDescription) -> CMMediaType;
}
extern "C-unwind" {
#[deprecated = "renamed to `CMFormatDescription::media_sub_type`"]
pub fn CMFormatDescriptionGetMediaSubType(desc: &CMFormatDescription) -> FourCharCode;
}
#[deprecated = "renamed to `CMFormatDescription::extensions`"]
#[inline]
pub unsafe extern "C-unwind" fn CMFormatDescriptionGetExtensions(
desc: &CMFormatDescription,
) -> Option<CFRetained<CFDictionary>> {
extern "C-unwind" {
fn CMFormatDescriptionGetExtensions(
desc: &CMFormatDescription,
) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CMFormatDescriptionGetExtensions(desc) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[deprecated = "renamed to `CMFormatDescription::extension`"]
#[inline]
pub unsafe extern "C-unwind" fn CMFormatDescriptionGetExtension(
desc: &CMFormatDescription,
extension_key: &CFString,
) -> Option<CFRetained<CFPropertyList>> {
extern "C-unwind" {
fn CMFormatDescriptionGetExtension(
desc: &CMFormatDescription,
extension_key: &CFString,
) -> Option<NonNull<CFPropertyList>>;
}
let ret = unsafe { CMFormatDescriptionGetExtension(desc, extension_key) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
extern "C-unwind" {
#[cfg(feature = "CMTime")]
#[deprecated = "renamed to `CMTime::code_format_description_get_frame_duration`"]
pub fn CMTimeCodeFormatDescriptionGetFrameDuration(
time_code_format_description: &CMTimeCodeFormatDescription,
) -> CMTime;
}