objc2-video-toolbox 0.3.2

Bindings to the VideoToolbox framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpropertynotsupportederr?language=objc)
pub const kVTPropertyNotSupportedErr: OSStatus = -12900;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpropertyreadonlyerr?language=objc)
pub const kVTPropertyReadOnlyErr: OSStatus = -12901;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtparametererr?language=objc)
pub const kVTParameterErr: OSStatus = -12902;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtinvalidsessionerr?language=objc)
pub const kVTInvalidSessionErr: OSStatus = -12903;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtallocationfailederr?language=objc)
pub const kVTAllocationFailedErr: OSStatus = -12904;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixeltransfernotsupportederr?language=objc)
pub const kVTPixelTransferNotSupportedErr: OSStatus = -12905;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindvideodecodererr?language=objc)
pub const kVTCouldNotFindVideoDecoderErr: OSStatus = -12906;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotcreateinstanceerr?language=objc)
pub const kVTCouldNotCreateInstanceErr: OSStatus = -12907;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindvideoencodererr?language=objc)
pub const kVTCouldNotFindVideoEncoderErr: OSStatus = -12908;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderbaddataerr?language=objc)
pub const kVTVideoDecoderBadDataErr: OSStatus = -12909;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderunsupporteddataformaterr?language=objc)
pub const kVTVideoDecoderUnsupportedDataFormatErr: OSStatus = -12910;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodermalfunctionerr?language=objc)
pub const kVTVideoDecoderMalfunctionErr: OSStatus = -12911;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodermalfunctionerr?language=objc)
pub const kVTVideoEncoderMalfunctionErr: OSStatus = -12912;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodernotavailablenowerr?language=objc)
pub const kVTVideoDecoderNotAvailableNowErr: OSStatus = -12913;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtimagerotationnotsupportederr?language=objc)
pub const kVTImageRotationNotSupportedErr: OSStatus = -12914;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixelrotationnotsupportederr?language=objc)
pub const kVTPixelRotationNotSupportedErr: OSStatus = -12914;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodernotavailablenowerr?language=objc)
pub const kVTVideoEncoderNotAvailableNowErr: OSStatus = -12915;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtformatdescriptionchangenotsupportederr?language=objc)
pub const kVTFormatDescriptionChangeNotSupportedErr: OSStatus = -12916;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtinsufficientsourcecolordataerr?language=objc)
pub const kVTInsufficientSourceColorDataErr: OSStatus = -12917;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotcreatecolorcorrectiondataerr?language=objc)
pub const kVTCouldNotCreateColorCorrectionDataErr: OSStatus = -12918;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorsynctransformconvertfailederr?language=objc)
pub const kVTColorSyncTransformConvertFailedErr: OSStatus = -12919;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderauthorizationerr?language=objc)
pub const kVTVideoDecoderAuthorizationErr: OSStatus = -12210;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderauthorizationerr?language=objc)
pub const kVTVideoEncoderAuthorizationErr: OSStatus = -12211;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorcorrectionpixeltransferfailederr?language=objc)
pub const kVTColorCorrectionPixelTransferFailedErr: OSStatus = -12212;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtmultipassstorageidentifiermismatcherr?language=objc)
pub const kVTMultiPassStorageIdentifierMismatchErr: OSStatus = -12213;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtmultipassstorageinvaliderr?language=objc)
pub const kVTMultiPassStorageInvalidErr: OSStatus = -12214;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtframesiloinvalidtimestamperr?language=objc)
pub const kVTFrameSiloInvalidTimeStampErr: OSStatus = -12215;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtframesiloinvalidtimerangeerr?language=objc)
pub const kVTFrameSiloInvalidTimeRangeErr: OSStatus = -12216;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindtemporalfiltererr?language=objc)
pub const kVTCouldNotFindTemporalFilterErr: OSStatus = -12217;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixeltransfernotpermittederr?language=objc)
pub const kVTPixelTransferNotPermittedErr: OSStatus = -12218;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorcorrectionimagerotationfailederr?language=objc)
pub const kVTColorCorrectionImageRotationFailedErr: OSStatus = -12219;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderremovederr?language=objc)
pub const kVTVideoDecoderRemovedErr: OSStatus = -17690;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtsessionmalfunctionerr?language=objc)
pub const kVTSessionMalfunctionErr: OSStatus = -17691;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderneedsrosettaerr?language=objc)
pub const kVTVideoDecoderNeedsRosettaErr: OSStatus = -17692;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderneedsrosettaerr?language=objc)
pub const kVTVideoEncoderNeedsRosettaErr: OSStatus = -17693;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderreferencemissingerr?language=objc)
pub const kVTVideoDecoderReferenceMissingErr: OSStatus = -17694;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodercallbackmessagingerr?language=objc)
pub const kVTVideoDecoderCallbackMessagingErr: OSStatus = -17695;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderunknownerr?language=objc)
pub const kVTVideoDecoderUnknownErr: OSStatus = -17696;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtextensiondisablederr?language=objc)
pub const kVTExtensionDisabledErr: OSStatus = -17697;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodermvhevcvideolayeridsmismatcherr?language=objc)
pub const kVTVideoEncoderMVHEVCVideoLayerIDsMismatchErr: OSStatus = -17698;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotoutputtaggedbuffergrouperr?language=objc)
pub const kVTCouldNotOutputTaggedBufferGroupErr: OSStatus = -17699;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindextensionerr?language=objc)
pub const kVTCouldNotFindExtensionErr: OSStatus = -19510;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtextensionconflicterr?language=objc)
pub const kVTExtensionConflictErr: OSStatus = -19511;
/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderautowhitebalancenotlockederr?language=objc)
pub const kVTVideoEncoderAutoWhiteBalanceNotLockedErr: OSStatus = -19512;

