Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: content/renderer/media/webrtc_audio_device_unittest.cc

Issue 12218036: Enable audio capture on Android (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: solve unit test Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_device_unittest.cc
===================================================================
--- content/renderer/media/webrtc_audio_device_unittest.cc (revision 181622)
+++ content/renderer/media/webrtc_audio_device_unittest.cc (working copy)
@@ -322,6 +322,10 @@
// to send encoded packets to the network. Our main interest here is to ensure
// that the audio capturing starts as it should.
// Disabled when running headless since the bots don't have the required config.
+
+// TODO(leozwang): Because ExternalMediaProcessing is disabled in webrtc,
+// disable this unit test on Android for now.
+#if !defined(OS_ANDROID)
tommi (sloooow) - chröme 2013/02/11 09:52:58 Instead of this, can you use the MAYBE_ approach a
leozwang1 2013/02/11 18:03:43 Done.
TEST_F(WebRTCAudioDeviceTest, StartRecording) {
if (!has_input_devices_ || !has_output_devices_) {
LOG(WARNING) << "Missing audio devices.";
@@ -388,6 +392,7 @@
EXPECT_EQ(0, base->DeleteChannel(ch));
EXPECT_EQ(0, base->Terminate());
}
+#endif
// Uses WebRtcAudioDeviceImpl to play a local wave file.
// Disabled when running headless since the bots don't have the required config.
@@ -505,11 +510,19 @@
ScopedWebRTCPtr<webrtc::VoEAudioProcessing> audio_processing(engine.get());
ASSERT_TRUE(audio_processing.valid());
+#if defined(OS_ANDROID)
+ // On Android, by default AGC is off.
+ bool enabled = true;
+ webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
+ EXPECT_EQ(0, audio_processing->GetAgcStatus(enabled, agc_mode));
+ EXPECT_FALSE(enabled);
+#else
bool enabled = false;
- webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
+ webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
EXPECT_EQ(0, audio_processing->GetAgcStatus(enabled, agc_mode));
EXPECT_TRUE(enabled);
EXPECT_EQ(agc_mode, webrtc::kAgcAdaptiveAnalog);
+#endif
int ch = base->CreateChannel();
EXPECT_NE(-1, ch);

Powered by Google App Engine
This is Rietveld 408576698