GN: Changes for vp9, opus and direct trace

Corresponding GN changes for
https://webrtc-codereview.appspot.com/34099004/

BUG=4185
R=brettw@chromium.org

Review URL: https://webrtc-codereview.appspot.com/40669004

Cr-Commit-Position: refs/heads/master@{#8377}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8377 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2015-02-16 12:47:20 +00:00
parent e35fa96cbe
commit ce22f13f0e
5 changed files with 34 additions and 15 deletions

View File

@ -46,6 +46,7 @@ declare_args() {
rtc_build_libjpeg = true rtc_build_libjpeg = true
rtc_build_libyuv = true rtc_build_libyuv = true
rtc_build_libvpx = true rtc_build_libvpx = true
rtc_build_vp9 = true
rtc_build_ssl = true rtc_build_ssl = true
# Disable by default. # Disable by default.
@ -66,6 +67,10 @@ declare_args() {
# https://gcc.gnu.org/wiki/LinkTimeOptimization # https://gcc.gnu.org/wiki/LinkTimeOptimization
rtc_use_lto = false rtc_use_lto = false
# Directly call the trace callback instead of passing it to a logging
# thread. Used for components that provide their own threaded logging.
rtc_use_direct_trace = false
if (build_with_chromium) { if (build_with_chromium) {
# Exclude pulse audio on Chromium since its prerequisites don't require # Exclude pulse audio on Chromium since its prerequisites don't require
# pulse audio. # pulse audio.
@ -116,3 +121,9 @@ declare_args() {
# //build/config/arm.gni (since it disables Neon for Android). # //build/config/arm.gni (since it disables Neon for Android).
rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version >= 7) rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version >= 7)
} }
# Make it possible to provide custom locations for some libraries (move these
# up into declare_args should we need to actually use them for the GN build).
rtc_libvpx_dir = "//third_party/libvpx"
rtc_libyuv_dir = "//third_party/libyuv"
rtc_opus_dir = "//third_party/opus"

View File

@ -47,10 +47,10 @@ source_set("common_video") {
deps = [ "../system_wrappers" ] deps = [ "../system_wrappers" ]
if (rtc_build_libyuv) { if (rtc_build_libyuv) {
deps += [ "//third_party/libyuv" ] deps += [ "$rtc_libyuv_dir" ]
public_deps = [ "//third_party/libyuv" ] public_deps = [ "$rtc_libyuv_dir" ]
} else { } else {
# Need to add a directory normally exported by libyuv. # Need to add a directory normally exported by libyuv.
include_dirs += [ "//third_party/libyuv/include" ] include_dirs += [ "$rtc_libyuv_dir/include" ]
} }
} }

View File

@ -718,7 +718,7 @@ source_set("webrtc_opus") {
configs += [ "../..:common_config" ] configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ] public_configs = [ "../..:common_inherited_config" ]
deps += [ "//third_party/opus" ] deps += [ rtc_opus_dir ]
} }
} }
@ -806,7 +806,7 @@ source_set("neteq") {
":neteq_config", ":neteq_config",
] ]
forward_dependent_configs_from = [ "//third_party/opus" ] forward_dependent_configs_from = [ rtc_opus_dir ]
if (is_clang) { if (is_clang) {
# Suppress warnings from Chrome's Clang plugins. # Suppress warnings from Chrome's Clang plugins.
@ -825,6 +825,6 @@ source_set("neteq") {
":pcm16b", ":pcm16b",
"../../common_audio", "../../common_audio",
"../../system_wrappers", "../../system_wrappers",
"//third_party/opus", rtc_opus_dir,
] ]
} }

View File

@ -166,7 +166,7 @@ source_set("webrtc_vp8") {
# TODO(kjellander): Remove once libvpx has changed it's libvpx_config to be # TODO(kjellander): Remove once libvpx has changed it's libvpx_config to be
# in direct_dependent_configs. # in direct_dependent_configs.
configs += [ "//third_party/libvpx:libvpx_config" ] configs += [ "$rtc_libvpx_dir:libvpx_config" ]
deps = [ deps = [
":video_coding_utility", ":video_coding_utility",
@ -175,17 +175,21 @@ source_set("webrtc_vp8") {
] ]
if (rtc_build_libvpx) { if (rtc_build_libvpx) {
deps += [ deps += [
"//third_party/libvpx", rtc_libvpx_dir,
] ]
} }
} }
source_set("webrtc_vp9") { source_set("webrtc_vp9") {
if (rtc_build_vp9) {
sources = [ sources = [
"codecs/vp9/include/vp9.h", "codecs/vp9/include/vp9.h",
"codecs/vp9/vp9_impl.cc", "codecs/vp9/vp9_impl.cc",
"codecs/vp9/vp9_impl.h", "codecs/vp9/vp9_impl.h",
] ]
} else {
sources = [ "codecs/vp9/vp9_dummy_impl.cc" ]
}
configs += [ "../..:common_config" ] configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ] public_configs = [ "../..:common_inherited_config" ]
@ -198,7 +202,7 @@ source_set("webrtc_vp9") {
# TODO(kjellander): Remove once libvpx has changed it's libvpx_config to be # TODO(kjellander): Remove once libvpx has changed it's libvpx_config to be
# in direct_dependent_configs. # in direct_dependent_configs.
configs += [ "//third_party/libvpx:libvpx_config" ] configs += [ "$rtc_libvpx_dir:libvpx_config" ]
deps = [ deps = [
":video_coding_utility", ":video_coding_utility",
@ -207,7 +211,7 @@ source_set("webrtc_vp9") {
] ]
if (rtc_build_libvpx) { if (rtc_build_libvpx) {
deps += [ deps += [
"//third_party/libvpx", rtc_libvpx_dir,
] ]
} }
} }

View File

@ -122,6 +122,10 @@ static_library("system_wrappers") {
libs = [] libs = []
deps = [] deps = []
if (rtc_use_direct_trace) {
defines += [ "WEBRTC_DIRECT_TRACE" ]
}
if (is_android) { if (is_android) {
sources += [ sources += [
"interface/logcat_trace_context.h", "interface/logcat_trace_context.h",