1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
/// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoption?language=objc)
// NS_TYPED_ENUM
pub type AVAssetPlaybackConfigurationOption = NSString;
extern "C" {
/// Indicates whether or not the asset can be rendered as stereo video.
///
/// Clients may use this property to determine whether to configure stereo video rendering.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionstereovideo?language=objc)
pub static AVAssetPlaybackConfigurationOptionStereoVideo:
&'static AVAssetPlaybackConfigurationOption;
}
extern "C" {
/// Indicates whether or not the asset can rendered as stereo video and is also in a multiview compression format.
///
/// Clients may use this property to determine whether to configure stereo video rendering.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionstereomultiviewvideo?language=objc)
pub static AVAssetPlaybackConfigurationOptionStereoMultiviewVideo:
&'static AVAssetPlaybackConfigurationOption;
}
extern "C" {
/// Indicates whether or not the asset can be rendered as spatial video.
///
/// Clients may use this property to determine whether to configure spatial video rendering.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionspatialvideo?language=objc)
pub static AVAssetPlaybackConfigurationOptionSpatialVideo:
&'static AVAssetPlaybackConfigurationOption;
}
extern "C" {
/// Indicates whether the asset calls for the use of a non-rectilinear projection for rendering video.
///
/// Clients may use this property to determine whether to configure a non-rectilinear projection when displaying video.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionnonrectilinearprojection?language=objc)
pub static AVAssetPlaybackConfigurationOptionNonRectilinearProjection:
&'static AVAssetPlaybackConfigurationOption;
}
extern "C" {
/// Indicates whether the asset is Apple Immersive Video.
///
/// Clients may use this property to switch into specific display and control modes for Apple Immersive Video playback.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionappleimmersivevideo?language=objc)
pub static AVAssetPlaybackConfigurationOptionAppleImmersiveVideo:
&'static AVAssetPlaybackConfigurationOption;
}
extern_class!(
/// AVAssetPlaybackAssistant provides playback information for an asset.
///
/// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackassistant?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVAssetPlaybackAssistant;
);
unsafe impl Send for AVAssetPlaybackAssistant {}
unsafe impl Sync for AVAssetPlaybackAssistant {}
extern_conformance!(
unsafe impl NSObjectProtocol for AVAssetPlaybackAssistant {}
);
impl AVAssetPlaybackAssistant {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "AVAsset")]
/// Returns an instance of AVAssetPlaybackAssistant for inspection of an AVAsset object.
///
/// - Parameter asset: An instance of AVAsset.
///
/// - Returns: An instance of AVAssetPlaybackAssistant.
#[unsafe(method(assetPlaybackAssistantWithAsset:))]
#[unsafe(method_family = none)]
pub unsafe fn assetPlaybackAssistantWithAsset(asset: &AVAsset) -> Retained<Self>;
#[cfg(feature = "block2")]
/// Calls the completionHandler with information about the asset.
///
/// completionHandler is called when all of the AVAssetPlaybackConfigurationOption values have been loaded. If AVAssetPlaybackAssistant encounters failures when inspecting the contents of the asset, it will return no AVAssetPlaybackConfigurationOptions associated with those contents.
///
/// - Parameter completionHandler: Called with an array of AVAssetPlaybackConfigurationOption values describing capabilities of the asset.
///
/// # Safety
///
/// `completion_handler` block must be sendable.
#[unsafe(method(loadPlaybackConfigurationOptionsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadPlaybackConfigurationOptionsWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<
dyn Fn(NonNull<NSArray<AVAssetPlaybackConfigurationOption>>),
>,
);
);
}