Bug 694814: Patch 2: modifications to webrtc.org single_rw_fifo r=glandium,ted
☠☠ backed out by 9e5f6bc7cdec ☠ ☠
authorRandell Jesup <rjesup@jesup.org>
Wed, 02 Apr 2014 13:58:19 -0400
changeset 195789 6922b1261595b36ce3d258d99f7f63af2c61c748
parent 195788 89a615263614916da84dbe1625d1e0244ad3668d
child 195790 e3664615ecbf84b4b89d90f0f09d51f7ef6c0074
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, ted
bugs694814
milestone31.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 694814: Patch 2: modifications to webrtc.org single_rw_fifo r=glandium,ted
media/webrtc/moz.build
media/webrtc/trunk/webrtc/modules/audio_device/android/single_rw_fifo.cc
media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -9,18 +9,21 @@ include('/build/gyp.mozbuild')
 webrtc_non_unified_sources = [
     'trunk/webrtc/common_audio/vad/vad_core.c',                                  # Because of name clash in the kInitCheck variable
     'trunk/webrtc/common_audio/vad/webrtc_vad.c',                                # Because of name clash in the kInitCheck variable
     'trunk/webrtc/modules/audio_coding/codecs/g722/g722_decode.c',               # Because of name clash in the saturate function
     'trunk/webrtc/modules/audio_coding/codecs/g722/g722_encode.c',               # Because of name clash in the saturate function
     'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c',   # Because of name clash in the kDampFilter variable
     'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c', # Because of name clash in the kDampFilter variable
     'trunk/webrtc/modules/audio_coding/neteq4/audio_vector.cc',                  # Because of explicit template specializations
+    'trunk/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc',       # Because of LATE()
+    'trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc',# Because of LATE()
     'trunk/webrtc/modules/audio_device/opensl/opensles_input.cc',                # Because of name clash in the kOption variable
     'trunk/webrtc/modules/audio_device/opensl/opensles_output.cc',               # Because of name clash in the kOption variable
+    'trunk/webrtc/modules/audio_device/opensl/single_rw_fifo.cc',                # Because of name clash with #define FF
     'trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc',            # Because of ordering assumptions in strsafe.h
     'trunk/webrtc/modules/audio_processing/aec/aec_core.c',                      # Because of name clash in the ComfortNoise function
     'trunk/webrtc/modules/audio_processing/aecm/aecm_core.c',                    # Because of name clash in the ComfortNoise function
     'trunk/webrtc/modules/audio_processing/aecm/echo_control_mobile.c',          # Because of name clash in the kInitCheck variable
     'trunk/webrtc/modules/audio_processing/agc/analog_agc.c',                    # Because of name clash in the kInitCheck variable
     'trunk/webrtc/modules/audio_processing/echo_cancellation_impl.cc',           # Because of name clash in the MapError function
     'trunk/webrtc/modules/audio_processing/echo_control_mobile_impl.cc',         # Because of name clash in the MapError function
     'trunk/webrtc/modules/audio_processing/gain_control_impl.cc',                # Because of name clash in the Handle typedef
--- a/media/webrtc/trunk/webrtc/modules/audio_device/android/single_rw_fifo.cc
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/single_rw_fifo.cc
@@ -4,27 +4,34 @@
  *  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.
  */
 
 #include "webrtc/modules/audio_device/android/single_rw_fifo.h"
+#if defined(_MSC_VER)
+#include <windows.h>
+#endif
 
 static int UpdatePos(int pos, int capacity) {
   return (pos + 1) % capacity;
 }
 
 namespace webrtc {
 
 namespace subtle {
 
 inline void MemoryBarrier() {
+#if defined(_MSC_VER)
+  ::MemoryBarrier();
+#else
   __sync_synchronize();
+#endif
 }
 
 }  // namespace subtle
 
 SingleRwFifo::SingleRwFifo(int capacity)
     : capacity_(capacity),
       size_(0),
       read_pos_(0),
--- a/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
@@ -118,26 +118,29 @@
             'win/audio_device_core_win.cc',
             'win/audio_device_core_win.h',
             'win/audio_device_wave_win.cc',
             'win/audio_device_wave_win.h',
             'win/audio_device_utility_win.cc',
             'win/audio_device_utility_win.h',
             'win/audio_mixer_manager_win.cc',
             'win/audio_mixer_manager_win.h',
+            # used externally for getUserMedia
+            'opensl/single_rw_fifo.cc',
+            'opensl/single_rw_fifo.h',
           ],
           'conditions': [
             ['OS=="android"', {
-	      'sources': [
+              'sources': [
                 'opensl/audio_manager_jni.cc',
                 'opensl/audio_manager_jni.h',
-		'android/audio_device_jni_android.cc',
-		'android/audio_device_jni_android.h',
+                'android/audio_device_jni_android.cc',
+                'android/audio_device_jni_android.h',
                ],
-	    }],
+            }],
             ['OS=="android" or moz_widget_toolkit_gonk==1', {
               'link_settings': {
                 'libraries': [
                   '-llog',
                   '-lOpenSLES',
                 ],
               },
               'conditions': [
@@ -149,27 +152,25 @@
                     'opensl/fine_audio_buffer.h',
                     'opensl/low_latency_event_posix.cc',
                     'opensl/low_latency_event.h',
                     'opensl/opensles_common.cc',
                     'opensl/opensles_common.h',
                     'opensl/opensles_input.cc',
                     'opensl/opensles_input.h',
                     'opensl/opensles_output.h',
-                    'opensl/single_rw_fifo.cc',
-                    'opensl/single_rw_fifo.h',
-		    'shared/audio_device_utility_shared.cc',
-		    'shared/audio_device_utility_shared.h',
+                    'shared/audio_device_utility_shared.cc',
+                    'shared/audio_device_utility_shared.h',
                   ],
                 }, {
                   'sources': [
-		    'shared/audio_device_utility_shared.cc',
-		    'shared/audio_device_utility_shared.h',
-		    'android/audio_device_jni_android.cc',
-		    'android/audio_device_jni_android.h',
+                    'shared/audio_device_utility_shared.cc',
+                    'shared/audio_device_utility_shared.h',
+                    'android/audio_device_jni_android.cc',
+                    'android/audio_device_jni_android.h',
                   ],
                 }],
                 ['enable_android_opensl_output==1', {
                   'sources': [
                     'opensl/opensles_output.cc'
                   ],
                   'defines': [
                     'WEBRTC_ANDROID_OPENSLES_OUTPUT',