objc2_av_foundation/generated/
AVAssetSegmentReport.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-media")]
6use objc2_core_media::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct AVAssetSegmentType(pub NSInteger);
23impl AVAssetSegmentType {
24 #[doc(alias = "AVAssetSegmentTypeInitialization")]
25 pub const Initialization: Self = Self(1);
26 #[doc(alias = "AVAssetSegmentTypeSeparable")]
27 pub const Separable: Self = Self(2);
28}
29
30unsafe impl Encode for AVAssetSegmentType {
31 const ENCODING: Encoding = NSInteger::ENCODING;
32}
33
34unsafe impl RefEncode for AVAssetSegmentType {
35 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
36}
37
38extern_class!(
39 #[unsafe(super(NSObject))]
47 #[derive(Debug, PartialEq, Eq, Hash)]
48 pub struct AVAssetSegmentReport;
49);
50
51unsafe impl Send for AVAssetSegmentReport {}
52
53unsafe impl Sync for AVAssetSegmentReport {}
54
55unsafe impl NSObjectProtocol for AVAssetSegmentReport {}
56
57impl AVAssetSegmentReport {
58 extern_methods!(
59 #[unsafe(method(init))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63 #[unsafe(method(new))]
64 #[unsafe(method_family = new)]
65 pub unsafe fn new() -> Retained<Self>;
66
67 #[unsafe(method(segmentType))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn segmentType(&self) -> AVAssetSegmentType;
71
72 #[unsafe(method(trackReports))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn trackReports(&self) -> Retained<NSArray<AVAssetSegmentTrackReport>>;
76 );
77}
78
79extern_class!(
80 #[unsafe(super(NSObject))]
86 #[derive(Debug, PartialEq, Eq, Hash)]
87 pub struct AVAssetSegmentTrackReport;
88);
89
90unsafe impl Send for AVAssetSegmentTrackReport {}
91
92unsafe impl Sync for AVAssetSegmentTrackReport {}
93
94unsafe impl NSObjectProtocol for AVAssetSegmentTrackReport {}
95
96impl AVAssetSegmentTrackReport {
97 extern_methods!(
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102 #[unsafe(method(new))]
103 #[unsafe(method_family = new)]
104 pub unsafe fn new() -> Retained<Self>;
105
106 #[cfg(feature = "objc2-core-media")]
107 #[unsafe(method(trackID))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn trackID(&self) -> CMPersistentTrackID;
111
112 #[cfg(feature = "AVMediaFormat")]
113 #[unsafe(method(mediaType))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn mediaType(&self) -> Retained<AVMediaType>;
117
118 #[cfg(feature = "objc2-core-media")]
119 #[unsafe(method(earliestPresentationTimeStamp))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn earliestPresentationTimeStamp(&self) -> CMTime;
123
124 #[cfg(feature = "objc2-core-media")]
125 #[unsafe(method(duration))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn duration(&self) -> CMTime;
129
130 #[unsafe(method(firstVideoSampleInformation))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn firstVideoSampleInformation(
134 &self,
135 ) -> Option<Retained<AVAssetSegmentReportSampleInformation>>;
136 );
137}
138
139extern_class!(
140 #[unsafe(super(NSObject))]
146 #[derive(Debug, PartialEq, Eq, Hash)]
147 pub struct AVAssetSegmentReportSampleInformation;
148);
149
150unsafe impl Send for AVAssetSegmentReportSampleInformation {}
151
152unsafe impl Sync for AVAssetSegmentReportSampleInformation {}
153
154unsafe impl NSObjectProtocol for AVAssetSegmentReportSampleInformation {}
155
156impl AVAssetSegmentReportSampleInformation {
157 extern_methods!(
158 #[unsafe(method(init))]
159 #[unsafe(method_family = init)]
160 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
161
162 #[unsafe(method(new))]
163 #[unsafe(method_family = new)]
164 pub unsafe fn new() -> Retained<Self>;
165
166 #[cfg(feature = "objc2-core-media")]
167 #[unsafe(method(presentationTimeStamp))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn presentationTimeStamp(&self) -> CMTime;
173
174 #[unsafe(method(offset))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn offset(&self) -> NSInteger;
178
179 #[unsafe(method(length))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn length(&self) -> NSInteger;
183
184 #[unsafe(method(isSyncSample))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn isSyncSample(&self) -> bool;
188 );
189}