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

Side by Side Diff: content/renderer/media/webrtc_audio_device_unittest.cc

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/environment.h" 5 #include "base/environment.h"
6 #include "base/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "content/renderer/media/webrtc_audio_capturer.h" 7 #include "content/renderer/media/webrtc_audio_capturer.h"
8 #include "content/renderer/media/webrtc_audio_device_impl.h" 8 #include "content/renderer/media/webrtc_audio_device_impl.h"
9 #include "content/renderer/media/webrtc_audio_renderer.h" 9 #include "content/renderer/media/webrtc_audio_renderer.h"
10 #include "content/renderer/render_thread_impl.h" 10 #include "content/renderer/render_thread_impl.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return false; 97 return false;
98 98
99 media::AudioHardwareConfig* hardware_config = 99 media::AudioHardwareConfig* hardware_config =
100 RenderThreadImpl::current()->GetAudioHardwareConfig(); 100 RenderThreadImpl::current()->GetAudioHardwareConfig();
101 101
102 // Use native capture sample rate and channel configuration to get some 102 // Use native capture sample rate and channel configuration to get some
103 // action in this test. 103 // action in this test.
104 int sample_rate = hardware_config->GetInputSampleRate(); 104 int sample_rate = hardware_config->GetInputSampleRate();
105 media::ChannelLayout channel_layout = 105 media::ChannelLayout channel_layout =
106 hardware_config->GetInputChannelLayout(); 106 hardware_config->GetInputChannelLayout();
107 if (!capturer->Initialize(channel_layout, sample_rate, 1)) 107 if (!capturer->Initialize(kRenderViewId, channel_layout, sample_rate, 1))
108 return false; 108 return false;
109 109
110 return true; 110 return true;
111 } 111 }
112 112
113 113
114 class WebRTCMediaProcessImpl : public webrtc::VoEMediaProcess { 114 class WebRTCMediaProcessImpl : public webrtc::VoEMediaProcess {
115 public: 115 public:
116 explicit WebRTCMediaProcessImpl(base::WaitableEvent* event) 116 explicit WebRTCMediaProcessImpl(base::WaitableEvent* event)
117 : event_(event), 117 : event_(event),
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 webrtc_audio_device->capturer()->Stop(); 584 webrtc_audio_device->capturer()->Stop();
585 renderer->Stop(); 585 renderer->Stop();
586 EXPECT_EQ(0, base->StopSend(ch)); 586 EXPECT_EQ(0, base->StopSend(ch));
587 EXPECT_EQ(0, base->StopPlayout(ch)); 587 EXPECT_EQ(0, base->StopPlayout(ch));
588 588
589 EXPECT_EQ(0, base->DeleteChannel(ch)); 589 EXPECT_EQ(0, base->DeleteChannel(ch));
590 EXPECT_EQ(0, base->Terminate()); 590 EXPECT_EQ(0, base->Terminate());
591 } 591 }
592 592
593 } // namespace content 593 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698