Updated stable to r2699.

git-svn-id: http://webrtc.googlecode.com/svn/stable/src@2700 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/build/common.gypi b/build/common.gypi
index b7e0181..aa72ea5 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -64,10 +64,6 @@
     'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
 
     'conditions': [
-      ['OS=="android"', {
-        # On Android, we always prefer fixed_point to reduce CPU usage.
-        'prefer_fixed_point%': 1,
-      }],
       ['build_with_chromium==1', {
         # Exclude pulse audio on Chromium since its prerequisites don't require
         # pulse audio.
@@ -139,6 +135,7 @@
         ],
       }],
       ['target_arch=="arm"', {
+        'prefer_fixed_point%': 1,
         'defines': [
           'WEBRTC_ARCH_ARM',
         ],
@@ -191,6 +188,8 @@
         'msvs_disabled_warnings!': [4189,],
       }],
       ['OS=="android"', {
+        # TODO(kma): Remove prefer_fixed_point for Android.
+        'prefer_fixed_point%': 1,
         'defines': [
           'WEBRTC_LINUX',
           'WEBRTC_ANDROID',
diff --git a/common_audio/signal_processing/signal_processing.gypi b/common_audio/signal_processing/signal_processing.gypi
index 5bce394..2edc808 100644
--- a/common_audio/signal_processing/signal_processing.gypi
+++ b/common_audio/signal_processing/signal_processing.gypi
@@ -57,13 +57,23 @@
         'vector_scaling_operations.c',
       ],
       'conditions': [
-        ['OS=="android"', {
+        ['target_arch=="arm"', {
           'sources': [
             'spl_sqrt_floor_arm.s',
           ],
           'sources!': [
             'spl_sqrt_floor.c',
           ],
+          'conditions': [
+            ['armv7==1', {
+              'sources': [
+                'filter_ar_fast_q12_armv7.s',
+              ],
+              'sources!': [
+                'filter_ar_fast_q12.c',
+              ],
+            }],
+          ],
         }],
       ],
     }, # spl
diff --git a/common_audio/signal_processing/signal_processing_unittest.cc b/common_audio/signal_processing/signal_processing_unittest.cc
index 970889f..a7c69b2 100644
--- a/common_audio/signal_processing/signal_processing_unittest.cc
+++ b/common_audio/signal_processing/signal_processing_unittest.cc
@@ -112,7 +112,7 @@
                                                       WEBRTC_SPL_WORD32_MAX));
     EXPECT_EQ(1073741824, WEBRTC_SPL_MUL_16_32_RSFT16(WEBRTC_SPL_WORD16_MIN,
                                                       WEBRTC_SPL_WORD32_MIN));
-#ifdef WEBRTC_ARCH_ARM_V7A
+#ifdef WEBRTC_ARCH_ARM_V7
     EXPECT_EQ(-1073741824,
               WEBRTC_SPL_MUL_16_32_RSFT16(WEBRTC_SPL_WORD16_MIN,
                                           WEBRTC_SPL_WORD32_MAX));
diff --git a/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi b/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
index 0255a73..739b2e1 100644
--- a/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
+++ b/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi
@@ -72,7 +72,7 @@
             'WEBRTC_LINUX',
           ],
         }],
-        ['OS=="android"', {
+        ['target_arch=="arm" and armv7==1', {
           'dependencies': [ 'isac_neon', ],
           'sources': [
             'lattice_armv7.S',
@@ -87,7 +87,7 @@
     },
   ],
   'conditions': [
-    ['OS=="android"', {
+    ['target_arch=="arm" and armv7==1', {
       'targets': [
         {
           'target_name': 'isac_neon',
diff --git a/modules/audio_coding/codecs/isac/fix/test/isacfix_unittest.cc b/modules/audio_coding/codecs/isac/fix/test/isacfix_unittest.cc
index a476593..bef71e9 100644
--- a/modules/audio_coding/codecs/isac/fix/test/isacfix_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/test/isacfix_unittest.cc
@@ -73,7 +73,7 @@
   const int kSamples = 20;
   int16_t in[kSamples];
   int32_t state[2] = {12345, 987654};
-#ifdef WEBRTC_ARCH_ARM_V7A
+#ifdef WEBRTC_ARCH_ARM_V7
   int32_t out[kSamples] = {-1040, -1035, -22875, -1397, -27604, 20018, 7917,
     -1279, -8552, -14494, -7558, -23537, -27258, -30554, -32768, -3432, -32768,
     25215, -27536, 22436};
diff --git a/modules/audio_processing/aecm/aecm.gypi b/modules/audio_processing/aecm/aecm.gypi
index 42b1b77..4dfab51 100644
--- a/modules/audio_processing/aecm/aecm.gypi
+++ b/modules/audio_processing/aecm/aecm.gypi
@@ -31,14 +31,14 @@
         'aecm_core.h',
       ],
       'conditions': [
-        ['OS=="android"', {
+        ['target_arch=="arm" and armv7==1', {
           'dependencies': [ 'aecm_neon', ],
         }],
       ],
     },
   ],
   'conditions': [
-    ['OS=="android"', {
+    ['target_arch=="arm" and armv7==1', {
       'targets': [
         {
           'target_name': 'aecm_neon',
diff --git a/modules/audio_processing/ns/ns.gypi b/modules/audio_processing/ns/ns.gypi
index 16bc0dd..940e330 100644
--- a/modules/audio_processing/ns/ns.gypi
+++ b/modules/audio_processing/ns/ns.gypi
@@ -55,14 +55,14 @@
         'nsx_core.h',
       ],
       'conditions': [
-        ['OS=="android"', {
+        ['target_arch=="arm" and armv7==1', {
           'dependencies': [ 'ns_neon', ],
         }],
       ],
     },
   ],
   'conditions': [
-    ['OS=="android"', {
+    ['target_arch=="arm" and armv7==1', {
       'targets': [
         {
           'target_name': 'ns_neon',
diff --git a/modules/video_coding/main/source/video_coding_impl.cc b/modules/video_coding/main/source/video_coding_impl.cc
index 68390a0..c73fb30 100644
--- a/modules/video_coding/main/source/video_coding_impl.cc
+++ b/modules/video_coding/main/source/video_coding_impl.cc
@@ -1367,6 +1367,7 @@
 }
 
 int VideoCodingModuleImpl::StartDebugRecording(const char* file_name_utf8) {
+  CriticalSectionScoped cs(_sendCritSect);
   _encoderInputFile = fopen(file_name_utf8, "wb");
   if (_encoderInputFile == NULL)
     return VCM_GENERAL_ERROR;
@@ -1374,6 +1375,7 @@
 }
 
 int VideoCodingModuleImpl::StopDebugRecording(){
+  CriticalSectionScoped cs(_sendCritSect);
   if (_encoderInputFile != NULL) {
     fclose(_encoderInputFile);
     _encoderInputFile = NULL;