Ocean
Loading...
Searching...
No Matches
DirectShow.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_DS_DIRECTSHOW_H
9#define META_OCEAN_MEDIA_DS_DIRECTSHOW_H
10
11#include "ocean/media/Media.h"
12
13#ifndef OCEAN_PLATFORM_BUILD_WINDOWS
14 #error This library is available on windows platforms only!
15#endif // OCEAN_PLATFORM_BUILD_WINDOWS
16
17namespace Ocean
18{
19
20namespace Media
21{
22
23namespace DirectShow
24{
25
26/**
27 * @ingroup media
28 * @defgroup mediads Ocean Media DirectShow Library
29 * @{
30 * The Ocean Media DirectShow Library provides DirectShow media functionalities.
31 * The library is available on windows platforms only.
32 * @}
33 */
34
35/**
36 * @namespace Ocean::Media::DirectShow Namespace of the Media DirectShow library.<p>
37 * The Namespace Ocean::Media::DirectShow is used in the entire Ocean Media DirectShow Library.
38 */
39
40// Defines OCEAN_MEDIA_DS_EXPORT for dll export and import.
41#if defined(OCEAN_PLATFORM_BUILD_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
42 #ifdef USE_OCEAN_MEDIA_DS_EXPORT
43 #define OCEAN_MEDIA_DS_EXPORT __declspec(dllexport)
44 #else
45 #define OCEAN_MEDIA_DS_EXPORT __declspec(dllimport)
46 #endif
47#else
48 #define OCEAN_MEDIA_DS_EXPORT
49#endif
50
51/**
52 * Returns the name of this media DirectShow library.
53 * @ingroup mediads
54 */
55OCEAN_MEDIA_DS_EXPORT std::string nameDirectShowLibrary();
56
57#ifdef OCEAN_RUNTIME_STATIC
58
59/**
60 * Registers this media library at the global library manager.
61 * This function calls DSLibrary::registerLibrary() only.
62 * @ingroup mediads
63 */
65
66/**
67 * Unregisters this media library at the global library manager.
68 * This function calls DSLibrary::unregisterLibrary() only.
69 * @return True, if succeeded
70 * @ingroup mediads
71 */
73
74#endif // OCEAN_RUNTIME_STATIC
75
76// The DISABLE_WARNINGS_BEGIN macro allows to disable any warnings, needs to be balanced with DISABLE_WARNINGS_END
77#ifndef DISABLE_WARNINGS_BEGIN
78 #if defined(_MSC_VER)
79 #define DISABLE_WARNINGS_BEGIN _Pragma("warning(push, 0)")
80 #define DISABLE_WARNINGS_END _Pragma("warning(pop)")
81 #else
82 #define DISABLE_WARNINGS_BEGIN
83 #define DISABLE_WARNINGS_END
84 #endif
85#endif
86
87} // namespace DirectShow
88
89} // namespace Media
90
91} // namespace Ocean
92
93#endif // META_OCEAN_MEDIA_DS_DIRECTSHOW_H
void registerDirectShowLibrary()
Registers this media library at the global library manager.
OCEAN_MEDIA_DS_EXPORT std::string nameDirectShowLibrary()
Returns the name of this media DirectShow library.
bool unregisterDirectShowLibrary()
Unregisters this media library at the global library manager.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15