| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| config("android_media_headers_config") { |
| visibility = [ ":*" ] |
| include_dirs = [ |
| # android media-related include paths |
| "//third_party/android/platform/frameworks/av/media/libstagefright/omx/include", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/foundation/include", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/include", |
| "//third_party/android/platform/frameworks/native/headers/media_plugin/media/openmax", |
| ] |
| } |
| |
| source_set("android_media_headers_source_set") { |
| visibility = [ ":*" ] |
| public_configs = [ ":android_media_headers_config" ] |
| } |
| |
| config("android_non_media_headers_config") { |
| visibility = [ ":*" ] |
| include_dirs = [ |
| # other android headers - we try to minimize these |
| "//third_party/android/platform/system/core/libutils/include", |
| ] |
| } |
| |
| source_set("android_non_media_headers_source_set") { |
| visibility = [ ":*" ] |
| |
| # Not sure if this actually limits included headers to only this list, but |
| # that's the intent. |
| public = [ |
| "//third_party/android/platform/system/core/libutils/include/utils/RefBase.h", |
| ] |
| public_configs = [ ":android_non_media_headers_config" ] |
| } |
| |
| config("pal_config") { |
| visibility = [ ":*" ] |
| include_dirs = [ |
| # intentionally before android/platform/system/core/libutils/include |
| "include", |
| "include/media/stagefright/foundation", |
| ] |
| cflags = [ |
| #"-v", |
| "-Werror", |
| #"-includeclang_typeof.h", |
| ] |
| libs = [ |
| # for zx_clock_get() |
| "zircon", |
| ] |
| ldflags = [ |
| #"-v", |
| ] |
| } |
| |
| # This source set has a name starting with many 'a's which forces it to go |
| # first in the list of omx_android_pal_config_source_set public_deps even |
| # across a git-file-format. We need it to go first because for now we're |
| # overriding some android headers with omx_android_pal headers, and some of |
| # those headers we're overriding are in the same directories as other headers |
| # which we're not overriding, and include path ordering is determined by |
| # public_deps list ordering below. The downside: this is a bit arcane. The |
| # upside: We can build (at least one of - maybe more later) the Android OMX SW |
| # codecs from un-modified AOSP sources this way despite them not being in |
| # cross-platform libs, and this allows us to more easily track any new |
| # potentially-needed changes from there. If we continue to use these codecs we |
| # may at some point consider different ways of building and/or sharing them. |
| source_set("aaaaaaa_internal_pal_config_source_set") { |
| visibility = [ ":*" ] |
| public_configs = [ ":pal_config" ] |
| } |
| |
| # We want to control include path ordering. We choose to do that by having all |
| # ordering-sensitive include paths pulled in via public_deps. A public_deps |
| # section can't pull in a config directly, so wrap public_config_config in |
| # public_config_source_set. |
| source_set("omx_android_pal_config_source_set") { |
| visibility = [ ":*" ] |
| public_deps = [ |
| # This internal pal config source set must go first to enable us to override |
| # some AOSP headers while still pulling some other AOSP headers from some of |
| # the same AOSP directories. |
| ":aaaaaaa_internal_pal_config_source_set", |
| ":android_media_headers_source_set", |
| ":android_non_media_headers_source_set", |
| ":omx_so_entry_point_config_source_set", |
| ] |
| } |
| |
| config("so_entry_point_config") { |
| visibility = [ ":*" ] |
| include_dirs = [ |
| # so_entry_point.h has it's own include dir, since it's needed by clients |
| # that don't use the omx_android_pal and don't want to include any of the |
| # other PAL headers. The reason so_entry_point is part of the |
| # omx_android_pal is because on android the OMX libs have a C++ ABI, while |
| # on fuchsia the OMX libs have a C-only ABI, and the omx_android_pal is |
| # what smooths that over (among other things). |
| "so_entry_point", |
| |
| # For the structs used by so_entry_point's C-only ABI. |
| "//third_party/android/platform/frameworks/native/headers/media_plugin/media/openmax", |
| ] |
| } |
| |
| source_set("omx_so_entry_point_config_source_set") { |
| visibility = [ |
| "//garnet/bin/media/codecs/sw/omx/codec_runner_sw_omx/*", |
| ":omx_android_pal_config_source_set", |
| ] |
| public_configs = [ ":so_entry_point_config" ] |
| } |
| |
| source_set("omx_android_pal") { |
| visibility = [ |
| # This "omx_android_pal" is only for building OMX SW codecs from un-modified |
| # AOSP sources. |
| "//garnet/bin/media/codecs/sw/omx/*", |
| ] |
| sources = [ |
| # The single linker-level entry point to each .so is declared and |
| # defined here: |
| "so_entry_point.cc", |
| |
| # Adapters/shims/replacements to make un-modified AOSP OMX SW codecs build |
| # for Fuchsia (along with the header include path ordering established in |
| # omx_android_pal_config_source_set). |
| "AHandler.cc", |
| "ALooperRoster.cc", |
| "AMessage.cc", |
| "AString.cc", |
| "Condition.cc", |
| "Mutex.cc", |
| "String16.cc", |
| "String8.cc", |
| "Threads.cc", |
| "Timers.cc", |
| "not_Parcel.cc", |
| "port.cc", |
| |
| # Enough stagefright code to satisfy OMX SW codec dependencies. |
| "//third_party/android/platform/frameworks/av/media/libstagefright/foundation/ALooper.cpp", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/foundation/AMessage.cpp", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/omx/SimpleSoftOMXComponent.cpp", |
| "//third_party/android/platform/frameworks/av/media/libstagefright/omx/SoftOMXComponent.cpp", |
| |
| # We build these two utils classes as-is. |
| "//third_party/android/platform/system/core/libutils/RefBase.cpp", |
| "//third_party/android/platform/system/core/libutils/StrongPointer.cpp", |
| ] |
| |
| # All include paths are exposed (to OMX codec target only) via public_deps |
| # instead of as a mix of public_deps and public_configs, since a |
| # public_configs entry can always be converted to public_deps form via an |
| # intervening source_set, and because this way we avoid relying on include |
| # path ordering between public_configs and public_deps (instead only within |
| # public_deps). |
| public_deps = [ |
| ":omx_android_pal_config_source_set", |
| ] |
| deps = [ |
| "//garnet/public/lib/fxl", |
| "//zircon/public/lib/fit", |
| ] |
| } |