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

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

Issue 23691038: Switch LiveAudio to source provider solution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and fixed some unittests Created 7 years, 3 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 <vector> 5 #include <vector>
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return true; 130 return true;
131 } 131 }
132 132
133 // Create and start a local audio track. Starting the audio track will connect 133 // Create and start a local audio track. Starting the audio track will connect
134 // the audio track to the capturer and also start the source of the capturer. 134 // the audio track to the capturer and also start the source of the capturer.
135 // Also, connect the sink to the audio track. 135 // Also, connect the sink to the audio track.
136 scoped_refptr<WebRtcLocalAudioTrack> 136 scoped_refptr<WebRtcLocalAudioTrack>
137 CreateAndStartLocalAudioTrack(WebRtcAudioCapturer* capturer, 137 CreateAndStartLocalAudioTrack(WebRtcAudioCapturer* capturer,
138 WebRtcAudioCapturerSink* sink) { 138 WebRtcAudioCapturerSink* sink) {
139 scoped_refptr<WebRtcLocalAudioTrack> local_audio_track( 139 scoped_refptr<WebRtcLocalAudioTrack> local_audio_track(
140 WebRtcLocalAudioTrack::Create(std::string(), capturer, NULL, NULL)); 140 WebRtcLocalAudioTrack::Create(std::string(), capturer, NULL, NULL, NULL));
141 local_audio_track->AddSink(sink); 141 local_audio_track->AddSink(sink);
142 local_audio_track->Start(); 142 local_audio_track->Start();
143 return local_audio_track; 143 return local_audio_track;
144 } 144 }
145 145
146 class WebRTCMediaProcessImpl : public webrtc::VoEMediaProcess { 146 class WebRTCMediaProcessImpl : public webrtc::VoEMediaProcess {
147 public: 147 public:
148 explicit WebRTCMediaProcessImpl(base::WaitableEvent* event) 148 explicit WebRTCMediaProcessImpl(base::WaitableEvent* event)
149 : event_(event), 149 : event_(event),
150 channel_id_(-1), 150 channel_id_(-1),
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 #endif 963 #endif
964 964
965 TEST_F(MAYBE_WebRTCAudioDeviceTest, 965 TEST_F(MAYBE_WebRTCAudioDeviceTest,
966 MAYBE_WebRtcLoopbackTimeWithSignalProcessing) { 966 MAYBE_WebRtcLoopbackTimeWithSignalProcessing) {
967 int latency = RunWebRtcLoopbackTimeTest(audio_manager_.get(), true); 967 int latency = RunWebRtcLoopbackTimeTest(audio_manager_.get(), true);
968 PrintPerfResultMs("webrtc_loopback_with_signal_processing (100 packets)", 968 PrintPerfResultMs("webrtc_loopback_with_signal_processing (100 packets)",
969 "t", latency); 969 "t", latency);
970 } 970 }
971 971
972 } // namespace content 972 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698