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

Side by Side Diff: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc

Issue 1780653002: Revert of MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/webrtc/mock_peer_connection_dependency_factory. h" 5 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 scoped_refptr<webrtc::VideoTrackSourceInterface> 363 scoped_refptr<webrtc::VideoTrackSourceInterface>
364 MockPeerConnectionDependencyFactory::CreateVideoSource( 364 MockPeerConnectionDependencyFactory::CreateVideoSource(
365 cricket::VideoCapturer* capturer, 365 cricket::VideoCapturer* capturer,
366 const blink::WebMediaConstraints& constraints) { 366 const blink::WebMediaConstraints& constraints) {
367 // Video source normally take ownership of |capturer|. 367 // Video source normally take ownership of |capturer|.
368 delete capturer; 368 delete capturer;
369 NOTIMPLEMENTED(); 369 NOTIMPLEMENTED();
370 return nullptr; 370 return nullptr;
371 } 371 }
372 372
373 void MockPeerConnectionDependencyFactory::CreateWebAudioSource( 373 scoped_refptr<WebAudioCapturerSource>
374 blink::WebMediaStreamSource* source) {} 374 MockPeerConnectionDependencyFactory::CreateWebAudioSource(
375 blink::WebMediaStreamSource* source) {
376 return NULL;
377 }
375 378
376 scoped_refptr<webrtc::MediaStreamInterface> 379 scoped_refptr<webrtc::MediaStreamInterface>
377 MockPeerConnectionDependencyFactory::CreateLocalMediaStream( 380 MockPeerConnectionDependencyFactory::CreateLocalMediaStream(
378 const std::string& label) { 381 const std::string& label) {
379 return new rtc::RefCountedObject<MockMediaStream>(label); 382 return new rtc::RefCountedObject<MockMediaStream>(label);
380 } 383 }
381 384
382 scoped_refptr<webrtc::VideoTrackInterface> 385 scoped_refptr<webrtc::VideoTrackInterface>
383 MockPeerConnectionDependencyFactory::CreateLocalVideoTrack( 386 MockPeerConnectionDependencyFactory::CreateLocalVideoTrack(
384 const std::string& id, 387 const std::string& id,
(...skipping 20 matching lines...) Expand all
405 } 408 }
406 409
407 webrtc::IceCandidateInterface* 410 webrtc::IceCandidateInterface*
408 MockPeerConnectionDependencyFactory::CreateIceCandidate( 411 MockPeerConnectionDependencyFactory::CreateIceCandidate(
409 const std::string& sdp_mid, 412 const std::string& sdp_mid,
410 int sdp_mline_index, 413 int sdp_mline_index,
411 const std::string& sdp) { 414 const std::string& sdp) {
412 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 415 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
413 } 416 }
414 417
415 scoped_ptr<WebRtcAudioCapturer> 418 scoped_refptr<WebRtcAudioCapturer>
416 MockPeerConnectionDependencyFactory::CreateAudioCapturer( 419 MockPeerConnectionDependencyFactory::CreateAudioCapturer(
417 int render_frame_id, 420 int render_frame_id,
418 const StreamDeviceInfo& device_info, 421 const StreamDeviceInfo& device_info,
419 const blink::WebMediaConstraints& constraints, 422 const blink::WebMediaConstraints& constraints,
420 MediaStreamAudioSource* audio_source) { 423 MediaStreamAudioSource* audio_source) {
421 if (fail_to_create_next_audio_capturer_) { 424 if (fail_to_create_next_audio_capturer_) {
422 fail_to_create_next_audio_capturer_ = false; 425 fail_to_create_next_audio_capturer_ = false;
423 return NULL; 426 return NULL;
424 } 427 }
425 DCHECK(audio_source); 428 DCHECK(audio_source);
426 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, constraints, NULL, 429 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, constraints, NULL,
427 audio_source); 430 audio_source);
428 } 431 }
429 432
433 void MockPeerConnectionDependencyFactory::StartLocalAudioTrack(
434 WebRtcLocalAudioTrack* audio_track) {
435 audio_track->Start();
436 }
437
430 } // namespace content 438 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698