Ocean
ImageIO.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_IMAGEIO_IMAGEIO_H
9 #define META_OCEAN_MEDIA_IMAGEIO_IMAGEIO_H
10 
11 #include "ocean/media/Media.h"
12 
14 
15 #ifndef OCEAN_PLATFORM_BUILD_APPLE
16  #error This library is available on Apple platforms only!
17 #endif
18 
19 #include <ImageIO/ImageIO.h>
20 
21 namespace Ocean
22 {
23 
24 namespace Media
25 {
26 
27 namespace ImageIO
28 {
29 
30 /**
31  * @ingroup media
32  * @defgroup mediaiio Ocean Media ImageIO Library
33  * @{
34  * The Ocean Media ImageIO Library provides media functionalities based on Apple's ImageIO Component.
35  * The library is available on Apple platforms.
36  * @}
37  */
38 
39 /**
40  * @namespace Ocean::Media::ImageIO Namespace of the Media ImageIO library.<p>
41  * The Namespace Ocean::Media::ImageIO is used in the entire Ocean Media ImageIO Library.
42  */
43 
44 // Defines OCEAN_MEDIA_IIO_EXPORT for dll export and import.
45 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
46  #ifdef USE_OCEAN_MEDIA_IIO_EXPORT
47  #define OCEAN_MEDIA_IIO_EXPORT __declspec(dllexport)
48  #else
49  #define OCEAN_MEDIA_IIO_EXPORT __declspec(dllimport)
50  #endif
51 #else
52  #define OCEAN_MEDIA_IIO_EXPORT
53 #endif
54 
55 /**
56  * Returns the name of this media ImageIO library.
57  * @ingroup mediaiio
58  */
59 OCEAN_MEDIA_IIO_EXPORT std::string nameImageIOLibrary();
60 
61 #if defined(OCEAN_RUNTIME_STATIC) || defined(_ANDROID)
62 
63 /**
64  * Registers this media library at the global library manager.
65  * This function calls IIOLibrary::registerLibrary() only.
66  * @ingroup mediaiio
67  */
69 
70 /**
71  * Unregisters this media library at the global library manager.
72  * This function calls IIOLibrary::unregisterLibrary() only.
73  * @return True, if succeeded
74  * @ingroup mediaiio
75  */
77 
78 #endif // OCEAN_RUNTIME_STATIC
79 
80 /**
81  * Definition of a scoped object holding a CGImageSourceRef object.
82  * The wrapped CGImageSourceRef object will be released automatically once the scoped object does not exist anymore.
83  * @ingroup mediaiio
84  */
86 
87 /**
88  * Definition of a scoped object holding a CGImageDestinationRef object.
89  * The wrapped CGImageDestinationRef object will be released automatically once the scoped object does not exist anymore.
90  * @ingroup mediaiio
91  */
93 
94 }
95 
96 }
97 
98 }
99 
100 #endif // META_OCEAN_MEDIA_IMAGEIO_IMAGEIO_H
This class wraps an unmanaged object (or reference) which needs to be released after usage.
Definition: ScopedObject.h:166
OCEAN_MEDIA_IIO_EXPORT std::string nameImageIOLibrary()
Returns the name of this media ImageIO library.
void registerImageIOLibrary()
Registers this media library at the global library manager.
bool unregisterImageIOLibrary()
Unregisters this media library at the global library manager.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15