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

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

Issue 14893006: Add flag for enabling WebRTC AEC debug recordings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hard coded string in wait for libjingle roll. Created 7 years, 7 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 "content/renderer/media/media_stream_dependency_factory.h" 5 #include "content/renderer/media/media_stream_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h"
9 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
10 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "content/public/common/content_switches.h"
11 #include "content/renderer/media/media_stream_source_extra_data.h" 13 #include "content/renderer/media/media_stream_source_extra_data.h"
12 #include "content/renderer/media/rtc_media_constraints.h" 14 #include "content/renderer/media/rtc_media_constraints.h"
13 #include "content/renderer/media/rtc_peer_connection_handler.h" 15 #include "content/renderer/media/rtc_peer_connection_handler.h"
14 #include "content/renderer/media/rtc_video_capturer.h" 16 #include "content/renderer/media/rtc_video_capturer.h"
15 #include "content/renderer/media/video_capture_impl_manager.h" 17 #include "content/renderer/media/video_capture_impl_manager.h"
16 #include "content/renderer/media/webaudio_capturer_source.h" 18 #include "content/renderer/media/webaudio_capturer_source.h"
17 #include "content/renderer/media/webrtc_audio_device_impl.h" 19 #include "content/renderer/media/webrtc_audio_device_impl.h"
18 #include "content/renderer/media/webrtc_local_audio_track.h" 20 #include "content/renderer/media/webrtc_local_audio_track.h"
19 #include "content/renderer/media/webrtc_logging_handler_impl.h" 21 #include "content/renderer/media/webrtc_logging_handler_impl.h"
20 #include "content/renderer/media/webrtc_logging_message_filter.h" 22 #include "content/renderer/media/webrtc_logging_message_filter.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 296
295 const StreamDeviceInfo device_info = source_data->device_info(); 297 const StreamDeviceInfo device_info = source_data->device_info();
296 if (IsAudioMediaType(device_info.device.type)) { 298 if (IsAudioMediaType(device_info.device.type)) {
297 if (!InitializeAudioSource(render_view_id, device_info)) { 299 if (!InitializeAudioSource(render_view_id, device_info)) {
298 DLOG(WARNING) << "Unsupported audio source"; 300 DLOG(WARNING) << "Unsupported audio source";
299 sources_created.Run(description, false); 301 sources_created.Run(description, false);
300 return; 302 return;
301 } 303 }
302 } 304 }
303 305
306 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
307 // TODO(grunell): Change hard coded string to
308 // RTCMediaConstraints::kInternalAecDump when libjingle has been rolled.
309 if (command_line.HasSwitch(switches::kEnableWebRtcAecRecordings)) {
310 native_audio_constraints.AddOptional(
311 "internalAecDump", "true");
312 }
313
304 // Creates a LocalAudioSource object which holds audio options. 314 // Creates a LocalAudioSource object which holds audio options.
305 source_data->SetLocalAudioSource( 315 source_data->SetLocalAudioSource(
306 CreateLocalAudioSource(&native_audio_constraints)); 316 CreateLocalAudioSource(&native_audio_constraints));
307 source_observer->AddSource(source_data->local_audio_source()); 317 source_observer->AddSource(source_data->local_audio_source());
308 } 318 }
309 319
310 source_observer->StartObservering(); 320 source_observer->StartObservering();
311 } 321 }
312 322
313 void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( 323 void MediaStreamDependencyFactory::CreateNativeLocalMediaStream(
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 WebRtcLoggingMessageFilter* filter, 791 WebRtcLoggingMessageFilter* filter,
782 const std::string& app_session_id) { 792 const std::string& app_session_id) {
783 WebRtcLoggingHandlerImpl* handler = 793 WebRtcLoggingHandlerImpl* handler =
784 new WebRtcLoggingHandlerImpl(filter->io_message_loop()); 794 new WebRtcLoggingHandlerImpl(filter->io_message_loop());
785 795
786 // TODO(grunell): Give app session id as parameter. 796 // TODO(grunell): Give app session id as parameter.
787 filter->InitLogging(handler); 797 filter->InitLogging(handler);
788 } 798 }
789 799
790 } // namespace content 800 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/media/rtc_media_constraints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698