Bug 830247: rollup of changes to media/webrtc/trunk, and backouts of some temp patches r=ted,derf
authorRandell Jesup <rjesup@jesup.org>
Sat, 09 Feb 2013 23:16:10 -0500
changeset 121458 45dcba9211fa2f1f99e638aab13d97aeb74b2e63
parent 121457 6a273b6bcd01420997bea81d1a0d38d9cb4eda89
child 121459 647d5aa77a3477faff8c24d8b1d1fb5714e1292b
push id24287
push userryanvm@gmail.com
push dateSun, 10 Feb 2013 18:18:55 +0000
treeherderautoland@5835bc763be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, derf
bugs830247
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 830247: rollup of changes to media/webrtc/trunk, and backouts of some temp patches r=ted,derf
configure.in
content/media/webrtc/Makefile.in
dom/media/Makefile.in
layout/media/symbols.def.in
media/webrtc/shared_libs.mk
media/webrtc/signaling/signaling.gyp
media/webrtc/signaling/test/mediaconduit_unittests.cpp
media/webrtc/trunk/peerconnection.gyp
media/webrtc/trunk/supplement/supplement.gypi
media/webrtc/trunk/third_party/libyuv/source/rotate_priv.h
media/webrtc/trunk/tools/gyp/pylib/gyp/system_test.py
media/webrtc/trunk/webrtc/build/arm_neon.gypi
media/webrtc/trunk/webrtc/build/common.gypi
media/webrtc/trunk/webrtc/build/merge_libs.gyp
media/webrtc/trunk/webrtc/common_types.h
media/webrtc/trunk/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c
media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.cc
media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.h
media/webrtc/trunk/webrtc/modules/audio_coding/main/source/audio_coding_module.gypi
media/webrtc/trunk/webrtc/modules/audio_coding/neteq/codec_db.c
media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq_defines.h
media/webrtc/trunk/webrtc/modules/audio_coding/neteq/packet_buffer.c
media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
media/webrtc/trunk/webrtc/modules/modules.gyp
media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
media/webrtc/trunk/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.mm
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseFilter.cpp
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseFilter.h
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseInputPin.cpp
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseInputPin.h
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BasePin.cpp
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BasePin.h
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/DShowTools.h
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/MediaType.cpp
media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/MediaType.h
media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp
media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.h
media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.cpp
media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.h
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.h
media/webrtc/trunk/webrtc/modules/video_capture/windows/DShowTools.h
media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.cpp
media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.h
media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8.gyp
media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
media/webrtc/trunk/webrtc/modules/video_processing/main/source/video_processing.gypi
media/webrtc/trunk/webrtc/system_wrappers/source/trace_impl.cc
media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
media/webrtc/trunk/webrtc/typedefs.h
media/webrtc/trunk/webrtc/video_engine/vie_impl.cc
media/webrtc/trunk/webrtc/voice_engine/include/voe_volume_control.h
media/webrtc/trunk/webrtc/voice_engine/voe_codec_impl.h
media/webrtc/trunk/webrtc/voice_engine/voice_engine_core.gypi
media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
media/webrtc/webrtc-config.mk
media/webrtc/webrtc_config.gypi
media/webrtc/webrtc_update.sh
media/webrtc/webrtc_version.h
--- a/configure.in
+++ b/configure.in
@@ -8996,17 +8996,17 @@ elif test "${OS_TARGET}" = "Android"; th
    fi
 fi
 
 if test -n "$MOZ_WEBRTC"; then
    AC_MSG_RESULT("generating WebRTC Makefiles...")
 
 dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
 dnl so that regeneration via dependencies works correctly
-   WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
+   WEBRTC_CONFIG="-D build_with_mozilla=1 -D build_with_chromium=0 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
 
    GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
 
    $PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
      $GYP_WEBRTC_OPTIONS \
      --generator-output=${_objdir}/media/webrtc/trunk \
      ${srcdir}/media/webrtc/trunk/peerconnection.gyp
    if test "$?" != 0; then
--- a/content/media/webrtc/Makefile.in
+++ b/content/media/webrtc/Makefile.in
@@ -39,13 +39,13 @@ OS_CXXFLAGS += -DNOMINMAX
 endif
 
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_WEBRTC
 LOCAL_INCLUDES += \
-  -I$(topsrcdir)/media/webrtc/trunk/src \
+  -I$(topsrcdir)/media/webrtc/trunk/webrtc \
   -I$(topsrcdir)/media/webrtc/signaling/src/common \
   -I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \
   $(NULL)
 endif
--- a/dom/media/Makefile.in
+++ b/dom/media/Makefile.in
@@ -40,17 +40,17 @@ EXPORTS_mozilla = \
   $(NULL)
 
 CPPSRCS = \
   MediaManager.cpp \
   $(NULL)
 
 ifdef MOZ_WEBRTC
 LOCAL_INCLUDES += \
-  -I$(topsrcdir)/media/webrtc/trunk/src \
+  -I$(topsrcdir)/media/webrtc/trunk/webrtc \
   -I$(topsrcdir)/media/webrtc/signaling/src/common \
   $(NULL)
 DIRS += bridge
 endif
 
 TEST_DIRS += \
   tests/mochitest \
   $(NULL)
--- a/layout/media/symbols.def.in
+++ b/layout/media/symbols.def.in
@@ -38,16 +38,17 @@ vpx_codec_peek_stream_info
 vpx_codec_vp8_dx
 vpx_img_free
 vpx_codec_enc_config_set
 vpx_codec_enc_init_ver
 #ifdef MOZ_VP8_ENCODER
 vpx_codec_vp8_cx
 #endif
 vpx_img_set_rect
+vpx_img_wrap
 vpx_codec_get_cx_data
 vpx_codec_enc_config_default
 vpx_img_alloc
 vpx_codec_encode
 #endif
 #endif
 #ifdef MOZ_VORBIS
 ogg_page_bos
--- a/media/webrtc/shared_libs.mk
+++ b/media/webrtc/shared_libs.mk
@@ -1,69 +1,64 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # shared libs for webrtc
 WEBRTC_LIBS = \
-  $(call EXPAND_LIBNAME_PATH,video_capture_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_capture_module) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_utility,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_utility) \
-  $(call EXPAND_LIBNAME_PATH,audio_coding_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_coding_module) \
-  $(call EXPAND_LIBNAME_PATH,CNG,$(DEPTH)/media/webrtc/trunk/src/modules/modules_CNG) \
-  $(call EXPAND_LIBNAME_PATH,signal_processing,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_signal_processing) \
-  $(call EXPAND_LIBNAME_PATH,G711,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G711) \
-  $(call EXPAND_LIBNAME_PATH,opus,$(DEPTH)/media/webrtc/trunk/src/modules/modules_opus) \
-  $(call EXPAND_LIBNAME_PATH,PCM16B,$(DEPTH)/media/webrtc/trunk/src/modules/modules_PCM16B) \
-  $(call EXPAND_LIBNAME_PATH,NetEq,$(DEPTH)/media/webrtc/trunk/src/modules/modules_NetEq) \
-  $(call EXPAND_LIBNAME_PATH,resampler,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_resampler) \
-  $(call EXPAND_LIBNAME_PATH,vad,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_vad) \
-  $(call EXPAND_LIBNAME_PATH,system_wrappers,$(DEPTH)/media/webrtc/trunk/src/system_wrappers/source/system_wrappers_system_wrappers) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_video_coding,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_video_coding) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_i420,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_i420) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_vp8,$(DEPTH)/media/webrtc/trunk/src/modules/video_coding/codecs/vp8/vp8_webrtc_vp8) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_libyuv,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_libyuv) \
-  $(call EXPAND_LIBNAME_PATH,video_render_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_render_module) \
-  $(call EXPAND_LIBNAME_PATH,video_engine_core,$(DEPTH)/media/webrtc/trunk/src/video_engine/video_engine_video_engine_core) \
-  $(call EXPAND_LIBNAME_PATH,media_file,$(DEPTH)/media/webrtc/trunk/src/modules/modules_media_file) \
-  $(call EXPAND_LIBNAME_PATH,rtp_rtcp,$(DEPTH)/media/webrtc/trunk/src/modules/modules_rtp_rtcp) \
-  $(call EXPAND_LIBNAME_PATH,udp_transport,$(DEPTH)/media/webrtc/trunk/src/modules/modules_udp_transport) \
-  $(call EXPAND_LIBNAME_PATH,bitrate_controller,$(DEPTH)/media/webrtc/trunk/src/modules/modules_bitrate_controller) \
-  $(call EXPAND_LIBNAME_PATH,remote_bitrate_estimator,$(DEPTH)/media/webrtc/trunk/src/modules/modules_remote_bitrate_estimator) \
-  $(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing) \
-  $(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/src/voice_engine/voice_engine_voice_engine_core) \
-  $(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_conference_mixer) \
-  $(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_device) \
-  $(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_processing) \
-  $(call EXPAND_LIBNAME_PATH,aec,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec) \
-  $(call EXPAND_LIBNAME_PATH,apm_util,$(DEPTH)/media/webrtc/trunk/src/modules/modules_apm_util) \
-  $(call EXPAND_LIBNAME_PATH,aecm,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm) \
-  $(call EXPAND_LIBNAME_PATH,agc,$(DEPTH)/media/webrtc/trunk/src/modules/modules_agc) \
-  $(call EXPAND_LIBNAME_PATH,ns,$(DEPTH)/media/webrtc/trunk/src/modules/modules_ns) \
+  $(call EXPAND_LIBNAME_PATH,common_video,$(DEPTH)/media/webrtc/trunk/webrtc/common_video/common_video_common_video) \
+  $(call EXPAND_LIBNAME_PATH,video_capture_module,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_capture_module) \
+  $(call EXPAND_LIBNAME_PATH,webrtc_utility,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_webrtc_utility) \
+  $(call EXPAND_LIBNAME_PATH,audio_coding_module,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_coding_module) \
+  $(call EXPAND_LIBNAME_PATH,CNG,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_CNG) \
+  $(call EXPAND_LIBNAME_PATH,signal_processing,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_signal_processing) \
+  $(call EXPAND_LIBNAME_PATH,G711,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_G711) \
+  $(call EXPAND_LIBNAME_PATH,PCM16B,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_PCM16B) \
+  $(call EXPAND_LIBNAME_PATH,NetEq,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_NetEq) \
+  $(call EXPAND_LIBNAME_PATH,resampler,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_resampler) \
+  $(call EXPAND_LIBNAME_PATH,vad,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_vad) \
+  $(call EXPAND_LIBNAME_PATH,system_wrappers,$(DEPTH)/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers_system_wrappers) \
+  $(call EXPAND_LIBNAME_PATH,webrtc_video_coding,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_webrtc_video_coding) \
+  $(call EXPAND_LIBNAME_PATH,webrtc_i420,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_webrtc_i420) \
+  $(call EXPAND_LIBNAME_PATH,webrtc_vp8,$(DEPTH)/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_webrtc_vp8) \
+  $(call EXPAND_LIBNAME_PATH,webrtc_opus,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_webrtc_opus) \
+  $(call EXPAND_LIBNAME_PATH,video_render_module,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_render_module) \
+  $(call EXPAND_LIBNAME_PATH,video_engine_core,$(DEPTH)/media/webrtc/trunk/webrtc/video_engine/video_engine_video_engine_core) \
+  $(call EXPAND_LIBNAME_PATH,media_file,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_media_file) \
+  $(call EXPAND_LIBNAME_PATH,rtp_rtcp,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_rtp_rtcp) \
+  $(call EXPAND_LIBNAME_PATH,udp_transport,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_udp_transport) \
+  $(call EXPAND_LIBNAME_PATH,bitrate_controller,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_bitrate_controller) \
+  $(call EXPAND_LIBNAME_PATH,remote_bitrate_estimator,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_remote_bitrate_estimator) \
+  $(call EXPAND_LIBNAME_PATH,paced_sender,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_paced_sender) \
+  $(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_processing) \
+  $(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/webrtc/voice_engine/voice_engine_voice_engine_core) \
+  $(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_conference_mixer) \
+  $(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_device) \
+  $(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing) \
   $(call EXPAND_LIBNAME_PATH,yuv,$(DEPTH)/media/webrtc/trunk/third_party/libyuv/libyuv_libyuv) \
