Bug 757637: Rollup media/webrtc/trunk changes from webrtc.org drop r=ted r=derf

This commit is contained in:
Randell Jesup 2012-06-20 07:27:22 -04:00
Родитель ec2abb1282
Коммит 7ce436aea4
17 изменённых файлов: 226 добавлений и 1194 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -262,15 +262,16 @@
'dependencies': [
'../chrome/chrome.gyp:chromedriver',
],
'conditions': [
# If you change this condition, make sure you also change it
# in chrome_tests.gypi
['OS=="mac" or OS=="win" or (os_posix==1 and OS != "android" and target_arch==python_arch)', {
'dependencies': [
'../chrome/chrome.gyp:pyautolib',
],
}],
],
# not needed for Mozilla
# 'conditions': [
# # If you change this condition, make sure you also change it
# # in chrome_tests.gypi
# ['OS=="mac" or OS=="win" or (os_posix==1 and OS != "android" and target_arch==python_arch)', {
# 'dependencies': [
# '../chrome/chrome.gyp:pyautolib',
# ],
# }],
# ],
}, # target_name: chromium_builder_qa
],
'conditions': [

Просмотреть файл

@ -53,7 +53,7 @@
# Compute the architecture that we're building on.
'conditions': [
[ 'OS=="win" or OS=="mac"', {
[ 'OS=="win"', {
'host_arch%': 'ia32',
}, {
# This handles the Unix platforms for which there is some support.
@ -667,9 +667,12 @@
['os_posix==1 and OS!="mac" and OS!="android"', {
# This will set gcc_version to XY if you are running gcc X.Y.*.
# This is used to tweak build flags for gcc 4.4.
'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
# disabled for Mozilla since it doesn't use this, and 'msys' messes $(CXX) up
# 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
# Figure out the python architecture to decide if we build pyauto.
'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
# disabled for mozilla because windows != mac and this runs a shell script
# 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
'conditions': [
['branding=="Chrome"', {
'linux_breakpad%': 1,
@ -1071,6 +1074,11 @@
'cflags_cc!': ['-fno-rtti'],
'cflags_cc+': ['-frtti', '-g'],
}],
['OS=="linux"', {
# we need lrint(), which is ISOC99, and Xcode
# already forces -std=c99 for mac below
'defines': ['_ISOC99_SOURCE=1'],
}],
['remoting==1', {
'defines': ['ENABLE_REMOTING=1'],
}],
@ -1805,6 +1813,10 @@
'ldflags': [
'-m32',
],
'cflags_mozilla': [
'-m32',
'-mmmx',
],
}],
],
}],
@ -2380,7 +2392,7 @@
# Define change_mach_o_flags in a variable ending in _path
# so that GYP understands it's a path and performs proper
# relativization during dict merging.
'change_mach_o_flags_path':
'change_mach_o_flags':
'mac/change_mach_o_flags_from_xcode.sh',
'change_mach_o_flags_options%': [
],
@ -2399,7 +2411,7 @@
},
'postbuild_name': 'Change Mach-O Flags',
'action': [
'<(change_mach_o_flags_path)',
'$(srcdir)$(os_sep)build$(os_sep)<(change_mach_o_flags)',
'>@(change_mach_o_flags_options)',
],
},
@ -2467,10 +2479,10 @@
# Define strip_from_xcode in a variable ending in _path
# so that gyp understands it's a path and performs proper
# relativization during dict merging.
'strip_from_xcode_path': 'mac/strip_from_xcode',
'strip_from_xcode': 'mac/strip_from_xcode',
},
'postbuild_name': 'Strip If Needed',
'action': ['<(strip_from_xcode_path)'],
'action': ['$(srcdir)$(os_sep)build$(os_sep)<(strip_from_xcode)'],
},
], # postbuilds
}], # mac_real_dsym

Просмотреть файл

@ -12,6 +12,31 @@
'peerconnection_sample': 'third_party/libjingle/source/talk/examples/peerconnection',
},
# for mozilla, we want to force stuff to build but we don't want peerconnection_client or server
# for unknown reasons, 'target' must be outside of conditions. And don't try to build a dummy
# executable...
'targets': [
{
'conditions': [
['build_with_mozilla==1', {
'target_name': 'dummy',
'type': 'none',
'actions': [
{
'action_name': 'dummy',
'action': [
'echo ARGHHHHHHHHHHHHHHHHHHHH',
],
'message': 'Generating scream',
}, ],
'dependencies': [
'third_party/libjingle/libjingle.gyp:libjingle_app',
],
}, ],
],
}, ],
'conditions': [
['build_with_mozilla==0', {
'targets': [
{
'target_name': 'peerconnection_server',
@ -28,8 +53,7 @@
'include_dirs': [
'third_party/libjingle/source',
],
},
],
}, ],
'conditions': [
['OS=="win"', {
'targets': [
@ -109,5 +133,6 @@
], # targets
}, ], # OS="linux"
],
}, ],
],
}

Просмотреть файл

