diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 4a9e7b87a..e680ba0dc 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -41,6 +41,7 @@ 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9', 'include_opus%': 1, + 'opus_dir%': '<(DEPTH)/third_party/opus', }, 'build_with_chromium%': '<(build_with_chromium)', 'build_with_libjingle%': '<(build_with_libjingle)', @@ -92,6 +93,7 @@ 'build_libjpeg%': 1, 'build_libyuv%': 1, 'build_libvpx%': 1, + 'build_vp9%': 1, 'build_ssl%': 1, # Disable by default @@ -100,7 +102,10 @@ # Enable to use the Mozilla internal settings. 'build_with_mozilla%': 0, + # Make it possible to provide custom locations for some libraries. + 'libvpx_dir%': '<(DEPTH)/third_party/libvpx', 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', + 'opus_dir%': '<(opus_dir)', # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU # This may be subject to change in accordance to Chromium's MIPS flags @@ -122,6 +127,10 @@ # enable schannel on windows. 'use_legacy_ssl_defaults%': 0, + # 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%': 0, + 'conditions': [ ['build_with_chromium==1', { # Exclude pulse audio on Chromium since its prerequisites don't require diff --git a/webrtc/modules/audio_coding/codecs/opus/opus.gypi b/webrtc/modules/audio_coding/codecs/opus/opus.gypi index c9f65f93d..4b61220cf 100644 --- a/webrtc/modules/audio_coding/codecs/opus/opus.gypi +++ b/webrtc/modules/audio_coding/codecs/opus/opus.gypi @@ -19,7 +19,7 @@ ] }, { 'dependencies': [ - '<(DEPTH)/third_party/opus/opus.gyp:opus' + '<(opus_dir)/opus.gyp:opus' ], }], ], diff --git a/webrtc/modules/audio_coding/neteq/neteq.gypi b/webrtc/modules/audio_coding/neteq/neteq.gypi index 5e3f250e6..a301c37ff 100644 --- a/webrtc/modules/audio_coding/neteq/neteq.gypi +++ b/webrtc/modules/audio_coding/neteq/neteq.gypi @@ -26,7 +26,7 @@ ], 'neteq_dependencies': [ '<@(codecs)', - '<(DEPTH)/third_party/opus/opus.gyp:opus', + '<(opus_dir)/opus.gyp:opus', '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', 'audio_decoder_interface', @@ -55,7 +55,7 @@ ], }, 'export_dependent_settings': [ - '<(DEPTH)/third_party/opus/opus.gyp:opus', + '<(opus_dir)/opus.gyp:opus', ], 'sources': [ 'interface/neteq.h', diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index 4a92d21f3..8c7526f96 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -326,7 +326,7 @@ }], ['build_libvpx==1', { 'dependencies': [ - '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx', + '<(libvpx_dir)/libvpx.gyp:libvpx', ], }], ['OS=="android"', { diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8.gyp b/webrtc/modules/video_coding/codecs/vp8/vp8.gyp index 63cc854b2..3401f48b8 100644 --- a/webrtc/modules/video_coding/codecs/vp8/vp8.gyp +++ b/webrtc/modules/video_coding/codecs/vp8/vp8.gyp @@ -22,7 +22,7 @@ 'conditions': [ ['build_libvpx==1', { 'dependencies': [ - '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx', + '<(libvpx_dir)/libvpx.gyp:libvpx', ], }], ], diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9.gyp b/webrtc/modules/video_coding/codecs/vp9/vp9.gyp index c4c93c9e1..795db62a3 100644 --- a/webrtc/modules/video_coding/codecs/vp9/vp9.gyp +++ b/webrtc/modules/video_coding/codecs/vp9/vp9.gyp @@ -22,14 +22,20 @@ 'conditions': [ ['build_libvpx==1', { 'dependencies': [ - '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx', + '<(libvpx_dir)/libvpx.gyp:libvpx', + ], + }], + ['build_vp9==1', { + 'sources': [ + 'include/vp9.h', + 'vp9_impl.cc', + 'vp9_impl.h', + ], + }, { + 'sources': [ + 'vp9_dummy_impl.cc', ], }], - ], - 'sources': [ - 'include/vp9.h', - 'vp9_impl.cc', - 'vp9_impl.h', ], }, ], diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_dummy_impl.cc b/webrtc/modules/video_coding/codecs/vp9/vp9_dummy_impl.cc new file mode 100644 index 000000000..491ccbe79 --- /dev/null +++ b/webrtc/modules/video_coding/codecs/vp9/vp9_dummy_impl.cc @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + * + */ + +// This file contains an implementation of empty webrtc VP9 encoder/decoder +// factories so it is possible to build webrtc without linking with vp9. +#include "webrtc/modules/video_coding/codecs/vp9/vp9_impl.h" + +namespace webrtc { +VP9Encoder* VP9Encoder::Create() { return nullptr; } +VP9Decoder* VP9Decoder::Create() { return nullptr; } +} diff --git a/webrtc/system_wrappers/system_wrappers.gyp b/webrtc/system_wrappers/system_wrappers.gyp index 3af889787..50801de1e 100644 --- a/webrtc/system_wrappers/system_wrappers.gyp +++ b/webrtc/system_wrappers/system_wrappers.gyp @@ -115,6 +115,11 @@ }, { 'sources!': [ 'source/data_log.cc', ], },], + ['rtc_use_direct_trace==1', { + 'defines': [ + 'WEBRTC_DIRECT_TRACE', + ], + }], ['OS=="android"', { 'defines': [ 'WEBRTC_THREAD_RR',