Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//third_party/openh264/openh264_args.gni") | |
| 6 | |
| 7 if (use_openh264) { | |
|
brettw
2015/11/25 19:26:34
As-is, this is unnecessary because this file will
hbos_chromium
2015/11/26 12:19:24
Done.
| |
| 8 # Import source and include variables from openh264.gypi. | |
| 9 openh264_gypi_values = exec_script("//build/gypi_to_gn.py", | |
| 10 [ rebase_path("openh264.gypi") ], | |
| 11 "scope") | |
| 12 | |
| 13 # Config shared by all openh264 targets. | |
| 14 config("openh264_config") { | |
| 15 cflags = [] | |
| 16 defines = [] | |
| 17 | |
| 18 # Compiler warnings to ignore. | |
| 19 if (!is_win) { | |
| 20 # GCC flags | |
| 21 cflags += [ | |
| 22 "-Wno-header-hygiene", | |
| 23 "-Wno-unused-value", | |
| 24 ] | |
| 25 } | |
| 26 | |
| 27 # Platform-specific defines. | |
| 28 if (is_android) { | |
| 29 # Android NDK is necessary for its cpufeatures and this define is what | |
| 30 # OpenH264 code uses to check if it should be used. | |
| 31 defines += [ "ANDROID_NDK" ] | |
| 32 } | |
| 33 } | |
| 34 | |
| 35 source_set("openh264_common") { | |
| 36 sources = openh264_gypi_values.openh264_common_sources | |
| 37 include_dirs = openh264_gypi_values.openh264_common_includes | |
| 38 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 39 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 40 configs += [ ":openh264_config" ] | |
| 41 deps = [] | |
| 42 if (is_android) { | |
| 43 deps += [ | |
| 44 # Defines "android_get/setCpu..." functions. The original OpenH264 build | |
| 45 # files replaces these using macros for "wels_..." versions of the same | |
| 46 # functions. We do not have access to these and use the <cpu-features.h> | |
| 47 # ones instead. | |
| 48 "//third_party/android_tools:cpu_features", | |
| 49 ] | |
| 50 } | |
| 51 } | |
| 52 | |
| 53 source_set("openh264_processing") { | |
| 54 sources = openh264_gypi_values.openh264_processing_sources | |
| 55 include_dirs = openh264_gypi_values.openh264_processing_includes | |
| 56 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 57 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 58 configs += [ ":openh264_config" ] | |
| 59 deps = [ | |
| 60 ":openh264_common", | |
| 61 ] | |
| 62 } | |
| 63 | |
| 64 source_set("openh264_encoder") { | |
| 65 sources = openh264_gypi_values.openh264_encoder_sources | |
| 66 include_dirs = openh264_gypi_values.openh264_encoder_includes | |
| 67 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 68 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 69 configs += [ ":openh264_config" ] | |
| 70 deps = [ | |
| 71 ":openh264_common", | |
| 72 ":openh264_processing", | |
| 73 ] | |
| 74 } | |
| 75 | |
| 76 source_set("openh264_decoder") { | |
| 77 sources = openh264_gypi_values.openh264_decoder_sources | |
| 78 include_dirs = openh264_gypi_values.openh264_decoder_includes | |
| 79 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 80 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 81 configs += [ ":openh264_config" ] | |
| 82 deps = [ | |
| 83 ":openh264_common", | |
| 84 ":openh264_processing", | |
| 85 ] | |
| 86 defines = [ | |
| 87 # Disables decoder_core.cpp debug prints. | |
| 88 "CODEC_FOR_TESTBED", | |
| 89 ] | |
| 90 } | |
| 91 } | |
| OLD | NEW |