-  $(call EXPAND_LIBNAME_PATH,webrtc_jpeg,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_jpeg) \
   $(call EXPAND_LIBNAME_PATH,nicer,$(DEPTH)/media/mtransport/third_party/nICEr/nicer_nicer) \
   $(call EXPAND_LIBNAME_PATH,nrappkit,$(DEPTH)/media/mtransport/third_party/nrappkit/nrappkit_nrappkit) \
   $(NULL)
 
 # if we're on an intel arch, we want SSE2 optimizations
 ifneq (,$(INTEL_ARCHITECTURE))
 WEBRTC_LIBS += \
-  $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
-  $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
+  $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_processing_sse2) \
+  $(call EXPAND_LIBNAME_PATH,audio_processing_sse2,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing_sse2) \
   $(NULL)
 endif
 
 # neon for ARM
 ifeq ($(HAVE_ARM_NEON),1)
 WEBRTC_LIBS += \
-  $(call EXPAND_LIBNAME_PATH,aecm_neon,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm_neon) \
+  $(call EXPAND_LIBNAME_PATH,aecm_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_aecm_neon) \
   $(NULL)
 endif
 
 
 # If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the
 # relevant library from this list:
 #
-#  $(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G722) \
-#  $(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iLBC) \
-#  $(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSAC) \
-#  $(call EXPAND_LIBNAME_PATH,iSACFix,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSACFix) \
+#  $(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_G722) \
+#  $(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_iLBC) \
+#  $(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_iSAC) \
+#  $(call EXPAND_LIBNAME_PATH,iSACFix,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_iSACFix) \
 #
--- a/media/webrtc/signaling/signaling.gyp
+++ b/media/webrtc/signaling/signaling.gyp
@@ -40,21 +40,21 @@
         './src/sipcc/include',
         './src/sipcc/cpr/include',
         '../../../ipc/chromium/src',
         '../../../ipc/chromium/src/base/third_party/nspr',
         '../../../xpcom/base',
         '$(DEPTH)/dist/include',
         '../../../dom/base',
         '../../../media/mtransport',
-        '../trunk/src',
-        '../trunk/src/video_engine/include',
-        '../trunk/src/voice_engine/include',
-        '../trunk/src/modules/interface',
-        '../trunk/src/peerconnection',
+        '../trunk/webrtc',
+        '../trunk/webrtc/video_engine/include',
+        '../trunk/webrtc/voice_engine/include',
+        '../trunk/webrtc/modules/interface',
+        '../trunk/webrtc/peerconnection',
         '../../../netwerk/srtp/src/include',
         '../../../netwerk/srtp/src/crypto/include',
         '../../../ipc/chromium/src',
       ],
 
       #
       # DEPENDENCIES
       #
--- a/media/webrtc/signaling/test/mediaconduit_unittests.cpp
+++ b/media/webrtc/signaling/test/mediaconduit_unittests.cpp
@@ -506,17 +506,17 @@ class TransportConduitTest : public ::te
     // attach the transport to audio-conduit
     err = mAudioSession->AttachTransport(mAudioTransport);
     ASSERT_EQ(mozilla::kMediaConduitNoError, err);
     err = mAudioSession2->AttachTransport(mAudioTransport);
     ASSERT_EQ(mozilla::kMediaConduitNoError, err);
 
     //configure send and recv codecs on the audio-conduit
     //mozilla::AudioCodecConfig cinst1(124,"PCMU",8000,80,1,64000);
-    mozilla::AudioCodecConfig cinst1(124,"opus",48000,480,1,64000);
+    mozilla::AudioCodecConfig cinst1(124,"opus",48000,960,1,64000);
     mozilla::AudioCodecConfig cinst2(125,"L16",16000,320,1,256000);
 
 
     std::vector<mozilla::AudioCodecConfig*> rcvCodecList;
     rcvCodecList.push_back(&cinst1);
     rcvCodecList.push_back(&cinst2);
 
     err = mAudioSession->ConfigureSendMediaCodec(&cinst1);
