OSDN Git Service

Package media/*/*.h headers as a headers lib: media_plugin_headers
authorJiyong Park <jiyong@google.com>
Thu, 29 Jun 2017 05:21:37 +0000 (14:21 +0900)
committerJiyong Park <jiyong@google.com>
Mon, 3 Jul 2017 10:35:54 +0000 (19:35 +0900)
Headers under frameworks/native/include/media serves as an interface
that is meant to be implemented by vendors. For example.
media/hardware/CryptoAPI.h is implemented under
vendor/widevine/libwvdrmengine/mediacrypto.

When building with BOARD_VNDK_VERSION, the headers are not accessible to
vendors since they have been included via the global include paths and
the paths are not available when building with BOARD_VNDK_VERSION.

So, we need to make a "headers library" for the media headers and modify
vendors to use the headers lib. Usually, we have been doing this by
moving the headers into a subdirectory (usually 'include') of a module
that implements the headers. But, this approach can't be used at this
time since the media headers are implemented by many modules.

The chosen solution is to a separate directory headers/media_plugin and
define a headers lib named media_plugin_headers there.

Note: frameworks/native/headers will now be the home for such
header-only libraries.

Bug: 63120269
Test: build
Change-Id: I67d625706b40d06c8f0602284fbcc1cc8b174c6f

27 files changed:
Android.bp
headers/Android.bp [new file with mode: 0644]
headers/media_plugin/media/cas/CasAPI.h [moved from include/media/cas/CasAPI.h with 100% similarity]
headers/media_plugin/media/cas/DescramblerAPI.h [moved from include/media/cas/DescramblerAPI.h with 100% similarity]
headers/media_plugin/media/drm/DrmAPI.h [moved from include/media/drm/DrmAPI.h with 100% similarity]
headers/media_plugin/media/editor/II420ColorConverter.h [moved from include/media/editor/II420ColorConverter.h with 100% similarity]
headers/media_plugin/media/hardware/CryptoAPI.h [moved from include/media/hardware/CryptoAPI.h with 100% similarity]
headers/media_plugin/media/hardware/HDCPAPI.h [moved from include/media/hardware/HDCPAPI.h with 100% similarity]
headers/media_plugin/media/hardware/HardwareAPI.h [moved from include/media/hardware/HardwareAPI.h with 100% similarity]
headers/media_plugin/media/hardware/MetadataBufferType.h [moved from include/media/hardware/MetadataBufferType.h with 100% similarity]
headers/media_plugin/media/hardware/OMXPluginBase.h [moved from include/media/hardware/OMXPluginBase.h with 100% similarity]
headers/media_plugin/media/hardware/VideoAPI.h [moved from include/media/hardware/VideoAPI.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_AsString.h [moved from include/media/openmax/OMX_AsString.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Audio.h [moved from include/media/openmax/OMX_Audio.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_AudioExt.h [moved from include/media/openmax/OMX_AudioExt.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Component.h [moved from include/media/openmax/OMX_Component.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_ContentPipe.h [moved from include/media/openmax/OMX_ContentPipe.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Core.h [moved from include/media/openmax/OMX_Core.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_IVCommon.h [moved from include/media/openmax/OMX_IVCommon.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Image.h [moved from include/media/openmax/OMX_Image.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Index.h [moved from include/media/openmax/OMX_Index.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_IndexExt.h [moved from include/media/openmax/OMX_IndexExt.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Other.h [moved from include/media/openmax/OMX_Other.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Types.h [moved from include/media/openmax/OMX_Types.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_Video.h [moved from include/media/openmax/OMX_Video.h with 100% similarity]
headers/media_plugin/media/openmax/OMX_VideoExt.h [moved from include/media/openmax/OMX_VideoExt.h with 100% similarity]
include/media [new symlink]

index cd05b21..9757797 100644 (file)
@@ -8,6 +8,7 @@ ndk_headers {
 
 subdirs = [
     "cmds/*",
+    "headers",
     "libs/*",
     "opengl",
     "services/*",
diff --git a/headers/Android.bp b/headers/Android.bp
new file mode 100644 (file)
index 0000000..1ea1ea5
--- /dev/null
@@ -0,0 +1,16 @@
+cc_library_headers {
+    name: "media_plugin_headers",
+    export_include_dirs: ["media_plugin"],
+    header_libs: [
+        "libstagefright_headers",
+        "libcutils_headers",
+        "libutils_headers",
+        "libstagefright_foundation_headers",
+    ],
+    export_header_lib_headers: [
+        "libstagefright_headers",
+        "libcutils_headers",
+        "libutils_headers",
+        "libstagefright_foundation_headers",
+    ],
+}
diff --git a/include/media b/include/media
new file mode 120000 (symlink)
index 0000000..3e7da1c
--- /dev/null
@@ -0,0 +1 @@
+../headers/media_plugin/media
\ No newline at end of file