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

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

Issue 133903004: Cleaned up the WebRtcAudioCapturer a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed the debugging DLOG. Created 6 years, 11 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/mock_media_stream_dependency_factory.h" 5 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/renderer/media/mock_peer_connection_impl.h" 9 #include "content/renderer/media/mock_peer_connection_impl.h"
10 #include "content/renderer/media/webaudio_capturer_source.h" 10 #include "content/renderer/media/webaudio_capturer_source.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 448 }
449 449
450 scoped_refptr<webrtc::AudioTrackInterface> 450 scoped_refptr<webrtc::AudioTrackInterface>
451 MockMediaStreamDependencyFactory::CreateLocalAudioTrack( 451 MockMediaStreamDependencyFactory::CreateLocalAudioTrack(
452 const std::string& id, 452 const std::string& id,
453 const scoped_refptr<WebRtcAudioCapturer>& capturer, 453 const scoped_refptr<WebRtcAudioCapturer>& capturer,
454 WebAudioCapturerSource* webaudio_source, 454 WebAudioCapturerSource* webaudio_source,
455 webrtc::AudioSourceInterface* source, 455 webrtc::AudioSourceInterface* source,
456 const webrtc::MediaConstraintsInterface* constraints) { 456 const webrtc::MediaConstraintsInterface* constraints) {
457 DCHECK(mock_pc_factory_created_); 457 DCHECK(mock_pc_factory_created_);
458 DCHECK(!capturer.get()); 458 scoped_refptr<WebRtcAudioCapturer> audio_capturer = capturer ?
perkj_chrome 2014/01/12 21:53:06 This seem strange. Why don't you know if you must
no longer working on chromium 2014/01/13 16:59:59 Previously the capturer is got from WebRtcAudioDev
459 capturer : WebRtcAudioCapturer::CreateCapturer(-1, StreamDeviceInfo());
459 return WebRtcLocalAudioTrack::Create( 460 return WebRtcLocalAudioTrack::Create(
460 id, WebRtcAudioCapturer::CreateCapturer(), webaudio_source, 461 id, audio_capturer, webaudio_source, source, constraints);
461 source, constraints);
462 } 462 }
463 463
464 SessionDescriptionInterface* 464 SessionDescriptionInterface*
465 MockMediaStreamDependencyFactory::CreateSessionDescription( 465 MockMediaStreamDependencyFactory::CreateSessionDescription(
466 const std::string& type, 466 const std::string& type,
467 const std::string& sdp, 467 const std::string& sdp,
468 webrtc::SdpParseError* error) { 468 webrtc::SdpParseError* error) {
469 return new MockSessionDescription(type, sdp); 469 return new MockSessionDescription(type, sdp);
470 } 470 }
471 471
472 webrtc::IceCandidateInterface* 472 webrtc::IceCandidateInterface*
473 MockMediaStreamDependencyFactory::CreateIceCandidate( 473 MockMediaStreamDependencyFactory::CreateIceCandidate(
474 const std::string& sdp_mid, 474 const std::string& sdp_mid,
475 int sdp_mline_index, 475 int sdp_mline_index,
476 const std::string& sdp) { 476 const std::string& sdp) {
477 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 477 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
478 } 478 }
479 479
480 scoped_refptr<WebRtcAudioCapturer> 480 scoped_refptr<WebRtcAudioCapturer>
481 MockMediaStreamDependencyFactory::MaybeCreateAudioCapturer( 481 MockMediaStreamDependencyFactory::CreateAudioCapturer(
482 int render_view_id, const StreamDeviceInfo& device_info) { 482 int render_view_id, const StreamDeviceInfo& device_info) {
483 return WebRtcAudioCapturer::CreateCapturer(); 483 return WebRtcAudioCapturer::CreateCapturer(-1, device_info);
484 } 484 }
485 485
486 } // namespace content 486 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698