--- a/media/webrtc/trunk/peerconnection.gyp
+++ b/media/webrtc/trunk/peerconnection.gyp
@@ -2,17 +2,17 @@
 #
 # 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.
 
 {
-  'includes': [ 'src/build/common.gypi', ],
+  'includes': [ 'webrtc/build/common.gypi', ],
   'variables': {
     '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, 'targets' must be outside of conditions.  And don't try to build a dummy
   # executable...
   'targets': [
@@ -28,26 +28,22 @@
 	     'echo ARGHHHHHHHHHHHHHHHHHHHH',
           ],
 	  'inputs': [
 	     'dummy_file.txt',
           ],
           'message': 'Generating scream',
         }, ],
         'dependencies': [
-#	  'third_party/libjingle/libjingle.gyp:libjingle',
-	
-## allow building without libjingle
-##	  'third_party/libjingle/libjingle.gyp:libjingle_app',
-          'src/modules/modules.gyp:audio_device',
-          'src/modules/modules.gyp:video_capture_module',
-#          'src/modules/modules.gyp:video_render_module',
-#          'src/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-          'src/video_engine/video_engine.gyp:video_engine_core',
-          'src/voice_engine/voice_engine.gyp:voice_engine_core',
+          'webrtc/modules/modules.gyp:audio_device',
+          'webrtc/modules/modules.gyp:video_capture_module',
+#          'webrtc/modules/modules.gyp:video_render_module',
+#          'webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+          'webrtc/video_engine/video_engine.gyp:video_engine_core',
+          'webrtc/voice_engine/voice_engine.gyp:voice_engine_core',
           '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
         ],
       }, ],
     ],
   }, ],
   'conditions': [
     ['build_with_mozilla==0', {
     'targets': [
@@ -93,17 +89,17 @@
             },
           },
           'dependencies': [
             'third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
             'third_party/libjingle/libjingle.gyp:libjingle_peerconnection',
           ],
           'include_dirs': [
             'src',
-            'src/modules/interface',
+            'webrtc/modules/interface',
             'third_party/libjingle/source',
           ],
         },
       ],  # targets
     }, ],  # OS="win"
     ['OS=="linux"', {
       'targets': [
         {
--- a/media/webrtc/trunk/supplement/supplement.gypi
+++ b/media/webrtc/trunk/supplement/supplement.gypi
@@ -1,12 +1,30 @@
 # This file will be picked up by gyp to initialize some global settings.
 {
   'variables': {
-    'build_with_chromium': 0,
-    'enable_protobuf': 0,
-    'enabled_libjingle_device_manager': 1,
-    'include_internal_audio_device': 1,
-    'include_internal_video_capture': 1,
-    'include_internal_video_render': 0,
-    'include_pulse_audio': 0,
-  }
+# make sure we can override this with --include
+    'build_with_chromium%': 1,
+    'clang_use_chrome_plugins%': 0,
+    'enable_protobuf%': 1,
+    'enabled_libjingle_device_manager%': 1,
+    'include_internal_audio_device%': 1,
+    'include_internal_video_capture%': 1,
+    'include_internal_video_render%': 1,
+    'include_pulse_audio%': 1,
+    'use_openssl%': 1,
+  },
+  'target_defaults': {
+    'conditions': [
+      ['OS=="linux" and clang==1', {
+        'cflags': [
+          # Suppress the warning caused by
+          # LateBindingSymbolTable::TableInfo from
+          # latebindingsymboltable.cc.def.
+          '-Wno-address-of-array-temporary',
+        ],
+        'cflags_mozilla': [
+          '-Wno-address-of-array-temporary',
+        ],
+      }],
+    ],
+  }, # target_defaults
 }
deleted file mode 100644
--- a/media/webrtc/trunk/third_party/libyuv/source/rotate_priv.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Copyright 2011 The LibYuv 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.
- */
-
-#ifndef SOURCE_ROTATE_PRIV_H_
-#define SOURCE_ROTATE_PRIV_H_
-
-#include "libyuv/basic_types.h"
-
-#ifdef __cplusplus
-namespace libyuv {
-extern "C" {
-#endif
-
-// Rotate planes by 90, 180, 270
-void RotatePlane90(const uint8* src, int src_stride,
-                   uint8* dst, int dst_stride,
-                   int width, int height);
-
-void RotatePlane180(const uint8* src, int src_stride,
-                    uint8* dst, int dst_stride,
-                    int width, int height);
-
-void RotatePlane270(const uint8* src, int src_stride,
-                    uint8* dst, int dst_stride,
-                    int width, int height);
-
-void RotateUV90(const uint8* src, int src_stride,
-                uint8* dst_a, int dst_stride_a,
-                uint8* dst_b, int dst_stride_b,
-                int width, int height);
-
-// Rotations for when U and V are interleaved.
-// These functions take one input pointer and
-// split the data into two buffers while
-// rotating them.
-void RotateUV180(const uint8* src, int src_stride,
-                 uint8* dst_a, int dst_stride_a,
-                 uint8* dst_b, int dst_stride_b,
-                 int width, int height);
-
-void RotateUV270(const uint8* src, int src_stride,
-                 uint8* dst_a, int dst_stride_a,
-                 uint8* dst_b, int dst_stride_b,
-                 int width, int height);
-
-// The 90 and 270 functions are based on transposes.
-// Doing a transpose with reversing the read/write
-// order will result in a rotation by +- 90 degrees.
-void TransposePlane(const uint8* src, int src_stride,
-                    uint8* dst, int dst_stride,
-                    int width, int height);
-
-void TransposeUV(const uint8* src, int src_stride,
-                 uint8* dst_a, int dst_stride_a,
-                 uint8* dst_b, int dst_stride_b,
-                 int width, int height);
-
-#ifdef __cplusplus
-}  // extern "C"
-}  // namespace libyuv
-#endif
-
-#endif  // SOURCE_ROTATE_PRIV_H_
deleted file mode 100755
--- a/media/webrtc/trunk/tools/gyp/pylib/gyp/system_test.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import tempfile
-import shutil
-import subprocess
-
-
-def TestCommands(commands, files={}, env={}):
-  """Run commands in a temporary directory, returning true if they all succeed.
-  Return false on failures or if any commands produce output.
-
-  Arguments:
-    commands: an array of shell-interpretable commands, e.g. ['ls -l', 'pwd']
-              each will be expanded with Python %-expansion using env first.
-    files: a dictionary mapping filename to contents;
-           files will be created in the temporary directory before running
-           the command.
-    env: a dictionary of strings to expand commands with.
-  """
-  tempdir = tempfile.mkdtemp()
-  try:
-    for name, contents in files.items():
-      f = open(os.path.join(tempdir, name), 'wb')
-      f.write(contents)
-      f.close()
-    for command in commands:
-      proc = subprocess.Popen(command % env, shell=True,
-                              stdout=subprocess.PIPE,
-                              stderr=subprocess.STDOUT,
-                              cwd=tempdir)
-      output = proc.communicate()[0]
-      if proc.returncode != 0 or output:
-        return False
-    return True
-  finally:
-    shutil.rmtree(tempdir)
-  return False
-
-
-def TestArSupportsT(ar_command='ar', cc_command='cc'):
-  """Test whether 'ar' supports the 'T' flag."""
-  return TestCommands(['%(cc)s -c test.c',
-                       '%(ar)s crsT test.a test.o',
-                       '%(cc)s test.a'],
-                      files={'test.c': 'int main(){}'},
-                      env={'ar': ar_command, 'cc': cc_command})
-
-
-def main():
-  # Run the various test functions and print the results.
-  def RunTest(description, function, **kwargs):
-    print "Testing " + description + ':',
-    if function(**kwargs):
-      print 'ok'
-    else:
-      print 'fail'
-  RunTest("ar 'T' flag", TestArSupportsT)
-  RunTest("ar 'T' flag with ccache", TestArSupportsT, cc_command='ccache cc')
-  return 0
-
-
-if __name__ == '__main__':
-  sys.exit(main())
--- a/media/webrtc/trunk/webrtc/build/arm_neon.gypi
+++ b/media/webrtc/trunk/webrtc/build/arm_neon.gypi
@@ -18,13 +18,20 @@
 #   ],
 #   'includes': ['path/to/this/gypi/file'],
 # }
 
 {
   'cflags!': [
     '-mfpu=vfpv3-d16',
   ],
+  'cflags_mozilla!': [
+    '-mfpu=vfpv3-d16',
+  ],
   'cflags': [
     '-mfpu=neon',
     '-flax-vector-conversions',
   ],
+  'cflags_mozilla': [
+    '-mfpu=neon',
+    '-flax-vector-conversions',
+  ],
 }
--- a/media/webrtc/trunk/webrtc/build/common.gypi
+++ b/media/webrtc/trunk/webrtc/build/common.gypi
@@ -27,22 +27,33 @@
             'webrtc_root%': '<(DEPTH)/webrtc',
           }],
         ],
       },
       'build_with_chromium%': '<(build_with_chromium)',
       'webrtc_root%': '<(webrtc_root)',
 
       'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
+      'include_g711%': 1,
+      'include_g722%': 1,
+      'include_ilbc%': 1,
       'include_opus%': 1,
+      'include_isac%': 1,
+      'include_pcm16b%': 1,
     },
     'build_with_chromium%': '<(build_with_chromium)',
     'webrtc_root%': '<(webrtc_root)',
     'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
+
+    'include_g711%': '<(include_g711)',
+    'include_g722%': '<(include_g722)',
+    'include_ilbc%': '<(include_ilbc)',
     'include_opus%': '<(include_opus)',
+    'include_isac%': '<(include_isac)',
+    'include_pcm16b%': '<(include_pcm16b)',
 
     # The Chromium common.gypi we use treats all gyp files without
     # chromium_code==1 as third party code. This disables many of the
     # preferred warning settings.
     #
     # We can set this here to have WebRTC code treated as Chromium code. Our
     # third party code will still have the reduced warning settings.
     'chromium_code': 1,
