Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: third_party/openh264/BUILD.gn

Issue 1446453004: Adding third_party/openh264 build files for encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase /w master and corrected comment about build flag Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/gn_migration.gypi ('k') | third_party/openh264/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/openh264/BUILD.gn
diff --git a/third_party/openh264/BUILD.gn b/third_party/openh264/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..5819a1ce117568798632dbbd5c60b3722a139035
--- /dev/null
+++ b/third_party/openh264/BUILD.gn
@@ -0,0 +1,75 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//third_party/openh264/openh264_args.gni")
+
+assert(use_openh264)
+
+# Import source and include variables from openh264.gypi.
+openh264_gypi_values = exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("openh264.gypi") ],
+ "scope")
+
+# Config shared by all openh264 targets.
+config("config") {
+ cflags = []
+ defines = []
+
+ # Compiler warnings to ignore.
+ if (!is_win) {
+ # GCC flags
+ cflags += [
+ "-Wno-header-hygiene",
+ "-Wno-unused-value",
+ ]
+ }
+
+ # Platform-specific defines.
+ if (is_android) {
+ # Android NDK is necessary for its cpufeatures and this define is what
+ # OpenH264 code uses to check if it should be used.
+ defines += [ "ANDROID_NDK" ]
+ }
+}
+
+source_set("common") {
+ sources = openh264_gypi_values.openh264_common_sources
+ include_dirs = openh264_gypi_values.openh264_common_includes
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":config" ]
+ deps = []
+ if (is_android) {
+ deps += [
+ # Defines "android_get/setCpu..." functions. The original OpenH264 build
+ # files replaces these using macros for "wels_..." versions of the same
+ # functions. We do not have access to these and use the <cpu-features.h>
+ # ones instead.
+ "//third_party/android_tools:cpu_features",
+ ]
+ }
+}
+
+source_set("processing") {
+ sources = openh264_gypi_values.openh264_processing_sources
+ include_dirs = openh264_gypi_values.openh264_processing_includes
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":config" ]
+ deps = [
+ ":common",
+ ]
+}
+
+source_set("encoder") {
+ sources = openh264_gypi_values.openh264_encoder_sources
+ include_dirs = openh264_gypi_values.openh264_encoder_includes
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":config" ]
+ deps = [
+ ":common",
+ ":processing",
+ ]
+}
« no previous file with comments | « build/gn_migration.gypi ('k') | third_party/openh264/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698