objc2-av-kit 0.3.2

Bindings to the AVKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

/// The types of items that AVPlayerViewController analyzes in a paused video frame.
///
///
/// Defines no items to be analyzed by the analyzer.
///
/// Defines the default set of analysis types.
///
///
/// Text that appears in a paused video frame.
///
/// Subject that the user can copy out of frame.
///
/// Objects, landmarks, art, etc. recognized visually in a paused video frame.
///
/// Machine-readable codes, such as QR codes, that appear in a paused video frame.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avkit/avvideoframeanalysistype?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVVideoFrameAnalysisType(pub NSUInteger);
bitflags::bitflags! {
    impl AVVideoFrameAnalysisType: NSUInteger {
        #[doc(alias = "AVVideoFrameAnalysisTypeNone")]
        const None = 0;
        #[doc(alias = "AVVideoFrameAnalysisTypeDefault")]
        const Default = 1<<0;
        #[doc(alias = "AVVideoFrameAnalysisTypeText")]
        const Text = 1<<1;
        #[doc(alias = "AVVideoFrameAnalysisTypeSubject")]
        const Subject = 1<<2;
        #[doc(alias = "AVVideoFrameAnalysisTypeVisualSearch")]
        const VisualSearch = 1<<3;
        #[doc(alias = "AVVideoFrameAnalysisTypeMachineReadableCode")]
        const MachineReadableCode = 1<<4;
    }
}

unsafe impl Encode for AVVideoFrameAnalysisType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for AVVideoFrameAnalysisType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Describes how High Dynamic Range (HDR) video content renders.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avkit/avdisplaydynamicrange?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVDisplayDynamicRange(pub NSInteger);
impl AVDisplayDynamicRange {
    /// Defines an automatic dynamic range. Indicates that the dynamic range will be set automatically.
    #[doc(alias = "AVDisplayDynamicRangeAutomatic")]
    pub const Automatic: Self = Self(0);
    /// Defines a standard dynamic range. Restricts the video content dynamic range to the standard range regardless of the actual range of the video content.
    #[doc(alias = "AVDisplayDynamicRangeStandard")]
    pub const Standard: Self = Self(1);
    /// Defines a constrained high dynamic range. Allows for constrained High Dynamic Range (HDR) video content which is useful for mixing HDR and Standard Dynamic Range (SDR) content.
    #[doc(alias = "AVDisplayDynamicRangeConstrainedHigh")]
    pub const ConstrainedHigh: Self = Self(2);
    /// Defines a high dynamic range. Allows video content to use extended dynamic range if it has dynamic range content.
    #[doc(alias = "AVDisplayDynamicRangeHigh")]
    pub const High: Self = Self(3);
}

unsafe impl Encode for AVDisplayDynamicRange {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for AVDisplayDynamicRange {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}