Ocean
AVFoundation.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_MEDIA_AVF_AVFOUNDATION_H
9 #define META_OCEAN_MEDIA_AVF_AVFOUNDATION_H
10 
12 
13 #include "ocean/media/Media.h"
14 
15 #ifndef OCEAN_PLATFORM_BUILD_APPLE
16  #error This library is available on Mac OSX and iOS platforms only!
17 #endif
18 
19 #include <CoreMedia/CoreMedia.h>
20 #include <CoreVideo/CoreVideo.h>
21 
22 namespace Ocean
23 {
24 
25 namespace Media
26 {
27 
28 namespace AVFoundation
29 {
30 
31 /**
32  * @ingroup media
33  * @defgroup mediaavf Ocean Media AVFoundation Library
34  * @{
35  * The Ocean Media AVFoundation Library provides media functionalities based on Apple's AV Foundation framework.
36  * The library is available on Apple platforms only.
37  * @}
38  */
39 
40 /**
41  * @namespace Ocean::Media::AVFoundation Namespace of the Media AVFoundation library.<p>
42  * The Namespace Ocean::Media::AVFoundation is used in the entire Ocean Media AVFoundation Library.
43  */
44 
45 /**
46  * Returns the name of this media AVFoundation library.
47  * @ingroup mediaavf
48  */
49 std::string nameAVFLibrary();
50 
51 #if defined(OCEAN_RUNTIME_STATIC)
52 
53 /**
54  * Registers this media library at the global library manager.
55  * This function calls AVFLibrary::registerLibrary() only.
56  * @ingroup mediaavf
57  */
59 
60 /**
61  * Unregisters this media library at the global library manager.
62  * This function calls AVFLibrary::unregisterLibrary() only.
63  * @return True, if succeeded
64  * @ingroup mediaavf
65  */
67 
68 #endif // OCEAN_RUNTIME_STATIC
69 
70 /**
71  * Definition of a scoped object holding a CVBufferRef object.
72  * The wrapped CVBufferRef object will be released automatically once the scoped object does not exist anymore.
73  * @ingroup mediaavf
74  */
76 
77 /**
78  * Definition of a scoped object holding a CVPixelBufferRef object.
79  * The wrapped CVPixelBufferRef object will be released automatically once the scoped object does not exist anymore.
80  * @ingroup mediaavf
81  */
83 
84 /**
85  * Definition of a scoped object holding a CMSampleBufferRef object.
86  * The wrapped CMSampleBufferRef object will be released automatically once the scoped object does not exist anymore.
87  * @ingroup mediaavf
88  */
90 
91 }
92 
93 }
94 
95 }
96 
97 #endif // META_OCEAN_MEDIA_AVF_AVFOUNDATION_H
This class wraps an unmanaged object (or reference) which needs to be released after usage.
Definition: ScopedObject.h:166
void registerAVFLibrary()
Registers this media library at the global library manager.
bool unregisterAVFLibrary()
Unregisters this media library at the global library manager.
std::string nameAVFLibrary()
Returns the name of this media AVFoundation library.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15