@@ -130,17 +141,17 @@
     'include_dirs': [
       # TODO(andrew): Remove '..' when we've added webrtc/ to include paths.
       '..',
       '../..',
     ],
     'defines': [
       # TODO(leozwang): Run this as a gclient hook rather than at build-time:
       # http://code.google.com/p/webrtc/issues/detail?id=687
-      'WEBRTC_SVNREVISION="Unavailable(issue687)"',
+      'WEBRTC_SVNREVISION="\\\"Unavailable(issue687)\\\""',
       #'WEBRTC_SVNREVISION="<!(python <(webrtc_root)/build/version.py)"',
     ],
     'conditions': [
       ['enable_tracing==1', {
         'defines': ['WEBRTC_LOGGING',],
       }],
       ['build_with_mozilla==1', {
         'defines': [
@@ -171,16 +182,22 @@
         ],
       }],
       ['build_with_mozilla==1', {
         'defines': [
           # Changes settings for Mozilla build.
           'WEBRTC_MOZILLA_BUILD',
         ],
       }],
+      ['build_with_mozilla==1', {
+        'defines': [
+          # Changes settings for Mozilla build.
+          'WEBRTC_MOZILLA_BUILD',
+        ],
+      }],
       ['target_arch=="arm"', {
         'defines': [
           'WEBRTC_ARCH_ARM',
         ],
         'conditions': [
           ['armv7==1', {
             'defines': ['WEBRTC_ARCH_ARM_V7',],
             'conditions': [
@@ -215,16 +232,17 @@
           'WEBRTC_MAC',
           'WEBRTC_THREAD_RR',
           'WEBRTC_CLOCK_TYPE_REALTIME',
         ],
       }],
       ['OS=="win"', {
         'defines': [
           'WEBRTC_WIN',
+	  'WEBRTC_EXPORT',
         ],
         # TODO(andrew): enable all warnings when possible.
         # 4389: Signed/unsigned mismatch.
         # 4373: MSVC legacy warning for ignoring const / volatile in
         # signatures. TODO(phoglund): get rid of 4373 supression when
         # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
         'msvs_disabled_warnings': [4389, 4373],
 
--- a/media/webrtc/trunk/webrtc/build/merge_libs.gyp
+++ b/media/webrtc/trunk/webrtc/build/merge_libs.gyp
@@ -39,10 +39,12 @@
           'outputs': ['<(output_lib)'],
           'action': ['python',
                      'merge_libs.py',
                      '<(PRODUCT_DIR)',
                      '<(output_lib)',],
         },
       ],
     },
+#      }],
+#    ],
   ],
 }
--- a/media/webrtc/trunk/webrtc/common_types.h
+++ b/media/webrtc/trunk/webrtc/common_types.h
@@ -352,17 +352,17 @@ enum TelephoneEventDetectionMethods
 enum NsModes    // type of Noise Suppression
 {
     kNsUnchanged = 0,   // previously set mode
     kNsDefault,         // platform default
     kNsConference,      // conferencing default
     kNsLowSuppression,  // lowest suppression
     kNsModerateSuppression,
     kNsHighSuppression,
-    kNsVeryHighSuppression,     // highest suppression
+    kNsVeryHighSuppression     // highest suppression
 };
 
 enum AgcModes                  // type of Automatic Gain Control
 {
     kAgcUnchanged = 0,        // previously set mode
     kAgcDefault,              // platform default
     // adaptive mode for use when analog volume control exists (e.g. for
     // PC softphone)
@@ -377,17 +377,17 @@ enum AgcModes                  // type o
 
 // EC modes
 enum EcModes                   // type of Echo Control
 {
     kEcUnchanged = 0,          // previously set mode
     kEcDefault,                // platform default
     kEcConference,             // conferencing default (aggressive AEC)
     kEcAec,                    // Acoustic Echo Cancellation
-    kEcAecm,                   // AEC mobile
+    kEcAecm                    // AEC mobile
 };
 
 // AECM modes
 enum AecmModes                 // mode of AECM
 {
     kAecmQuietEarpieceOrHeadset = 0,
                                // Quiet earpiece or headset use
     kAecmEarpiece,             // most earpiece use
@@ -429,43 +429,43 @@ enum NetEqModes             // NetEQ pla
     // Improved jitter robustness at the cost of increased delay. Can be
     // used in one-way communication.
     kNetEqStreaming = 1,
     // Optimzed for decodability of fax signals rather than for perceived audio
     // quality.
     kNetEqFax = 2,
     // Minimal buffer management. Inserts zeros for lost packets and during
     // buffer increases.
-    kNetEqOff = 3,
+    kNetEqOff = 3
 };
 
 enum NetEqBgnModes          // NetEQ Background Noise (BGN) configurations
 {
     // BGN is always on and will be generated when the incoming RTP stream
     // stops (default).
     kBgnOn = 0,
     // The BGN is faded to zero (complete silence) after a few seconds.
     kBgnFade = 1,
     // BGN is not used at all. Silence is produced after speech extrapolation
     // has faded.
-    kBgnOff = 2,
+    kBgnOff = 2
 };
 
 enum OnHoldModes            // On Hold direction
 {
     kHoldSendAndPlay = 0,    // Put both sending and playing in on-hold state.
     kHoldSendOnly,           // Put only sending in on-hold state.
     kHoldPlayOnly            // Put only playing in on-hold state.
 };
 
 enum AmrMode
 {
     kRfc3267BwEfficient = 0,
     kRfc3267OctetAligned = 1,
-    kRfc3267FileStorage = 2,
+    kRfc3267FileStorage = 2
 };
 
 // ==================================================================
 // Video specific types
 // ==================================================================
 
 // Raw video types
 enum RawVideoType
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c
@@ -10,32 +10,28 @@
 
 
 #include "pcm16b.h"
 
 #include <stdlib.h>
 
 #include "typedefs.h"
 
-#ifdef WEBRTC_BIG_ENDIAN
-#include "signal_processing_library.h"
-#endif
-
 #define HIGHEND 0xFF00
 #define LOWEND    0xFF
 
 
 
 /* Encoder with WebRtc_Word16 Output */
 WebRtc_Word16 WebRtcPcm16b_EncodeW16(WebRtc_Word16 *speechIn16b,
                                      WebRtc_Word16 len,
                                      WebRtc_Word16 *speechOut16b)
 {
 #ifdef WEBRTC_BIG_ENDIAN
-    WEBRTC_SPL_MEMCPY_W16(speechOut16b, speechIn16b, len);
+    memcpy(speechOut16b, speechIn16b, len * sizeof(WebRtc_Word16));
 #else
     int i;
     for (i=0;i<len;i++) {
         speechOut16b[i]=(((WebRtc_UWord16)speechIn16b[i])>>8)|((((WebRtc_UWord16)speechIn16b[i])<<8)&0xFF00);
     }
 #endif
     return(len<<1);
 }
@@ -64,17 +60,17 @@ WebRtc_Word16 WebRtcPcm16b_Encode(WebRtc
 /* Decoder with WebRtc_Word16 Input instead of char when the WebRtc_Word16 Encoder is used */
 WebRtc_Word16 WebRtcPcm16b_DecodeW16(void *inst,
                                      WebRtc_Word16 *speechIn16b,
                                      WebRtc_Word16 len,
                                      WebRtc_Word16 *speechOut16b,
                                      WebRtc_Word16* speechType)
 {
 #ifdef WEBRTC_BIG_ENDIAN
-    WEBRTC_SPL_MEMCPY_W8(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1));
+    memcpy(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1));
 #else
     int i;
     int samples=len>>1;
 
     for (i=0;i<samples;i++) {
         speechOut16b[i]=(((WebRtc_UWord16)speechIn16b[i])>>8)|(((WebRtc_UWord16)(speechIn16b[i]&0xFF))<<8);
     }
 #endif
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.cc
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.cc
@@ -85,20 +85,16 @@
 #ifdef WEBRTC_CODEC_GSMFR
 #include "gsmfr_interface.h"
 #include "webrtc/modules/audio_coding/main/source/acm_gsmfr.h"
 #endif
 #ifdef WEBRTC_CODEC_OPUS
 #include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
 #include "webrtc/modules/audio_coding/main/source/acm_opus.h"
 #endif
-#ifdef WEBRTC_CODEC_OPUS
-    #include "acm_opus.h"
-    #include "opus_interface.h"
-#endif
 #ifdef WEBRTC_CODEC_SPEEX
 #include "speex_interface.h"
 #include "webrtc/modules/audio_coding/main/source/acm_speex.h"
 #endif
 #ifdef WEBRTC_CODEC_AVT
 #include "webrtc/modules/audio_coding/main/source/acm_dtmf_playout.h"
 #endif
 #ifdef WEBRTC_CODEC_RED
@@ -287,21 +283,16 @@ const ACMCodecDB::CodecSettings ACMCodec
     {3, {160, 320, 480}, 160, 1},
 #endif
 #ifdef WEBRTC_CODEC_OPUS
     // Opus supports frames shorter than 10ms,
     // but it doesn't help us to use them.
     // Mono and stereo.
     {1, {960}, 0, 2},
 #endif
-#ifdef WEBRTC_CODEC_OPUS
-  // Opus supports frames shorter than 10ms,
-  // but it doesn't help us to use them.
-  {1, {640}, 0, 2},
-#endif
 #ifdef WEBRTC_CODEC_SPEEX
     {3, {160, 320, 480}, 0, 1},
     {3, {320, 640, 960}, 0, 1},
 #endif
     // Comfort noise for three different sampling frequencies.
     {1, {240}, 240, 1},
     {1, {480}, 480, 1},
     {1, {960}, 960, 1},
@@ -381,19 +372,16 @@ const WebRtcNetEQDecoder ACMCodecDB::net
 #endif
 #ifdef WEBRTC_CODEC_GSMFR
     kDecoderGSMFR,
 #endif
 #ifdef WEBRTC_CODEC_OPUS
     // Mono and stereo.
     kDecoderOpus,
 #endif
-#ifdef WEBRTC_CODEC_OPUS
-  kDecoderOpus,
-#endif
 #ifdef WEBRTC_CODEC_SPEEX
     kDecoderSPEEX_8,
     kDecoderSPEEX_16,
 #endif
     // Comfort noise for three different sampling frequencies.
     kDecoderCNG,
     kDecoderCNG,
     kDecoderCNG,
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/acm_codec_database.h
@@ -168,19 +168,16 @@ class ACMCodecDB {
   enum {kG729 = -1};
 #endif
 #ifndef WEBRTC_CODEC_G729_1
   enum {kG729_1 = -1};
 #endif
 #ifndef WEBRTC_CODEC_GSMFR
   enum {kGSMFR = -1};
 #endif
-#ifndef WEBRTC_CODEC_OPUS
-  enum {kOpus = -1};
-#endif
 #ifndef WEBRTC_CODEC_SPEEX
   enum {kSPEEX8 = -1};
   enum {kSPEEX16 = -1};
 #endif
 #ifndef WEBRTC_CODEC_OPUS
   // Mono and stereo
   enum {kOpus = -1};
 #endif
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/audio_coding_module.gypi
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/main/source/audio_coding_module.gypi
@@ -5,34 +5,78 @@
 # 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.
 
 {
   'variables': {
     'audio_coding_dependencies': [
       'CNG',
-      'G711',
-      'G722',
-      'iLBC',
-      'iSAC',
-      'iSACFix',
-      'opus',
-      'PCM16B',
       'NetEq',
       '<(webrtc_root)/common_audio/common_audio.gyp:resampler',
       '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
       '<(webrtc_root)/common_audio/common_audio.gyp:vad',
       '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
     ],
     'audio_coding_defines': [],
     'conditions': [
       ['include_opus==1', {
         'audio_coding_dependencies': ['webrtc_opus',],
         'audio_coding_defines': ['WEBRTC_CODEC_OPUS',],
+        'audio_coding_sources': [
+          'acm_opus.cc',
+          'acm_opus.h',
+        ],
+      }],
+      ['include_g711==1', {
+        'audio_coding_dependencies': ['G711',],
+        'audio_coding_defines': ['WEBRTC_CODEC_G711',],
+        'audio_coding_sources': [
+          'acm_pcma.cc',
+          'acm_pcma.h',
+          'acm_pcmu.cc',
+          'acm_pcmu.h',
+        ],
+      }],
+      ['include_g722==1', {
+        'audio_coding_dependencies': ['G722',],
+        'audio_coding_defines': ['WEBRTC_CODEC_G722',],
+        'audio_coding_sources': [
+          'acm_g722.cc',
+          'acm_g722.h',
+          'acm_g7221.cc',
+          'acm_g7221.h',
+          'acm_g7221c.cc',
+          'acm_g7221c.h',
+        ],
+      }],
+      ['include_ilbc==1', {
+        'audio_coding_dependencies': ['iLBC',],
+        'audio_coding_defines': ['WEBRTC_CODEC_ILBC',],
+        'audio_coding_sources': [
+          'acm_ilbc.cc',
+          'acm_ilbc.h',
+        ],
+      }],
+      ['include_isac==1', {
+        'audio_coding_dependencies': ['iSAC', 'iSACFix',],
+        'audio_coding_defines': ['WEBRTC_CODEC_ISAC', 'WEBRTC_CODEC_ISACFX',],
+        'audio_coding_sources': [
+          'acm_isac.cc',
+          'acm_isac.h',
+          'acm_isac_macros.h',
+        ],
+      }],
+      ['include_pcm16b==1', {
+        'audio_coding_dependencies': ['PCM16B',],
+        'audio_coding_defines': ['WEBRTC_CODEC_PCM16',],
+        'audio_coding_sources': [
+          'acm_pcm16b.cc',
+          'acm_pcm16b.h',
+        ],
       }],
     ],
   },
   'targets': [
     {
       'target_name': 'audio_coding_module',
       'type': '<(library)',
       'defines': [
@@ -48,57 +92,34 @@
       ],
       'direct_dependent_settings': {
         'include_dirs': [
           '../interface',
           '../../../interface',
         ],
       },
       'sources': [
+#        '<@(audio_coding_sources)',
         '../interface/audio_coding_module.h',
         '../interface/audio_coding_module_typedefs.h',
-        'acm_amr.cc',
-        'acm_amr.h',
-        'acm_amrwb.cc',
-        'acm_amrwb.h',
-        'acm_celt.cc',
-        'acm_celt.h',
         'acm_cng.cc',
         'acm_cng.h',
         'acm_codec_database.cc',
         'acm_codec_database.h',
         'acm_dtmf_detection.cc',
         'acm_dtmf_detection.h',
         'acm_dtmf_playout.cc',
         'acm_dtmf_playout.h',
-        'acm_g722.cc',
-        'acm_g722.h',
-        'acm_g7221.cc',
-        'acm_g7221.h',
-        'acm_g7221c.cc',
-        'acm_g7221c.h',
-        'acm_g729.cc',
-        'acm_g729.h',
-        'acm_g7291.cc',
-        'acm_g7291.h',
         'acm_generic_codec.cc',
         'acm_generic_codec.h',
-        'acm_gsmfr.cc',
-        'acm_gsmfr.h',
-        'acm_ilbc.cc',
-        'acm_ilbc.h',
-        'acm_isac.cc',
-        'acm_isac.h',
-        'acm_isac_macros.h',
         'acm_neteq.cc',
         'acm_neteq.h',
+# cheat until I get audio_coding_sources to work
         'acm_opus.cc',
         'acm_opus.h',
-        'acm_speex.cc',
-        'acm_speex.h',
         'acm_pcm16b.cc',
         'acm_pcm16b.h',
         'acm_pcma.cc',
         'acm_pcma.h',
         'acm_pcmu.cc',
         'acm_pcmu.h',
         'acm_red.cc',
         'acm_red.h',
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/codec_db.c
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/codec_db.c
@@ -487,19 +487,16 @@ int WebRtcNetEQ_DbGetSplitInfo(SplitInfo
         case kDecoderG726_24:
         case kDecoderG726_32:
         case kDecoderG726_40:
 #endif
 #ifdef NETEQ_SPEEX_CODEC
         case kDecoderSPEEX_8:
         case kDecoderSPEEX_16:
 #endif
-#ifdef NETEQ_OPUS_CODEC
-        case kDecoderOpus :
-#endif
 #ifdef NETEQ_CELT_CODEC
         case kDecoderCELT_32 :
         case kDecoderCELT_32_2ch :
 #endif
 #ifdef NETEQ_G729_1_CODEC
         case kDecoderG729_1:
 #endif
         {
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq_defines.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq_defines.h
@@ -64,16 +64,18 @@
  * NETEQ_ISAC_CODEC               Enable iSAC
  *
  * NETEQ_ISAC_SWB_CODEC           Enable iSAC-SWB
  *
  * Note that the decoder of iSAC full-band operates at 32 kHz, that is the
  * decoded signal is at 32 kHz.
  * NETEQ_ISAC_FB_CODEC            Enable iSAC-FB
  *
+ * NETEQ_OPUS_CODEC               Enable Opus
+ *
  * NETEQ_G722_CODEC               Enable G.722
  *
  * NETEQ_G729_CODEC               Enable G.729
  *
  * NETEQ_G729_1_CODEC             Enable G.729.1
  *
  * NETEQ_G726_CODEC               Enable G.726
  *
@@ -323,35 +325,42 @@
     #define NETEQ_RED_CODEC
     #define NETEQ_VAD
     #define NETEQ_ARBITRARY_CODEC
 
     /* Narrowband codecs */
     #define NETEQ_PCM16B_CODEC
     #define NETEQ_G711_CODEC
     #define NETEQ_ILBC_CODEC
+    #define NETEQ_OPUS_CODEC
     #define NETEQ_G729_CODEC
     #define NETEQ_G726_CODEC
     #define NETEQ_GSMFR_CODEC
     #define NETEQ_AMR_CODEC
 
     /* Wideband codecs */
     #define NETEQ_WIDEBAND
     #define NETEQ_ISAC_CODEC
+    #define NETEQ_OPUS_CODEC
     #define NETEQ_G722_CODEC
     #define NETEQ_G722_1_CODEC
     #define NETEQ_G729_1_CODEC
     #define NETEQ_SPEEX_CODEC
     #define NETEQ_AMRWB_CODEC
 
     /* Super wideband 32kHz codecs */
     #define NETEQ_ISAC_SWB_CODEC
+    #define NETEQ_OPUS_CODEC
     #define NETEQ_32KHZ_WIDEBAND
     #define NETEQ_G722_1C_CODEC
     #define NETEQ_CELT_CODEC
+    #define NETEQ_OPUS_CODEC
+
+    /* hack in 48 kHz support */
+    #define NETEQ_48KHZ_WIDEBAND
 
     /* Super wideband 48kHz codecs */
     #define NETEQ_48KHZ_WIDEBAND
     #define NETEQ_OPUS_CODEC
     #define NETEQ_ISAC_FB
 #endif
 
 /* Define this unconditionally, since the defines above
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/packet_buffer.c
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/packet_buffer.c
@@ -621,16 +621,21 @@ int WebRtcNetEQ_GetDefaultCodecSettings(
             codecBytes = 1560; /* 240ms @ 52kbps (30ms frames) */
             codecBuffers = 8;
         }
         else if (codecID[i] == kDecoderOpus)
         {
             codecBytes = 15300; /* 240ms @ 510kbps (60ms frames) */
             codecBuffers = 30;  /* Replicating the value for PCMu/a */
         }
+        else if (codecID[i] == kDecoderOpus)
+        {
+            codecBytes = 15300; /* 240ms @ 510kbps (60ms frames) */
+            codecBuffers = 30;  /* ?? Codec supports down to 2.5-60 ms frames */
+        }
         else if ((codecID[i] == kDecoderPCM16B) ||
             (codecID[i] == kDecoderPCM16B_2ch))
         {
             codecBytes = 3360; /* 210ms */
             codecBuffers = 15;
         }
         else if ((codecID[i] == kDecoderPCM16Bwb) ||
             (codecID[i] == kDecoderPCM16Bwb_2ch))
--- a/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
@@ -967,17 +967,18 @@ WebRtc_Word32 AudioDeviceLinuxALSA::Reco
 
     memset(name, 0, kAdmMaxDeviceNameSize);
 
     if (guid != NULL)
     {
         memset(guid, 0, kAdmMaxGuidSize);
     }
     
-    return GetDevicesInfo(1, false, index, name, kAdmMaxDeviceNameSize);
+    return GetDevicesInfo(1, false, index, name, kAdmMaxDeviceNameSize,
+                          guid, kAdmMaxGuidSize);
 }
 
 WebRtc_Word16 AudioDeviceLinuxALSA::RecordingDevices()
 {
 
     return (WebRtc_Word16)GetDevicesInfo(0, false);
 }
 
@@ -1615,40 +1616,41 @@ WebRtc_Word32 AudioDeviceLinuxALSA::Star
         WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id,
                      "    failed to create the play audio thread");
         _playing = false;
         delete [] _playoutBuffer;
         _playoutBuffer = NULL;
         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))
     {
         WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id,
                      "  failed to start the play audio thread");
         _playing = false;
         delete _ptrThreadPlay;
         _ptrThreadPlay = NULL;
         delete [] _playoutBuffer;
         _playoutBuffer = NULL;
         return -1;
     }
     _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;
 }
 
 WebRtc_Word32 AudioDeviceLinuxALSA::StopPlayout()
 {
 
     {
         CriticalSectionScoped lock(&_critSect);
@@ -1810,17 +1812,19 @@ void AudioDeviceLinuxALSA::ClearRecordin
 //                                 Private Methods
 // ============================================================================
 
 WebRtc_Word32 AudioDeviceLinuxALSA::GetDevicesInfo(
     const WebRtc_Word32 function,
     const bool playback,
     const WebRtc_Word32 enumDeviceNo,
     char* enumDeviceName,
-    const WebRtc_Word32 ednLen) const
+    const WebRtc_Word32 ednLen,
+    char* enumDeviceId,
+    const WebRtc_Word32 ediLen) const
 {
     
     // Device enumeration based on libjingle implementation
     // by Tristan Schmelcher at Google Inc.
 
     const char *type = playback ? "Output" : "Input";
     // dmix and dsnoop are only for playback and capture, respectively, but ALSA
     // stupidly includes them in both lists.
@@ -1849,16 +1853,18 @@ WebRtc_Word32 AudioDeviceLinuxALSA::GetD
             return -1;
         }
 
         enumCount++; // default is 0
         if ((function == FUNC_GET_DEVICE_NAME ||
             function == FUNC_GET_DEVICE_NAME_FOR_AN_ENUM) && enumDeviceNo == 0)
         {
             strcpy(enumDeviceName, "default");
+            if (enumDeviceId)
+                memset(enumDeviceId, 0, ediLen);
 
             err = LATE(snd_device_name_free_hint)(hints);
             if (err != 0)
             {
                 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
                              "GetDevicesInfo - device name free hint error: %s",
                              LATE(snd_strerror)(err));
             }
@@ -1911,28 +1917,38 @@ WebRtc_Word32 AudioDeviceLinuxALSA::GetD
 
                 }
                 if ((FUNC_GET_DEVICE_NAME == function) &&
                     (enumDeviceNo == enumCount))
                 {
                     // We have found the enum device, copy the name to buffer.
                     strncpy(enumDeviceName, desc, ednLen);
                     enumDeviceName[ednLen-1] = '\0';
+                    if (enumDeviceId)
+                    {
+                        strncpy(enumDeviceId, name, ediLen);
+                        enumDeviceId[ediLen-1] = '\0';
+                    }
                     keepSearching = false;
                     // Replace '\n' with '-'.
                     char * pret = strchr(enumDeviceName, '\n'/*0xa*/); //LF
                     if (pret)
                         *pret = '-';
                 }
                 if ((FUNC_GET_DEVICE_NAME_FOR_AN_ENUM == function) &&
                     (enumDeviceNo == enumCount))
                 {
                     // We have found the enum device, copy the name to buffer.
                     strncpy(enumDeviceName, name, ednLen);
                     enumDeviceName[ednLen-1] = '\0';
+                    if (enumDeviceId)
+                    {
+                        strncpy(enumDeviceId, name, ediLen);
+                        enumDeviceId[ediLen-1] = '\0';
+                    }
                     keepSearching = false;
                 }
 
                 if (keepSearching)
                     ++enumCount;
 
                 if (desc != name)
                     free(desc);
@@ -1947,17 +1963,17 @@ WebRtc_Word32 AudioDeviceLinuxALSA::GetD
         err = LATE(snd_device_name_free_hint)(hints);
         if (err != 0)
         {
             WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
                          "GetDevicesInfo - device name free hint error: %s",
                          LATE(snd_strerror)(err));
             // Continue and return true anyway, since we did get the whole list.
         }
-    }
+      }
 
     if (FUNC_GET_NUM_OF_DEVICE == function)
     {
         if (enumCount == 1) // only default?
             enumCount = 0;
         return enumCount; // Normal return point for function 0
     }
 
