use core::ffi::*;
use core::ptr::NonNull;
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use crate::*;
extern "C" {
pub static kCVImageBufferCGColorSpaceKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferCleanApertureKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferCleanApertureWidthKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferCleanApertureHeightKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferCleanApertureHorizontalOffsetKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferCleanApertureVerticalOffsetKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferPreferredCleanApertureKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldCountKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldDetailKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldDetailTemporalTopFirst: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldDetailTemporalBottomFirst: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldDetailSpatialFirstLineEarly: &'static CFString;
}
extern "C" {
pub static kCVImageBufferFieldDetailSpatialFirstLineLate: &'static CFString;
}
extern "C" {
pub static kCVImageBufferPixelAspectRatioKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferPixelAspectRatioHorizontalSpacingKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferPixelAspectRatioVerticalSpacingKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayDimensionsKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayWidthKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayHeightKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferGammaLevelKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferICCProfileKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferYCbCrMatrixKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferYCbCrMatrix_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCVImageBufferYCbCrMatrix_ITU_R_601_4: &'static CFString;
}
extern "C" {
pub static kCVImageBufferYCbCrMatrix_SMPTE_240M_1995: &'static CFString;
}
extern "C" {
#[deprecated = "kCVImageBufferYCbCrMatrix_DCI_P3 no longer supported."]
pub static kCVImageBufferYCbCrMatrix_DCI_P3: &'static CFString;
}
extern "C" {
#[deprecated = "kCVImageBufferYCbCrMatrix_P3_D65 no longer supported."]
pub static kCVImageBufferYCbCrMatrix_P3_D65: &'static CFString;
}
extern "C" {
pub static kCVImageBufferYCbCrMatrix_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimariesKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_EBU_3213: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_SMPTE_C: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_P22: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_DCI_P3: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_P3_D65: &'static CFString;
}
extern "C" {
pub static kCVImageBufferColorPrimaries_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunctionKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_ITU_R_709_2: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_SMPTE_240M_1995: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_UseGamma: &'static CFString;
}
extern "C" {
#[deprecated]
pub static kCVImageBufferTransferFunction_EBU_3213: &'static CFString;
}
extern "C" {
#[deprecated]
pub static kCVImageBufferTransferFunction_SMPTE_C: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_sRGB: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_ITU_R_2020: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_SMPTE_ST_428_1: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_ITU_R_2100_HLG: &'static CFString;
}
extern "C" {
pub static kCVImageBufferTransferFunction_Linear: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocationTopFieldKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocationBottomFieldKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_Left: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_Center: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_TopLeft: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_Top: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_BottomLeft: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_Bottom: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaLocation_DV420: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaSubsamplingKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaSubsampling_420: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaSubsampling_422: &'static CFString;
}
extern "C" {
pub static kCVImageBufferChromaSubsampling_411: &'static CFString;
}
extern "C" {
pub static kCVImageBufferAlphaChannelIsOpaque: &'static CFString;
}
extern "C" {
pub static kCVImageBufferAlphaChannelModeKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferAlphaChannelMode_StraightAlpha: &'static CFString;
}
extern "C" {
pub static kCVImageBufferAlphaChannelMode_PremultipliedAlpha: &'static CFString;
}
extern "C" {
pub static kCVImageBufferPostDecodeProcessingSequenceMetadataKey: Option<&'static CFString>;
}
extern "C" {
pub static kCVImageBufferPostDecodeProcessingFrameMetadataKey: Option<&'static CFString>;
}
#[inline]
pub extern "C-unwind" fn CVYCbCrMatrixGetIntegerCodePointForString(
y_cb_cr_matrix_string: Option<&CFString>,
) -> c_int {
extern "C-unwind" {
fn CVYCbCrMatrixGetIntegerCodePointForString(
y_cb_cr_matrix_string: Option<&CFString>,
) -> c_int;
}
unsafe { CVYCbCrMatrixGetIntegerCodePointForString(y_cb_cr_matrix_string) }
}
#[inline]
pub extern "C-unwind" fn CVColorPrimariesGetIntegerCodePointForString(
color_primaries_string: Option<&CFString>,
) -> c_int {
extern "C-unwind" {
fn CVColorPrimariesGetIntegerCodePointForString(
color_primaries_string: Option<&CFString>,
) -> c_int;
}
unsafe { CVColorPrimariesGetIntegerCodePointForString(color_primaries_string) }
}
#[inline]
pub extern "C-unwind" fn CVTransferFunctionGetIntegerCodePointForString(
transfer_function_string: Option<&CFString>,
) -> c_int {
extern "C-unwind" {
fn CVTransferFunctionGetIntegerCodePointForString(
transfer_function_string: Option<&CFString>,
) -> c_int;
}
unsafe { CVTransferFunctionGetIntegerCodePointForString(transfer_function_string) }
}
#[inline]
pub extern "C-unwind" fn CVYCbCrMatrixGetStringForIntegerCodePoint(
y_cb_cr_matrix_code_point: c_int,
) -> Option<CFRetained<CFString>> {
extern "C-unwind" {
fn CVYCbCrMatrixGetStringForIntegerCodePoint(
y_cb_cr_matrix_code_point: c_int,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { CVYCbCrMatrixGetStringForIntegerCodePoint(y_cb_cr_matrix_code_point) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[inline]
pub extern "C-unwind" fn CVColorPrimariesGetStringForIntegerCodePoint(
color_primaries_code_point: c_int,
) -> Option<CFRetained<CFString>> {
extern "C-unwind" {
fn CVColorPrimariesGetStringForIntegerCodePoint(
color_primaries_code_point: c_int,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { CVColorPrimariesGetStringForIntegerCodePoint(color_primaries_code_point) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[inline]
pub extern "C-unwind" fn CVTransferFunctionGetStringForIntegerCodePoint(
transfer_function_code_point: c_int,
) -> Option<CFRetained<CFString>> {
extern "C-unwind" {
fn CVTransferFunctionGetStringForIntegerCodePoint(
transfer_function_code_point: c_int,
) -> Option<NonNull<CFString>>;
}
let ret =
unsafe { CVTransferFunctionGetStringForIntegerCodePoint(transfer_function_code_point) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[doc(alias = "CVImageBufferRef")]
#[cfg(feature = "CVBuffer")]
pub type CVImageBuffer = CVBuffer;
#[cfg(feature = "CVBuffer")]
#[inline]
pub extern "C-unwind" fn CVImageBufferGetEncodedSize(image_buffer: &CVImageBuffer) -> CGSize {
extern "C-unwind" {
fn CVImageBufferGetEncodedSize(image_buffer: &CVImageBuffer) -> CGSize;
}
unsafe { CVImageBufferGetEncodedSize(image_buffer) }
}
#[cfg(feature = "CVBuffer")]
#[inline]
pub extern "C-unwind" fn CVImageBufferGetDisplaySize(image_buffer: &CVImageBuffer) -> CGSize {
extern "C-unwind" {
fn CVImageBufferGetDisplaySize(image_buffer: &CVImageBuffer) -> CGSize;
}
unsafe { CVImageBufferGetDisplaySize(image_buffer) }
}
#[cfg(feature = "CVBuffer")]
#[inline]
pub extern "C-unwind" fn CVImageBufferGetCleanRect(image_buffer: &CVImageBuffer) -> CGRect {
extern "C-unwind" {
fn CVImageBufferGetCleanRect(image_buffer: &CVImageBuffer) -> CGRect;
}
unsafe { CVImageBufferGetCleanRect(image_buffer) }
}
#[cfg(feature = "CVBuffer")]
#[inline]
pub extern "C-unwind" fn CVImageBufferIsFlipped(image_buffer: &CVImageBuffer) -> bool {
extern "C-unwind" {
fn CVImageBufferIsFlipped(image_buffer: &CVImageBuffer) -> Boolean;
}
let ret = unsafe { CVImageBufferIsFlipped(image_buffer) };
ret != 0
}
#[cfg(all(feature = "CVBuffer", feature = "objc2-core-graphics"))]
#[inline]
pub extern "C-unwind" fn CVImageBufferGetColorSpace(
image_buffer: &CVImageBuffer,
) -> Option<CFRetained<CGColorSpace>> {
extern "C-unwind" {
fn CVImageBufferGetColorSpace(
image_buffer: &CVImageBuffer,
) -> Option<NonNull<CGColorSpace>>;
}
let ret = unsafe { CVImageBufferGetColorSpace(image_buffer) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
#[cfg(feature = "objc2-core-graphics")]
#[inline]
pub unsafe extern "C-unwind" fn CVImageBufferCreateColorSpaceFromAttachments(
attachments: &CFDictionary,
) -> Option<CFRetained<CGColorSpace>> {
extern "C-unwind" {
fn CVImageBufferCreateColorSpaceFromAttachments(
attachments: &CFDictionary,
) -> Option<NonNull<CGColorSpace>>;
}
let ret = unsafe { CVImageBufferCreateColorSpaceFromAttachments(attachments) };
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
extern "C" {
pub static kCVImageBufferMasteringDisplayColorVolumeKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferContentLightLevelInfoKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferAmbientViewingEnvironmentKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferSceneIlluminationKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferRegionOfInterestKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferLogTransferFunctionKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferLogTransferFunction_AppleLog: &'static CFString;
}
extern "C" {
pub static kCVImageBufferLogTransferFunction_AppleLog2: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangleKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_ReferenceRasterWidthKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_ReferenceRasterHeightKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_RectangleLeftKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_RectangleWidthKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_RectangleTopKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_RectangleHeightKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangleStereoLeftKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangleStereoRightKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_LeftEdgePointsKey: &'static CFString;
}
extern "C" {
pub static kCVImageBufferDisplayMaskRectangle_RightEdgePointsKey: &'static CFString;
}