objc2_av_kit/generated/
AVKitTypes.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// The types of items that AVPlayerViewController analyzes in a paused video frame.
8///
9///
10/// Defines no items to be analyzed by the analyzer.
11///
12/// Defines the default set of analysis types.
13///
14///
15/// Text that appears in a paused video frame.
16///
17/// Subject that the user can copy out of frame.
18///
19/// Objects, landmarks, art, etc. recognized visually in a paused video frame.
20///
21/// Machine-readable codes, such as QR codes, that appear in a paused video frame.
22///
23/// See also [Apple's documentation](https://developer.apple.com/documentation/avkit/avvideoframeanalysistype?language=objc)
24// NS_OPTIONS
25#[repr(transparent)]
26#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
27pub struct AVVideoFrameAnalysisType(pub NSUInteger);
28bitflags::bitflags! {
29    impl AVVideoFrameAnalysisType: NSUInteger {
30        #[doc(alias = "AVVideoFrameAnalysisTypeNone")]
31        const None = 0;
32        #[doc(alias = "AVVideoFrameAnalysisTypeDefault")]
33        const Default = 1<<0;
34        #[doc(alias = "AVVideoFrameAnalysisTypeText")]
35        const Text = 1<<1;
36        #[doc(alias = "AVVideoFrameAnalysisTypeSubject")]
37        const Subject = 1<<2;
38        #[doc(alias = "AVVideoFrameAnalysisTypeVisualSearch")]
39        const VisualSearch = 1<<3;
40        #[doc(alias = "AVVideoFrameAnalysisTypeMachineReadableCode")]
41        const MachineReadableCode = 1<<4;
42    }
43}
44
45unsafe impl Encode for AVVideoFrameAnalysisType {
46    const ENCODING: Encoding = NSUInteger::ENCODING;
47}
48
49unsafe impl RefEncode for AVVideoFrameAnalysisType {
50    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
51}
52
53/// Describes how High Dynamic Range (HDR) video content renders.
54///
55/// See also [Apple's documentation](https://developer.apple.com/documentation/avkit/avdisplaydynamicrange?language=objc)
56// NS_ENUM
57#[repr(transparent)]
58#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
59pub struct AVDisplayDynamicRange(pub NSInteger);
60impl AVDisplayDynamicRange {
61    /// Defines an automatic dynamic range. Indicates that the dynamic range will be set automatically.
62    #[doc(alias = "AVDisplayDynamicRangeAutomatic")]
63    pub const Automatic: Self = Self(0);
64    /// Defines a standard dynamic range. Restricts the video content dynamic range to the standard range regardless of the actual range of the video content.
65    #[doc(alias = "AVDisplayDynamicRangeStandard")]
66    pub const Standard: Self = Self(1);
67    /// 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.
68    #[doc(alias = "AVDisplayDynamicRangeConstrainedHigh")]
69    pub const ConstrainedHigh: Self = Self(2);
70    /// Defines a high dynamic range. Allows video content to use extended dynamic range if it has dynamic range content.
71    #[doc(alias = "AVDisplayDynamicRangeHigh")]
72    pub const High: Self = Self(3);
73}
74
75unsafe impl Encode for AVDisplayDynamicRange {
76    const ENCODING: Encoding = NSInteger::ENCODING;
77}
78
79unsafe impl RefEncode for AVDisplayDynamicRange {
80    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
81}