--- a/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
@@ -160,17 +160,19 @@ public:
 public:
     virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer);
 
 private:
     WebRtc_Word32 GetDevicesInfo(const WebRtc_Word32 function,
                                  const bool playback,
                                  const WebRtc_Word32 enumDeviceNo = 0,
                                  char* enumDeviceName = NULL,
-                                 const WebRtc_Word32 ednLen = 0) const;
+                                 const WebRtc_Word32 ednLen = 0,
+                                 char* enumDeviceID = NULL,
+                                 const WebRtc_Word32 ediLen = 0) const;
     WebRtc_Word32 ErrorRecovery(WebRtc_Word32 error, snd_pcm_t* deviceHandle);
 
 private:
     void Lock() { _critSect.Enter(); };
     void UnLock() { _critSect.Leave(); };
 private:
     inline WebRtc_Word32 InputSanityCheckAfterUnlockedPeriod() const;
     inline WebRtc_Word32 OutputSanityCheckAfterUnlockedPeriod() const;
--- a/media/webrtc/trunk/webrtc/modules/modules.gyp
+++ b/media/webrtc/trunk/webrtc/modules/modules.gyp
@@ -10,17 +10,16 @@
   'includes': [
     '../build/common.gypi',
     'audio_coding/codecs/cng/cng.gypi',
     'audio_coding/codecs/g711/g711.gypi',
     'audio_coding/codecs/g722/g722.gypi',
     'audio_coding/codecs/ilbc/ilbc.gypi',
     'audio_coding/codecs/isac/main/source/isac.gypi',
     'audio_coding/codecs/isac/fix/source/isacfix.gypi',
-    'audio_coding/codecs/opus/opus.gypi',
     'audio_coding/codecs/pcm16b/pcm16b.gypi',
     'audio_coding/main/source/audio_coding_module.gypi',
     'audio_coding/neteq/neteq.gypi',
     'audio_conference_mixer/source/audio_conference_mixer.gypi',
     'audio_device/audio_device.gypi',
     'audio_processing/audio_processing.gypi',
     'bitrate_controller/bitrate_controller.gypi',
     'media_file/source/media_file.gypi',
--- a/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
@@ -13,17 +13,16 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <linux/videodev2.h>
 #include <errno.h>
 #include <stdio.h>
 #include <sys/mman.h>
 #include <string.h>
 
-#include <iostream>
 #include <new>
 
 #include "ref_count.h"
 #include "trace.h"
 #include "thread_wrapper.h"
 #include "critical_section_wrapper.h"
 #include "video_capture_linux.h"
 
--- a/media/webrtc/trunk/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.mm
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.mm
@@ -86,21 +86,25 @@ using namespace webrtc;
         return [NSNumber numberWithInt:0];
     }
 
     if(index >= (WebRtc_UWord32)_captureDeviceCountInfo)
     {
         return [NSNumber numberWithInt:-1];
     }
 