/// Directives for the decompression session and the video decoder, passed into
/// decodeFlags parameter of VTDecompressionSessionDecodeFrame.
///
///
/// With the kVTDecodeFrame_EnableAsynchronousDecompression bit clear, the video decoder
/// is compelled to emit every frame before it returns.  With the bit set, the decoder may
/// process frames asynchronously, but it is not compelled to do so.
///
/// A hint to the decompression session and video decoder that a CVImageBuffer should not
/// be emitted for this frame.  NULL will be returned instead.
///
/// A hint to the video decoder that it would be OK to use a low-power mode that can not decode faster than 1x realtime.
///
/// With the kVTDecodeFrame_EnableTemporalProcessing bit clear, the video decoder should emit
/// every frame once that frame's decoding is done -- frames may not be delayed indefinitely.  With
/// the bit set, it is legal for the decoder to delay frames indefinitely -- at least
/// until VTDecompressionSessionFinishDelayedFrames or VTDecompressionSessionInvalidate is called.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeframeflags?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct VTDecodeFrameFlags(pub u32);
bitflags::bitflags! {
    impl VTDecodeFrameFlags: u32 {
#[doc(alias = "kVTDecodeFrame_EnableAsynchronousDecompression")]
        const Frame_EnableAsynchronousDecompression = 1<<0;
#[doc(alias = "kVTDecodeFrame_DoNotOutputFrame")]
        const Frame_DoNotOutputFrame = 1<<1;
#[doc(alias = "kVTDecodeFrame_1xRealTimePlayback")]
        const Frame_1xRealTimePlayback = 1<<2;
#[doc(alias = "kVTDecodeFrame_EnableTemporalProcessing")]
        const Frame_EnableTemporalProcessing = 1<<3;
    }
}

#[cfg(feature = "objc2")]
unsafe impl Encode for VTDecodeFrameFlags {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for VTDecodeFrameFlags {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Informational status for decoding -- non-error flags
///
///
/// The kVTDecodeInfo_Asynchronous bit may be set if the decode ran asynchronously.
///
/// The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped.
///
/// If the kVTDecodeInfo_ImageBufferModifiable bit is set, it is safe for the client to modify the imageBuffer.
///
/// The kVTDecodeInfo_SkippedLeadingFrameDropped may be set if a leading frame after a sync frame is dropped.
/// This can happen when a seek to a sync frame is initiated and, due to frame reordering, there are leading
/// frames following the sync frame that cannot be decoded due to missing references.  Dropping these frames
/// has no impact to playback since the non-decodeable frames will not be rendered.
/// If kVTDecodeInfo_SkippedLeadingFrameDropped is set, kVTDecodeInfo_FrameDropped will also be set.
///
/// The kVTDecodeInfo_FrameInterrupted bit may be set if the frame was decoded successfully but the decoded
/// content was not provided in the output callback. When this bit is set, the imageBuffer provided to the output
/// handler may either be NULL or contain only black pixels.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeinfoflags?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct VTDecodeInfoFlags(pub u32);
bitflags::bitflags! {
    impl VTDecodeInfoFlags: u32 {
        #[doc(alias = "kVTDecodeInfo_Asynchronous")]
        const Asynchronous = 1<<0;
        #[doc(alias = "kVTDecodeInfo_FrameDropped")]
        const FrameDropped = 1<<1;
        #[doc(alias = "kVTDecodeInfo_ImageBufferModifiable")]
        const ImageBufferModifiable = 1<<2;
        #[doc(alias = "kVTDecodeInfo_SkippedLeadingFrameDropped")]
        const SkippedLeadingFrameDropped = 1<<3;
        #[doc(alias = "kVTDecodeInfo_FrameInterrupted")]
        const FrameInterrupted = 1<<4;
    }
}

#[cfg(feature = "objc2")]
unsafe impl Encode for VTDecodeInfoFlags {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for VTDecodeInfoFlags {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtencodeinfoflags?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct VTEncodeInfoFlags(pub u32);
bitflags::bitflags! {
    impl VTEncodeInfoFlags: u32 {
        #[doc(alias = "kVTEncodeInfo_Asynchronous")]
        const Asynchronous = 1<<0;
        #[doc(alias = "kVTEncodeInfo_FrameDropped")]
        const FrameDropped = 1<<1;
    }
}

#[cfg(feature = "objc2")]
unsafe impl Encode for VTEncodeInfoFlags {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for VTEncodeInfoFlags {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}