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

Unified Diff: third_party/openh264/BUILD.gn

Issue 1403893007: Adding third_party/openh264/src, build files and unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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
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..99851610d4add86a8d0228ce2c656acedbf0fa5a
--- /dev/null
+++ b/third_party/openh264/BUILD.gn
@@ -0,0 +1,129 @@
+# 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("//build/config/features.gni")
+import("//third_party/openh264/openh264.gni")
+
+if (build_openh264) {
+ # === Building with OpenH264 ===
+
+ # Default values for cflags shared by all openh264 targets.
+ openh264_cflags = [
+ "-fvisibility=default",
torbjorng 2015/11/05 13:18:25 What is this compiler flag meant to achieve? Symb
hbos_chromium 2015/11/10 14:36:47 Hmm I thought I needed it at some point to make fu
+ "-w",
torbjorng 2015/11/05 13:18:25 I understand that this might be convenient since w
hbos_chromium 2015/11/10 14:36:47 I've switched over to ignoring specific warnings n
+ ]
+ openh264_defines = []
+
+ # Platform-specific defines.
+ if (is_android) {
+ openh264_defines += [ "ANDROID_NDK" ]
+ }
+
+ # Work-around for problems relating to the VERSION_NUMBER macro in version.h.
+ if (!is_android) {
+ # On some windows and mac builds VERSION_NUMBER is not defined when
+ # including version.h (either another file is included instead of our
+ # version.h or something else has already defined its include guard, I have
+ # not been able to reproduce the problem on a local machine).
+ # Since the macro is only used for debug printing in wels[En/De]coderExt.cpp
+ # we can get around the undeclared identifier error by giving it a default
+ # value ourselves.
+ openh264_defines += [ "VERSION_NUMBER=\"openh264 v.?.?\"" ]
+ }
+
+ static_library("openh264_common") {
+ 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",
+ ]
+ }
+ defines = openh264_defines
+ cflags = openh264_cflags
+
+ include_dirs = [
+ "src/codec/api/svc",
+ "src/codec/common/inc",
+ "src/codec/common/src",
+ ]
+ sources = openh264_common_sources
+ }
+
+ static_library("openh264_processing") {
+ deps = [
+ ":openh264_common",
+ ]
+ defines = openh264_defines
+ cflags = openh264_cflags
+
+ include_dirs = [
+ "src/codec/api/svc",
+ "src/codec/common/inc",
+ "src/codec/common/src",
+ "src/codec/processing/interface",
+ "src/codec/processing/interface/",
+ "src/codec/processing/src/adaptivequantization",
+ "src/codec/processing/src/backgrounddetection",
+ "src/codec/processing/src/common",
+ "src/codec/processing/src/complexityanalysis",
+ "src/codec/processing/src/denoise",
+ "src/codec/processing/src/downsample",
+ "src/codec/processing/src/imagerotate",
+ "src/codec/processing/src/scenechangedetection",
+ "src/codec/processing/src/scrolldetection",
+ "src/codec/processing/src/vaacalc",
+ ]
+ sources = openh264_processing_sources
+ }
+
+ static_library("openh264_encoder") {
+ deps = [
+ ":openh264_common",
+ ":openh264_processing",
+ ]
+ defines = openh264_defines
+ cflags = openh264_cflags
+
+ include_dirs = [
+ "src/codec/api/svc",
+ "src/codec/common/inc",
+ "src/codec/common/src",
+ "src/codec/encoder/core/inc",
+ "src/codec/encoder/core/src",
+ "src/codec/encoder/plus/inc",
+ "src/codec/encoder/plus/src",
+ "src/codec/processing/interface/",
+ ]
+ sources = openh264_encoder_sources
+ }
+
+ static_library("openh264_decoder") {
+ deps = [
+ ":openh264_common",
+ ":openh264_processing",
+ ]
+ defines = openh264_defines
+ defines += [
+ # Disables decoder_core.cpp debug prints.
+ "CODEC_FOR_TESTBED",
+ ]
+ cflags = openh264_cflags
+
+ include_dirs = [
+ "src/codec/api/svc",
+ "src/codec/common/inc",
+ "src/codec/common/src",
+ "src/codec/decoder/core/inc",
+ "src/codec/decoder/core/src",
+ "src/codec/decoder/plus/inc",
+ "src/codec/decoder/plus/src",
+ "src/codec/processing/interface/",
+ ]
+ sources = openh264_decoder_sources
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698