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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 393 }
394 394
395 scoped_refptr<webrtc::AudioSourceInterface> 395 scoped_refptr<webrtc::AudioSourceInterface>
396 MockMediaStreamDependencyFactory::CreateLocalAudioSource( 396 MockMediaStreamDependencyFactory::CreateLocalAudioSource(
397 const webrtc::MediaConstraintsInterface* constraints) { 397 const webrtc::MediaConstraintsInterface* constraints) {
398 last_audio_source_ = 398 last_audio_source_ =
399 new talk_base::RefCountedObject<MockAudioSource>(constraints); 399 new talk_base::RefCountedObject<MockAudioSource>(constraints);
400 return last_audio_source_; 400 return last_audio_source_;
401 } 401 }
402 402
403 cricket::VideoCapturer* MockMediaStreamDependencyFactory::CreateVideoCapturer(
404 const StreamDeviceInfo& info) {
405 return NULL;
406 }
407
403 scoped_refptr<webrtc::VideoSourceInterface> 408 scoped_refptr<webrtc::VideoSourceInterface>
404 MockMediaStreamDependencyFactory::CreateLocalVideoSource( 409 MockMediaStreamDependencyFactory::CreateLocalVideoSource(
405 int video_session_id, 410 cricket::VideoCapturer* capturer,
406 bool is_screencast, 411 const blink::WebMediaConstraints& video_constraints) {
407 const webrtc::MediaConstraintsInterface* constraints) {
408 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>(); 412 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
409 return last_video_source_; 413 return last_video_source_;
410 } 414 }
411 415
412 scoped_refptr<WebAudioCapturerSource> 416 scoped_refptr<WebAudioCapturerSource>
413 MockMediaStreamDependencyFactory::CreateWebAudioSource( 417 MockMediaStreamDependencyFactory::CreateWebAudioSource(
414 blink::WebMediaStreamSource* source, 418 blink::WebMediaStreamSource* source,
415 RTCMediaConstraints* constraints) { 419 RTCMediaConstraints* constraints) {
416 return NULL; 420 return NULL;
417 } 421 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 481 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
478 } 482 }
479 483
480 scoped_refptr<WebRtcAudioCapturer> 484 scoped_refptr<WebRtcAudioCapturer>
481 MockMediaStreamDependencyFactory::MaybeCreateAudioCapturer( 485 MockMediaStreamDependencyFactory::MaybeCreateAudioCapturer(
482 int render_view_id, const StreamDeviceInfo& device_info) { 486 int render_view_id, const StreamDeviceInfo& device_info) {
483 return WebRtcAudioCapturer::CreateCapturer(); 487 return WebRtcAudioCapturer::CreateCapturer();
484 } 488 }
485 489
486 } // namespace content 490 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698