-    QTCaptureDevice* tempCaptureDevice =
-        (QTCaptureDevice*)[_captureDevicesInfo objectAtIndex:index];
+    if ([_captureDevicesInfo count] <= index)
+    {
+      return [NSNumber numberWithInt:-1];
+    }
+
+    QTCaptureDevice* tempCaptureDevice = (QTCaptureDevice*)[_captureDevicesInfo objectAtIndex:index];
     if(!tempCaptureDevice)
     {
-        return [NSNumber numberWithInt:-1];
+      return [NSNumber numberWithInt:-1];
     }
 
     memset(deviceName, 0, deviceNameLength);
     memset(deviceUniqueID, 0, deviceUniqueIDLength);
 
     bool successful = NO;
 
     NSString* tempString = [tempCaptureDevice localizedDisplayName];
--- a/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
@@ -11,20 +11,27 @@
     {
       'target_name': 'video_capture_module',
       'type': 'static_library',
       'dependencies': [
         'webrtc_utility',
         '<(webrtc_root)/common_video/common_video.gyp:common_video',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
+
+      'cflags_mozilla': [
+        '$(NSPR_CFLAGS)',
+      ],
+
       'include_dirs': [
         'include',
         '../interface',
         '<(webrtc_root)/common_video/libyuv/include',
+# added for mozilla for use_system_libjpeg
+        '$(DIST)/include',
       ],
       'sources': [
         'device_info_impl.cc',
         'device_info_impl.h',
         'include/video_capture.h',
         'include/video_capture_defines.h',
         'include/video_capture_factory.h',
         'video_capture_config.h',
@@ -74,18 +81,22 @@
                 'xcode_settings': {
                   'OTHER_LDFLAGS': [
                     '-framework QTKit',
                   ],
                 },
               },
             }],  # mac
             ['OS=="win"', {
-              'dependencies': [
-                '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
+              'conditions': [
+                ['build_with_mozilla==0', {
+                  'dependencies': [
+                    '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
+                  ],
+                }],
               ],
               'include_dirs': [
                 'windows',
               ],
               'sources': [
                 'windows/device_info_ds.cc',
                 'windows/device_info_ds.h',
                 'windows/device_info_mf.cc',
@@ -94,16 +105,20 @@
                 'windows/help_functions_ds.h',
                 'windows/sink_filter_ds.cc',
                 'windows/sink_filter_ds.h',
                 'windows/video_capture_ds.cc',
                 'windows/video_capture_ds.h',
                 'windows/video_capture_factory_windows.cc',
                 'windows/video_capture_mf.cc',
                 'windows/video_capture_mf.h',
+                'windows/BasePin.cpp',
+                'windows/BaseFilter.cpp',
+                'windows/BaseInputPin.cpp',
+                'windows/MediaType.cpp',
               ],
               'link_settings': {
                 'libraries': [
                   '-lStrmiids.lib',
                 ],
               },
             }],  # win
             ['OS=="android"', {
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseFilter.cpp
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseFilter.h
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.h
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseInputPin.cpp
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.cpp
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BaseInputPin.h
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.h
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BasePin.cpp
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/BasePin.h
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.h
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/DShowTools.h
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/DShowTools.h
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/MediaType.cpp
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.cpp
rename from media/webrtc/trunk/webrtc/modules/video_capture/main/source/Windows/MediaType.h
rename to media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.h
--- a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8.gyp
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8.gyp
@@ -34,34 +34,60 @@
         '<(webrtc_root)/modules/video_coding/codecs/interface',
         '<(webrtc_root)/modules/interface',
       ],
       'conditions': [
         ['build_libvpx==1', {
           'dependencies': [
             '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
           ],
-        }],
-        # TODO(mikhal): Investigate this mechanism for handling differences
-        # between the Chromium and standalone builds.
-        # http://code.google.com/p/webrtc/issues/detail?id=201
-        ['build_with_chromium==1', {
-          'defines': [
-            'WEBRTC_LIBVPX_VERSION=960' # Bali
+          'conditions': [
+            # TODO(mikhal): Investigate this mechanism for handling differences
+            # between the Chromium and standalone builds.
+            # http://code.google.com/p/webrtc/issues/detail?id=201
+            ['build_with_chromium==1', {
+              'defines': [
+                'WEBRTC_LIBVPX_VERSION=960' # Bali
+              ],
+            }, {
+              'defines': [
+                'WEBRTC_LIBVPX_VERSION=971' # Cayuga
+              ],
+            }],
+            ['use_temporal_layers==1', {
+              'sources': [
+                'temporal_layers.h',
+                'temporal_layers.cc',
+              ],
+            }],
           ],
-        }, {
+        },{
+	  'include_dirs': [
+            '$(DIST)/include',
+          ],
           'defines': [
-            'WEBRTC_LIBVPX_VERSION=971' # Cayuga
+            # This must be updated to match mozilla's version of libvpx
+            'WEBRTC_LIBVPX_VERSION=1000',
           ],
-        }],
-        ['use_temporal_layers==1', {
-          'sources': [
-            'temporal_layers.h',
-            'temporal_layers.cc',
+          'conditions': [
+            ['use_temporal_layers==1', {
+              'defines': [
+                'WEBRTC_LIBVPX_TEMPORAL_LAYERS=1'
+              ],
+            },{
+              'defines': [
+                'WEBRTC_LIBVPX_TEMPORAL_LAYERS=0'
+              ],
+            }],
           ],
+          'link_settings': {
+            'libraries': [
+              '$(LIBVPX_OBJ)/libvpx.a',
+            ],
+          },
         }],
       ],
       'direct_dependent_settings': {
         'include_dirs': [
           'include',
           '<(webrtc_root)/common_video/interface',
           '<(webrtc_root)/modules/video_coding/codecs/interface',
         ],
--- a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -43,17 +43,17 @@ VP8EncoderImpl::VP8EncoderImpl()
       inited_(false),
       timestamp_(0),
       picture_id_(0),
       feedback_mode_(false),
       cpu_speed_(-6),  // default value
       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),
       config_(NULL),
       raw_(NULL) {
   memset(&codec_, 0, sizeof(codec_));
   uint32_t seed = static_cast<uint32_t>(TickTime::MillisecondTimestamp());
   srand(seed);
@@ -79,17 +79,17 @@ int VP8EncoderImpl::Release() {
   if (config_ != NULL) {
     delete config_;
     config_ = NULL;
   }
   if (raw_ != NULL) {
     vpx_img_free(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;
   }
 #endif
   inited_ = false;
   return WEBRTC_VIDEO_CODEC_OK;
 }
@@ -106,17 +106,17 @@ int VP8EncoderImpl::SetRates(uint32_t ne
     return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
   }
   // update bit rate
   if (codec_.maxBitrate > 0 && new_bitrate_kbit > codec_.maxBitrate) {
     new_bitrate_kbit = codec_.maxBitrate;
   }
   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
   temporal_layers_->ConfigureBitrates(new_bitrate_kbit, config_);
 #endif
   codec_.maxFramerate = new_framerate;
 
   // update encoder context
   if (vpx_codec_enc_config_set(encoder_, config_)) {
     return WEBRTC_VIDEO_CODEC_ERROR;
   }
@@ -153,17 +153,17 @@ int VP8EncoderImpl::InitEncode(const Vid
   }
   if (config_ == NULL) {
     config_ = new vpx_codec_enc_cfg_t;
   }
   timestamp_ = 0;
 
   codec_ = *inst;
 
-#if WEBRTC_LIBVPX_VERSION >= 971
+#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
   int num_temporal_layers = inst->codecSpecific.VP8.numberOfTemporalLayers > 1 ?
       inst->codecSpecific.VP8.numberOfTemporalLayers : 1;
   assert(temporal_layers_ == NULL);
   temporal_layers_ = new TemporalLayers(num_temporal_layers);
 #endif
   // random start 16 bits is enough.
   picture_id_ = static_cast<uint16_t>(rand()) & 0x7FFF;
 
@@ -183,28 +183,28 @@ int VP8EncoderImpl::InitEncode(const Vid
   // populate encoder configuration with default values
   if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) {
     return WEBRTC_VIDEO_CODEC_ERROR;
   }
   config_->g_w = codec_.width;
   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
   temporal_layers_->ConfigureBitrates(inst->startBitrate, config_);
 #endif
   // setting the time base of the codec
   config_->g_timebase.num = 1;
   config_->g_timebase.den = 90000;
 
   // Set the error resilience mode according to user settings.
   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 (num_temporal_layers > 1) {
         // Must be on for temporal layers (i.e., |num_temporal_layers| > 1).
         config_->g_error_resilient = 1;
       }
 #endif
       break;
     case kResilientStream:
       config_->g_error_resilient = 1;  // TODO(holmer): Replace with
@@ -356,17 +356,17 @@ int VP8EncoderImpl::Encode(const I420Vid
   raw_->planes[PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
   raw_->planes[PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
   // TODO(mikhal): Stride should be set in initialization.
   raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
   raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane);
   raw_->stride[VPX_PLANE_V] = input_image.stride(kVPlane);
 
   int flags = 0;
-#if WEBRTC_LIBVPX_VERSION >= 971
+#if WEBRTC_LIBVPX_VERSION >= 971 && WEBRTC_LIBVPX_TEMPORAL_LAYERS != 0
   flags |= temporal_layers_->EncodeFlags();
 #endif
   bool send_keyframe = (frame_type == kKeyFrame);
   if (send_keyframe) {
     // Key frame request from caller.
     // Will update both golden and alt-ref.
     flags = VPX_EFLAG_FORCE_KF;
   } else if (feedback_mode_ && codec_specific_info) {
@@ -436,17 +436,17 @@ void VP8EncoderImpl::PopulateCodecSpecif
                                        uint32_t timestamp) {
   assert(codec_specific != NULL);
   codec_specific->codecType = kVideoCodecVP8;
   CodecSpecificInfoVP8 *vp8Info = &(codec_specific->codecSpecific.VP8);
   vp8Info->pictureId = picture_id_;
   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
   temporal_layers_->PopulateCodecSpecific(
       (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? true : false, vp8Info,
           timestamp);
 #else
   vp8Info->temporalIdx = kNoTemporalIdx;
   vp8Info->layerSync = false;
   vp8Info->tl0PicIdx = kNoTl0PicIdx;
 #endif
@@ -682,17 +682,17 @@ int VP8DecoderImpl::Decode(const Encoded
   }
 
 #ifdef INDEPENDENT_PARTITIONS
   if (fragmentation == NULL) {
     return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
   }
 #endif
 
-#if (WEBRTC_LIBVPX_VERSION >= 971) && !defined(WEBRTC_ARCH_ARM)
+#if (WEBRTC_LIBVPX_VERSION >= 1000) && !defined(WEBRTC_ARCH_ARM)
   if (!mfqe_enabled_ && codec_specific_info &&
       codec_specific_info->codecSpecific.VP8.temporalIdx > 0) {
     // Enable MFQE if we are receiving layers.
     // temporalIdx is set in the jitter buffer according to what the RTP
     // header says.
     mfqe_enabled_ = true;
     vp8_postproc_cfg_t  ppcfg;
     ppcfg.post_proc_flag = VP8_MFQE | VP8_DEMACROBLOCK | VP8_DEBLOCK;
--- a/media/webrtc/trunk/webrtc/modules/video_processing/main/source/video_processing.gypi
+++ b/media/webrtc/trunk/webrtc/modules/video_processing/main/source/video_processing.gypi
@@ -68,16 +68,17 @@
           ],
           'include_dirs': [
             '../interface',
             '../../../interface',
           ],
           'conditions': [
             ['os_posix==1 and OS!="mac"', {
               'cflags': [ '-msse2', ],
+              'cflags_mozilla': [ '-msse2', ],
             }],
             ['OS=="mac"', {
               'xcode_settings': {
                 'OTHER_CFLAGS': [ '-msse2', ],
               },
             }],
           ],
         },
--- a/media/webrtc/trunk/webrtc/system_wrappers/source/trace_impl.cc
+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/trace_impl.cc
@@ -447,23 +447,23 @@ void TraceImpl::AddMessageToList(
 
   WebRtc_UWord16 idx = next_free_idx_[active_queue_];
   next_free_idx_[active_queue_]++;
 
   level_[active_queue_][idx] = level;
   length_[active_queue_][idx] = length;
   memcpy(message_queue_[active_queue_][idx], trace_message, length);
 
-  if (next_free_idx_[active_queue_] == WEBRTC_TRACE_MAX_QUEUE - 1) {
+  if (next_free_idx_[active_queue_] >= WEBRTC_TRACE_MAX_QUEUE - 1) {
     // Logging more messages than can be worked off. Log a warning.
     const char warning_msg[] = "WARNING MISSING TRACE MESSAGES\n";
-    level_[active_queue_][next_free_idx_[active_queue_]] = kTraceWarning;
-    length_[active_queue_][next_free_idx_[active_queue_]] = strlen(warning_msg);
-    memcpy(message_queue_[active_queue_][next_free_idx_[active_queue_]],
-           warning_msg, strlen(warning_msg));
+    level_[active_queue_][WEBRTC_TRACE_MAX_QUEUE-1] = kTraceWarning;
+    length_[active_queue_][WEBRTC_TRACE_MAX_QUEUE-1] = strlen(warning_msg);
+    memcpy(message_queue_[active_queue_][WEBRTC_TRACE_MAX_QUEUE-1],
+           warning_msg, length_[active_queue_][WEBRTC_TRACE_MAX_QUEUE-1]);
     next_free_idx_[active_queue_]++;
   }
 }
 
 bool TraceImpl::Run(void* obj) {
   return static_cast<TraceImpl*>(obj)->Process();
 }
 
--- a/media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
@@ -13,18 +13,16 @@
 #include <cassert>
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/time.h>
 #include <time.h>
 #ifdef WEBRTC_ANDROID
 #include <pthread.h>
-#else
-#include <iostream>
 #endif
 
 #if defined(_DEBUG)
 #define BUILDMODE "d"
 #elif defined(DEBUG)
 #define BUILDMODE "d"
 #elif defined(NDEBUG)
 #define BUILDMODE "r"
--- a/media/webrtc/trunk/webrtc/typedefs.h
+++ b/media/webrtc/trunk/webrtc/typedefs.h
@@ -48,20 +48,80 @@
 // definition warnings.
 //#define WEBRTC_ARCH_ARM
 // TODO(andrew): Chromium uses the following two defines. Should we switch?
 //#define WEBRTC_ARCH_ARM_FAMILY
 //#define WEBRTC_ARCH_ARMEL
 #define WEBRTC_ARCH_32_BITS
 #define WEBRTC_ARCH_LITTLE_ENDIAN
 #define WEBRTC_LITTLE_ENDIAN
-#elif defined(__MIPSEL__)
-#define WEBRTC_ARCH_32_BITS
+#elif defined(__powerpc64__)
+#define WEBRTC_ARCH_PPC64 1
+#define WEBRTC_ARCH_64_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__ppc__) || defined(__powerpc__)
+#define WEBRTC_ARCH_PPC 1
+#define WEBRTC_ARCH_32_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__sparc64__)
+#define WEBRTC_ARCH_SPARC 1
+#define WEBRTC_ARCH_64_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__sparc__)
+#define WEBRTC_ARCH_SPARC 1
+#define WEBRTC_ARCH_32_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__mips__)
+#define WEBRTC_ARCH_MIPS 1
+#if defined(_ABI64) && _MIPS_SIM == _ABI64
+#define WEBRTC_ARCH_64_BITS 1
+#else
+#define WEBRTC_ARCH_32_BITS 1
+#endif
+#if defined(__MIPSEB__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#else
 #define WEBRTC_ARCH_LITTLE_ENDIAN
 #define WEBRTC_LITTLE_ENDIAN
+#endif
+#elif defined(__hppa__)
+#define WEBRTC_ARCH_HPPA 1
+#define WEBRTC_ARCH_32_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__ia64__)
+#define WEBRTC_ARCH_IA64 1
+#define WEBRTC_ARCH_64_BITS 1
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#define WEBRTC_LITTLE_ENDIAN
+#elif defined(__s390x__)
+#define WEBRTC_ARCH_S390X 1
+#define WEBRTC_ARCH_64_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__s390__)
+#define WEBRTC_ARCH_S390 1
+#define WEBRTC_ARCH_32_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
+#elif defined(__alpha__)
+#define WEBRTC_ARCH_ALPHA 1
+#define WEBRTC_ARCH_64_BITS 1
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#define WEBRTC_LITTLE_ENDIAN
+#elif defined(__avr32__)
+#define WEBRTC_ARCH_AVR32 1
+#define WEBRTC_ARCH_32_BITS 1
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_BIG_ENDIAN
 #else
 #error Please add support for your architecture in typedefs.h
 #endif
 
 #if defined(__SSE2__) || defined(_MSC_VER)
 #define WEBRTC_USE_SSE2
 #endif
 
--- a/media/webrtc/trunk/webrtc/video_engine/vie_impl.cc
+++ b/media/webrtc/trunk/webrtc/video_engine/vie_impl.cc
@@ -211,21 +211,23 @@ int VideoEngine::SetAndroidObjects(void*
                "SetAndroidObjects()");
 
 #if defined(WEBRTC_ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
   if (SetCaptureAndroidVM(javaVM, javaContext) != 0) {
     WEBRTC_TRACE(kTraceError, kTraceVideo, g_vie_active_instance_counter,
                  "Could not set capture Android VM");
     return -1;
   }
+#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
   if (SetRenderAndroidVM(javaVM) != 0) {
     WEBRTC_TRACE(kTraceError, kTraceVideo, g_vie_active_instance_counter,
                  "Could not set render Android VM");
     return -1;
   }
+#endif
   return 0;
 #else
   WEBRTC_TRACE(kTraceError, kTraceVideo, g_vie_active_instance_counter,
                "WEBRTC_ANDROID not defined for VideoEngine::SetAndroidObjects");
   return -1;
 #endif
 }
 
--- a/media/webrtc/trunk/webrtc/voice_engine/include/voe_volume_control.h
+++ b/media/webrtc/trunk/webrtc/voice_engine/include/voe_volume_control.h
@@ -113,15 +113,15 @@ public:
     // Scales volume of the |left| and |right| channels independently.
     // Valid scale range is [0.0, 1.0].
     virtual int SetOutputVolumePan(int channel, float left, float right) = 0;
 
     // Gets the current left and right scaling factors.
     virtual int GetOutputVolumePan(int channel, float& left, float& right) = 0;
 
 protected:
-    VoEVolumeControl() {};
-    virtual ~VoEVolumeControl() {};
+    VoEVolumeControl() {}
+    virtual ~VoEVolumeControl() {}
 };
 
 }  // namespace webrtc
 
 #endif  // #ifndef WEBRTC_VOICE_ENGINE_VOE_VOLUME_CONTROL_H
--- a/media/webrtc/trunk/webrtc/voice_engine/voe_codec_impl.h
+++ b/media/webrtc/trunk/webrtc/voice_engine/voe_codec_impl.h
@@ -73,20 +73,25 @@ public:
     // Dual-streaming
     virtual int SetSecondarySendCodec(int channel, const CodecInst& codec,
                                       int red_payload_type);
 
     virtual int RemoveSecondarySendCodec(int channel);
 
     virtual int GetSecondarySendCodec(int channel, CodecInst& codec);
 
+    static void ACMToExternalCodecRepresentation(CodecInst& toInst,
+                                                 const CodecInst& fromInst);
+
+    static void ExternalToACMCodecRepresentation(CodecInst& toInst,
+                                                 const CodecInst& fromInst);
+
 protected:
     VoECodecImpl(voe::SharedData* shared);
     virtual ~VoECodecImpl();
 
 private:
-
     voe::SharedData* _shared;
 };
 
 } // namespace webrtc
 
 #endif  // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H
--- a/media/webrtc/trunk/webrtc/voice_engine/voice_engine_core.gypi
+++ b/media/webrtc/trunk/webrtc/voice_engine/voice_engine_core.gypi
@@ -28,16 +28,19 @@
         'include',
         '<(webrtc_root)/modules/audio_device',
       ],
       'direct_dependent_settings': {
         'include_dirs': [
           'include',
         ],
       },
+      'defines': [
+        'WEBRTC_EXTERNAL_TRANSPORT',
+      ],
       'sources': [
         '../common_types.h',
         '../engine_configurations.h',
         '../typedefs.h',
         'include/voe_audio_processing.h',
         'include/voe_base.h',
         'include/voe_call_report.h',
         'include/voe_codec.h',
--- a/media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
+++ b/media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
@@ -353,17 +353,20 @@ namespace webrtc
 } // namespace webrtc
 
 // ----------------------------------------------------------------------------
 //  Defines
 // ----------------------------------------------------------------------------
 
   // Always excluded for Android builds
   #undef WEBRTC_CODEC_ISAC
-  #undef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
+  // We need WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT to make things work on Android.  
+  // Motivation for the commented-out undef below is unclear.
+  //
+  // #undef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
   #undef WEBRTC_CONFERENCING
   #undef WEBRTC_TYPING_DETECTION
 
   // Default audio processing states
   #undef  WEBRTC_VOICE_ENGINE_NS_DEFAULT_STATE
   #undef  WEBRTC_VOICE_ENGINE_AGC_DEFAULT_STATE
   #undef  WEBRTC_VOICE_ENGINE_EC_DEFAULT_STATE
   #define WEBRTC_VOICE_ENGINE_NS_DEFAULT_STATE  WEBRTC_AUDIO_PROCESSING_OFF
@@ -373,20 +376,20 @@ namespace webrtc
   // Default audio processing modes
   #undef  WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE
   #undef  WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE
   #define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE  \
       NoiseSuppression::kModerate
   #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \
       GainControl::kAdaptiveDigital
 
-  #define ANDROID_NOT_SUPPORTED(stat)                         \
-      stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,   \
-                        "API call not supported");            \
-      return -1;
+  // This macro used to cause the calling function to set an error code and return.
+  // However, not doing that seems to cause the unit tests to pass / behave reasonably,
+  // so it's disabled for now; see bug 819856.
+  #define ANDROID_NOT_SUPPORTED(stat)
 
 #else // LINUX PC
 // ----------------------------------------------------------------------------
 //  Enumerators
 // ----------------------------------------------------------------------------
 
 namespace webrtc
 {
--- a/media/webrtc/webrtc-config.mk
+++ b/media/webrtc/webrtc-config.mk
@@ -42,10 +42,10 @@ ifdef WEBRTC_CONFIG_INCLUDED
 $(error Must not include webrtc-config.mk twice.)
 endif
 
 WEBRTC_CONFIG_INCLUDED = 1
 
 EXTRA_DEPS += $(topsrcdir)/media/webrtc/webrtc-config.mk
 
 LOCAL_INCLUDES += \
-  -I$(topsrcdir)/media/webrtc/trunk/src \
+  -I$(topsrcdir)/media/webrtc/trunk/webrtc \
   $(NULL)
--- a/media/webrtc/webrtc_config.gypi
+++ b/media/webrtc/webrtc_config.gypi
@@ -3,29 +3,37 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # definitions to control what gets built in webrtc
 # NOTE!!! if you change something here, due to .gyp files not
 # being reprocessed on .gypi changes, run this before building:
 # "find . -name '*.gyp' | xargs touch"
 {
   'variables': {
+    'build_with_mozilla': 1,
+    'build_with_chromium': 0,
     # basic stuff for everything
     'include_internal_video_render': 0,
     'clang_use_chrome_plugins': 0,
     'enable_protobuf': 0,
     'include_pulse_audio': 0,
     'include_tests': 0,
-    'use_system_libjpeg': 1,
-    'use_system_libvpx': 1,
+# use_system_lib* still seems to be in use in trunk/build
+    'use_system_libjpeg': 0,
+    'use_system_libvpx': 0,
+    'build_libjpeg': 0,
+    'build_libvpx': 0,
+
+# (for vp8) chromium sets to 0 also
+    'use_temporal_layers': 0,
 # Creates AEC internal sample dump files in current directory
 #    'aec_debug_dump': 1,
 
     # codec enable/disables:
     # Note: if you change one here, you must modify shared_libs.mk!
-    'codec_g711_enable': 1,
-    'codec_opus_enable': 1,
-    'codec_g722_enable': 0,
-    'codec_ilbc_enable': 0,
-    'codec_isac_enable': 0,
-    'codec_pcm16b_enable': 1,
+    'include_g711': 1,
+    'include_opus': 1,
+    'include_g722': 0,
+    'include_ilbc': 0,
+    'include_isac': 0,
+    'include_pcm16b': 1,
   }
 }
--- a/media/webrtc/webrtc_update.sh
+++ b/media/webrtc/webrtc_update.sh
@@ -1,26 +1,36 @@
 #!/bin/bash
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # First, get a new copy of the tree to play with
 # They both want to be named 'trunk'...
-#cd media/webrtc
 mkdir webrtc_update
 cd webrtc_update
 
 # Note: must be in trunk; won't work with --name (error during sync)
 gclient config --name trunk http://webrtc.googlecode.com/svn/trunk/peerconnection
 gclient sync --force
 if [ $2 ] ; then
+if [ $3 ] ; then
+    echo
+else
     sed -i -e "s/\"webrtc_revision\":.*,/\"webrtc_revision\": \"$1\",/" -e "s/\"libjingle_revision\":.*,/\"libjingle_revision\": \"$2\",/" trunk/DEPS
     gclient sync --force
 fi
+fi
+
+if [ $3 ] ; then
+echo "Updating from $3..."
+rm -rf trunk/third_party/webrtc
+mkdir trunk/src
+cp -a $3/webrtc/* trunk/src
+fi
 
 cd trunk
 
 export date=`date`
 export revision=`svnversion -n`
 if [ $1 ] ; then
   echo "WebRTC revision overridden from $revision to $1" 
   export revision=$1
@@ -55,26 +65,26 @@ hg status -a -r >/tmp/changed_webrtc_fil
 # leave this for the user for now until we're comfortable it works safely
 
 # Commit the vendor branch
 echo "Commit, merge and push to server - cut and paste"
 echo "You probably want to do these from another shell so you can look at these"
 hg commit -m "Webrtc import $revision"
 # webrtc-import-last is auto-updated (bookmark)
 
-echo ""
-hg update --clean webrtc-pending
-hg merge -r webrtc-import-last
-hg commit -m 'merge latest import to pending, $revision'
+#echo ""
+#hg update --clean webrtc-pending
+#hg merge -r webrtc-import-last
+#hg commit -m "merge latest import to pending, $revision"
 # webrtc-pending is auto-updated (bookmark)
 
 echo ""
-hg update --clean webrtc-trim
-hg merge -r webrtc-pending
-hg commit -m "merge latest import to trim, $revision"
+echo "hg update --clean webrtc-trim"
+echo "hg merge -r webrtc-import-last"
+echo "hg commit -m 'merge latest import to trim, $revision'"
 # webrtc-trim is auto-updated (bookmark)
 
 # commands to pull - never do more than echo them for the user
 echo ""
 echo "Here's how to pull this update into the mozilla repo:"
 echo "cd your_tree"
 echo "hg qpop -a"
 echo "hg pull --bookmark webrtc-trim path-to-webrtc-import-repo"
--- a/media/webrtc/webrtc_version.h
+++ b/media/webrtc/webrtc_version.h
@@ -1,3 +1,3 @@
-#define WEBRTC_SVNVERSION 2820
-#define WEBRTC_PULL_DATE "Mon Sep 24 22:53:49 EDT 2012"
+#define WEBRTC_SVNVERSION 3371
+#define WEBRTC_PULL_DATE "Mon Jan 14 02:00:00 EDT 2012"