objc2_av_foundation/generated/
AVVideoPerformanceMetrics.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [SPI] An instance of AVVideoPerformanceMetrics provides current performance metrics.
12    ///
13    /// An instance of AVVideoPerformanceMetrics provides named properties for accessing the video playback quality metrics.
14    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avvideoperformancemetrics?language=objc)
17    #[unsafe(super(NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    pub struct AVVideoPerformanceMetrics;
20);
21
22unsafe impl Send for AVVideoPerformanceMetrics {}
23
24unsafe impl Sync for AVVideoPerformanceMetrics {}
25
26extern_conformance!(
27    unsafe impl NSObjectProtocol for AVVideoPerformanceMetrics {}
28);
29
30impl AVVideoPerformanceMetrics {
31    extern_methods!(
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36        #[unsafe(method(new))]
37        #[unsafe(method_family = new)]
38        pub unsafe fn new() -> Retained<Self>;
39
40        /// [SPI] The total number of frames that would have been displayed if no frames are dropped.
41        ///
42        /// This property is not atomic.
43        ///
44        /// # Safety
45        ///
46        /// This might not be thread-safe.
47        #[unsafe(method(totalNumberOfFrames))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn totalNumberOfFrames(&self) -> NSInteger;
50
51        /// [SPI] The total number of frames dropped prior to decoding or dropped because a frame missed its display deadline.
52        ///
53        /// This property is not atomic.
54        ///
55        /// # Safety
56        ///
57        /// This might not be thread-safe.
58        #[unsafe(method(numberOfDroppedFrames))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn numberOfDroppedFrames(&self) -> NSInteger;
61
62        /// [SPI] The total number of corrupted frames that have been detected.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(numberOfCorruptedFrames))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn numberOfCorruptedFrames(&self) -> NSInteger;
72
73        /// [SPI] The total number of full screen frames that were rendered in a special power-efficient mode that didn't require the frame to be composited with other UI elements.
74        ///
75        /// This property is not atomic.
76        ///
77        /// # Safety
78        ///
79        /// This might not be thread-safe.
80        #[unsafe(method(numberOfFramesDisplayedUsingOptimizedCompositing))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn numberOfFramesDisplayedUsingOptimizedCompositing(&self) -> NSInteger;
83
84        /// [SPI] The accumulated amount of time between the prescribed presentation times of displayed video frames and the actual time at which they were displayed.
85        ///
86        /// This delay is always greater than or equal to zero since frames must never be displayed before their presentation time. Non-zero delays are a sign of playback jitter and possible loss of A/V sync.
87        ///
88        /// This property is not atomic.
89        ///
90        /// # Safety
91        ///
92        /// This might not be thread-safe.
93        #[unsafe(method(totalAccumulatedFrameDelay))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn totalAccumulatedFrameDelay(&self) -> NSTimeInterval;
96
97        /// [SPI] The total number of frames that would have been displayed if no frames are dropped. Same as totalNumberOfFrames.
98        ///
99        /// This property is not atomic.
100        ///
101        /// # Safety
102        ///
103        /// This might not be thread-safe.
104        #[unsafe(method(totalNumberOfVideoFrames))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn totalNumberOfVideoFrames(&self) -> c_ulong;
107
108        /// [SPI] The total number of frames dropped prior to decoding or dropped because a frame missed its display deadline. Same as numberOfDroppedFrames.
109        ///
110        /// This property is not atomic.
111        ///
112        /// # Safety
113        ///
114        /// This might not be thread-safe.
115        #[unsafe(method(numberOfDroppedVideoFrames))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn numberOfDroppedVideoFrames(&self) -> c_ulong;
118
119        /// [SPI] The total number of corrupted frames that have been detected. Same as numberOfCorruptedFrames.
120        ///
121        /// This property is not atomic.
122        ///
123        /// # Safety
124        ///
125        /// This might not be thread-safe.
126        #[unsafe(method(numberOfCorruptedVideoFrames))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn numberOfCorruptedVideoFrames(&self) -> c_ulong;
129
130        /// [SPI] The total number of frames that were composited in detached mode.  Same as numberOfFramesDisplayedUsingOptimizedCompositing.
131        ///
132        /// This property is not atomic.
133        ///
134        /// # Safety
135        ///
136        /// This might not be thread-safe.
137        #[unsafe(method(numberOfDisplayCompositedVideoFrames))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn numberOfDisplayCompositedVideoFrames(&self) -> c_ulong;
140
141        /// [SPI] The total number of frames that were composited in undetached mode.
142        ///
143        /// This property is not atomic.
144        ///
145        /// # Safety
146        ///
147        /// This might not be thread-safe.
148        #[unsafe(method(numberOfNonDisplayCompositedVideoFrames))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn numberOfNonDisplayCompositedVideoFrames(&self) -> c_ulong;
151
152        /// [SPI] The accumulated amount of time, in microseconds, between the prescribed presentation times of displayed video frames and the actual time at which they were displayed.
153        ///
154        /// This delay is always greater than or equal to zero since frames must never be displayed before their presentation time. Non-zero delays are a sign of playback jitter and possible loss of A/V sync. Same as totalAccumulatedFrameDelay.
155        ///
156        /// This property is not atomic.
157        ///
158        /// # Safety
159        ///
160        /// This might not be thread-safe.
161        #[unsafe(method(totalFrameDelay))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn totalFrameDelay(&self) -> c_double;
164    );
165}