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

Side by Side 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 unified diff | Download patch
OLDNEW
(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("//build/config/features.gni")
6 import("//third_party/openh264/openh264.gni")
7
8 if (build_openh264) {
9 # === Building with OpenH264 ===
10
11 # Default values for cflags shared by all openh264 targets.
12 openh264_cflags = [
13 "-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
14 "-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
15 ]
16 openh264_defines = []
17
18 # Platform-specific defines.
19 if (is_android) {
20 openh264_defines += [ "ANDROID_NDK" ]
21 }
22
23 # Work-around for problems relating to the VERSION_NUMBER macro in version.h.
24 if (!is_android) {
25 # On some windows and mac builds VERSION_NUMBER is not defined when
26 # including version.h (either another file is included instead of our
27 # version.h or something else has already defined its include guard, I have
28 # not been able to reproduce the problem on a local machine).
29 # Since the macro is only used for debug printing in wels[En/De]coderExt.cpp
30 # we can get around the undeclared identifier error by giving it a default
31 # value ourselves.
32 openh264_defines += [ "VERSION_NUMBER=\"openh264 v.?.?\"" ]
33 }
34
35 static_library("openh264_common") {
36 deps = []
37 if (is_android) {
38 deps += [
39 # Defines "android_get/setCpu..." functions. The original OpenH264 build
40 # files replaces these using macros for "wels_..." versions of the same
41 # functions. We do not have access to these and use the <cpu-features.h>
42 # ones instead.
43 "//third_party/android_tools:cpu_features",
44 ]
45 }
46 defines = openh264_defines
47 cflags = openh264_cflags
48
49 include_dirs = [
50 "src/codec/api/svc",
51 "src/codec/common/inc",
52 "src/codec/common/src",
53 ]
54 sources = openh264_common_sources
55 }
56
57 static_library("openh264_processing") {
58 deps = [
59 ":openh264_common",
60 ]
61 defines = openh264_defines
62 cflags = openh264_cflags
63
64 include_dirs = [
65 "src/codec/api/svc",
66 "src/codec/common/inc",
67 "src/codec/common/src",
68 "src/codec/processing/interface",
69 "src/codec/processing/interface/",
70 "src/codec/processing/src/adaptivequantization",
71 "src/codec/processing/src/backgrounddetection",
72 "src/codec/processing/src/common",
73 "src/codec/processing/src/complexityanalysis",
74 "src/codec/processing/src/denoise",
75 "src/codec/processing/src/downsample",
76 "src/codec/processing/src/imagerotate",
77 "src/codec/processing/src/scenechangedetection",
78 "src/codec/processing/src/scrolldetection",
79 "src/codec/processing/src/vaacalc",
80 ]
81 sources = openh264_processing_sources
82 }
83
84 static_library("openh264_encoder") {
85 deps = [
86 ":openh264_common",
87 ":openh264_processing",
88 ]
89 defines = openh264_defines
90 cflags = openh264_cflags
91
92 include_dirs = [
93 "src/codec/api/svc",
94 "src/codec/common/inc",
95 "src/codec/common/src",
96 "src/codec/encoder/core/inc",
97 "src/codec/encoder/core/src",
98 "src/codec/encoder/plus/inc",
99 "src/codec/encoder/plus/src",
100 "src/codec/processing/interface/",
101 ]
102 sources = openh264_encoder_sources
103 }
104
105 static_library("openh264_decoder") {
106 deps = [
107 ":openh264_common",
108 ":openh264_processing",
109 ]
110 defines = openh264_defines
111 defines += [
112 # Disables decoder_core.cpp debug prints.
113 "CODEC_FOR_TESTBED",
114 ]
115 cflags = openh264_cflags
116
117 include_dirs = [
118 "src/codec/api/svc",
119 "src/codec/common/inc",
120 "src/codec/common/src",
121 "src/codec/decoder/core/inc",
122 "src/codec/decoder/core/src",
123 "src/codec/decoder/plus/inc",
124 "src/codec/decoder/plus/src",
125 "src/codec/processing/interface/",
126 ]
127 sources = openh264_decoder_sources
128 }
129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698