@ -67,7 +67,7 @@
}, {
# Settings for the standalone (not-in-Chromium) build.
'include_pulse_audio%': 1,
'include_pulse_audio%': 0,
'include_internal_audio_device%': 1,

Просмотреть файл

@ -0,0 +1,17 @@
import sys
import _winreg
def main():
for version in ["7.1", "7.0"]:
try:
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v%s\WinSDKSamples" % version)
path, typ = _winreg.QueryValueEx(key, "InstallationFolder")
print path.replace("\\", "/")
return 0
except:
pass
print >>sys.stderr, "Could not locate Windows SDK Samples directory via the registry"
return 1
if __name__ == '__main__':
sys.exit(main())

Просмотреть файл

@ -39,5 +39,7 @@
},
],
},
# }],
# ],
],
}

Просмотреть файл

@ -21,11 +21,15 @@
'include',
'<(webrtc_root)',
'<(webrtc_root)/common_video/interface',
# added for mozilla for use_system_libjpeg
'$(DIST)/include',
],
'direct_dependent_settings': {
'include_dirs': [
'include',
'<(webrtc_root)/common_video/interface',
# added for mozilla for use_system_libjpeg
'$(builddir)/../../../../../../dist/include',
],
},
'conditions': [

Просмотреть файл

@ -1621,6 +1621,17 @@ WebRtc_Word32 AudioDeviceLinuxALSA::StartPlayout()
return -1;
}
int errVal = LATE(snd_pcm_prepare)(_handlePlayout);
if (errVal < 0)
{
WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id,
" playout snd_pcm_prepare failed (%s)\n",
LATE(snd_strerror)(errVal));
// just log error
// if snd_pcm_open fails will return -1
}
unsigned int threadID(0);
if (!_ptrThreadPlay->Start(threadID))
{
@ -1635,16 +1646,6 @@ WebRtc_Word32 AudioDeviceLinuxALSA::StartPlayout()
}
_playThreadID = threadID;
int errVal = LATE(snd_pcm_prepare)(_handlePlayout);
if (errVal < 0)
{
WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id,
" playout snd_pcm_prepare failed (%s)\n",
LATE(snd_strerror)(errVal));
// just log error
// if snd_pcm_open fails will return -1
}
return 0;
}
@ -1834,8 +1835,14 @@ WebRtc_Word32 AudioDeviceLinuxALSA::GetDevicesInfo(
int enumCount(0);
bool keepSearching(true);
// From Chromium issue 95797
// Loop through the sound cards to get Alsa device hints.
// Don't use snd_device_name_hint(-1,..) since there is a access violation
// inside this ALSA API with libasound.so.2.0.0.
int card = -1;
while (!(LATE(snd_card_next)(&card)) && (card >= 0) && keepSearching) {
void **hints;
err = LATE(snd_device_name_hint)(-1, // All cards
err = LATE(snd_device_name_hint)(card, // NOT all cards!
"pcm", // Only PCM devices
&hints);
if (err != 0)
@ -1950,6 +1957,7 @@ WebRtc_Word32 AudioDeviceLinuxALSA::GetDevicesInfo(
LATE(snd_strerror)(err));
// Continue and return true anyways, since we did get the whole list.
}
}
if (FUNC_GET_NUM_OF_DEVICE == function)
{

Просмотреть файл

@ -61,6 +61,7 @@
'conditions': [
['os_posix==1 and OS!="mac"', {
'cflags': [ '-msse2', ],
'cflags_mozilla': [ '-msse2', ],
}],
['OS=="mac"', {
'xcode_settings': {

Просмотреть файл

@ -45,7 +45,7 @@ VP8Encoder::VP8Encoder()
rc_max_intra_target_(0),
token_partitions_(VP8_ONE_TOKENPARTITION),
rps_(new ReferencePictureSelection),
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
temporal_layers_(NULL),
#endif
encoder_(NULL),
@ -82,7 +82,7 @@ int VP8Encoder::Release() {
delete raw_;
raw_ = NULL;
}
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_ != NULL) {
delete temporal_layers_;
temporal_layers_ = NULL;
@ -108,7 +108,7 @@ int VP8Encoder::SetRates(uint32_t new_bitrate_kbit, uint32_t new_framerate) {
}
config_->rc_target_bitrate = new_bitrate_kbit; // in kbit/s
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_) {
temporal_layers_->ConfigureBitrates(new_bitrate_kbit, config_);
}
@ -160,7 +160,7 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
codec_ = *inst;
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (inst->codecSpecific.VP8.numberOfTemporalLayers > 1) {
assert(temporal_layers_ == NULL);
temporal_layers_ =
@ -187,7 +187,7 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
config_->g_h = codec_.height;
config_->rc_target_bitrate = inst->startBitrate; // in kbit/s
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_) {
temporal_layers_->ConfigureBitrates(inst->startBitrate, config_);
}
@ -200,7 +200,7 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
switch (inst->codecSpecific.VP8.resilience) {
case kResilienceOff:
config_->g_error_resilient = 0;
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_) {
// Must be on for temporal layers.
config_->g_error_resilient = 1;
@ -342,7 +342,7 @@ int VP8Encoder::Encode(const RawImage& input_image,
&input_image._buffer[codec_.height * codec_.width * 5 >> 2];
int flags = 0;
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_) {
flags |= temporal_layers_->EncodeFlags();
}
@ -420,7 +420,7 @@ void VP8Encoder::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
vp8Info->simulcastIdx = 0;
vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this
vp8Info->nonReference = (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE) != 0;
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
if (temporal_layers_) {
temporal_layers_->PopulateCodecSpecific(
(pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? true : false, vp8Info);
@ -429,7 +429,7 @@ void VP8Encoder::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
vp8Info->temporalIdx = kNoTemporalIdx;
vp8Info->layerSync = false;
vp8Info->tl0PicIdx = kNoTl0PicIdx;
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
}
#endif
picture_id_ = (picture_id_ + 1) & 0x7FFF; // prepare next
@ -664,7 +664,7 @@ int VP8Decoder::Decode(const EncodedImage& input_image,
}
#endif
#if WEBRTC_LIBVPX_VERSION >= 971
#if WEBRTC_LIBVPX_VERSION >= 1000
if (!mfqe_enabled_ && codec_specific_info &&
codec_specific_info->codecSpecific.VP8.temporalIdx > 0) {
// Enable MFQE if we are receiving layers.

Просмотреть файл

@ -29,12 +29,32 @@
'defines': [
'WEBRTC_LIBVPX_VERSION=960' # Bali
],
},{
'conditions': [
['build_with_mozilla==1', {
'dependencies': [
# '<(webrtc_root)/../third_party/libvpx/libvpx.gyp:libvpx_include',
],
'include_dirs': [
'$(DIST)/include',
],
'defines': [
# This must be updated to match mozilla's version of libvpx
'WEBRTC_LIBVPX_VERSION=971',
'WEBRTC_LIBVPX_TEMPORAL_LAYERS=0'
],
'link_settings': {
'libraries': [
'$(LIBVPX_OBJ)/libvpx.a',
],
},
},{
'dependencies': [
'<(webrtc_root)/../third_party/libvpx/libvpx.gyp:libvpx',
],
'defines': [
'WEBRTC_LIBVPX_VERSION=971' # Cayuga
'WEBRTC_LIBVPX_VERSION=971', # Cayuga
'WEBRTC_LIBVPX_TEMPORAL_LAYERS=1'
],
'sources': [
'temporal_layers.h',
@ -42,6 +62,8 @@
],
}],
],
}],
],
'direct_dependent_settings': {
'include_dirs': [
'../interface',

Просмотреть файл

@ -15,6 +15,7 @@
'webrtc_utility',
'<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
'<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
'<(webrtc_root)/common_video/common_video.gyp:webrtc_jpeg',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
'include_dirs': [
@ -73,6 +74,7 @@
'conditions': [
['os_posix==1 and OS!="mac"', {
'cflags': [ '-msse2', ],
'cflags_mozilla': [ '-msse2', ],
}],
['OS=="mac"', {
'xcode_settings': {

Просмотреть файл

@ -4,5 +4,6 @@
{
'variables': {
'build_with_chromium': 0,
'inside_chromium_build': 0,
}
}

Просмотреть файл

@ -15,6 +15,7 @@ supplement_gypi = """#!/usr/bin/env python
{
'variables': {
'build_with_chromium': 0,
'inside_chromium_build': 0,
}
}
"""

Просмотреть файл

@ -214,6 +214,7 @@ MAKEFLAGS=-r
# The source directory tree.
srcdir := %(srcdir)s
abs_srcdir := $(abspath $(srcdir))
os_sep := %(os_sep)s
# The name of the builddir.
builddir_name ?= %(builddir)s
@ -609,6 +610,7 @@ def StringToMakefileVariable(string):
return re.sub('[ {}$]', '_', string)
os_sep = os.sep
srcdir_prefix = ''
def Sourceify(path):
"""Convert a path to its source directory form."""
@ -1968,13 +1970,15 @@ def GenerateOutput(target_list, target_dicts, data, params):
default_configuration = 'Default'
srcdir = '.'
global os_sep
os_sep = os.sep
makefile_name = 'Makefile' + options.suffix
makefile_path = os.path.join(options.toplevel_dir, makefile_name)
if options.generator_output:
global srcdir_prefix
makefile_path = os.path.join(options.generator_output, makefile_path)
srcdir = gyp.common.RelativePath(srcdir, options.generator_output)
srcdir_prefix = '$(srcdir)/'
srcdir_prefix = '$(srcdir)' + os.sep
flock_command= 'flock'
header_params = {
@ -1986,6 +1990,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
'link_commands': LINK_COMMANDS_LINUX,
'extra_commands': '',
'srcdir': srcdir,
'os_sep': os.sep,
}
if flavor == 'mac':
flock_command = './gyp-mac-tool flock'

Просмотреть файл

@ -41,7 +41,7 @@ class MacTool(object):
def ExecFlock(self, lockfile, *cmd_list):
"""Emulates the most basic behavior of Linux's flock(1)."""
# Rely on exception handling to report errors.
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0666)
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)