objc2_av_foundation/generated/
AVAssetPlaybackAssistant.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
10/// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoption?language=objc)
11// NS_TYPED_ENUM
12pub type AVAssetPlaybackConfigurationOption = NSString;
13
14extern "C" {
15    /// Indicates whether or not the asset can be rendered as stereo video.
16    ///
17    /// Clients may use this property to determine whether to configure stereo video rendering.
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionstereovideo?language=objc)
20    pub static AVAssetPlaybackConfigurationOptionStereoVideo:
21        &'static AVAssetPlaybackConfigurationOption;
22}
23
24extern "C" {
25    /// Indicates whether or not the asset can rendered as stereo video and is also in a multiview compression format.
26    ///
27    /// Clients may use this property to determine whether to configure stereo video rendering.
28    ///
29    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionstereomultiviewvideo?language=objc)
30    pub static AVAssetPlaybackConfigurationOptionStereoMultiviewVideo:
31        &'static AVAssetPlaybackConfigurationOption;
32}
33
34extern "C" {
35    /// Indicates whether or not the asset can be rendered as spatial video.
36    ///
37    /// Clients may use this property to determine whether to configure spatial video rendering.
38    ///
39    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackconfigurationoptionspatialvideo?language=objc)
40    pub static AVAssetPlaybackConfigurationOptionSpatialVideo:
41        &'static AVAssetPlaybackConfigurationOption;
42}
43
44extern_class!(
45    /// AVAssetPlaybackAssistant provides playback information for an asset.
46    ///
47    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
48    ///
49    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetplaybackassistant?language=objc)
50    #[unsafe(super(NSObject))]
51    #[derive(Debug, PartialEq, Eq, Hash)]
52    pub struct AVAssetPlaybackAssistant;
53);
54
55unsafe impl Send for AVAssetPlaybackAssistant {}
56
57unsafe impl Sync for AVAssetPlaybackAssistant {}
58
59unsafe impl NSObjectProtocol for AVAssetPlaybackAssistant {}
60
61impl AVAssetPlaybackAssistant {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70
71        #[cfg(feature = "AVAsset")]
72        /// Returns an instance of AVAssetPlaybackAssistant for inspection of an AVAsset object.
73        ///
74        /// Parameter `asset`: An instance of AVAsset.
75        ///
76        /// Returns: An instance of AVAssetPlaybackAssistant.
77        #[unsafe(method(assetPlaybackAssistantWithAsset:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn assetPlaybackAssistantWithAsset(asset: &AVAsset) -> Retained<Self>;
80
81        #[cfg(feature = "block2")]
82        /// Calls the completionHandler with information about the asset.
83        ///
84        /// Parameter `completionHandler`: Called with an array of AVAssetPlaybackConfigurationOption values describing capabilities of the asset.
85        ///
86        /// 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.
87        #[unsafe(method(loadPlaybackConfigurationOptionsWithCompletionHandler:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn loadPlaybackConfigurationOptionsWithCompletionHandler(
90            &self,
91            completion_handler: &block2::Block<
92                dyn Fn(NonNull<NSArray<AVAssetPlaybackConfigurationOption>>),
93            >,
94        );
95    );
96}