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

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: Removed unused file. 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 scoped_refptr<webrtc::AudioSourceInterface> 412 scoped_refptr<webrtc::AudioSourceInterface>
413 MockMediaStreamDependencyFactory::CreateLocalAudioSource( 413 MockMediaStreamDependencyFactory::CreateLocalAudioSource(
414 const webrtc::MediaConstraintsInterface* constraints) { 414 const webrtc::MediaConstraintsInterface* constraints) {
415 last_audio_source_ = 415 last_audio_source_ =
416 new talk_base::RefCountedObject<MockAudioSource>(constraints); 416 new talk_base::RefCountedObject<MockAudioSource>(constraints);
417 return last_audio_source_; 417 return last_audio_source_;
418 } 418 }
419 419
420 scoped_refptr<webrtc::VideoSourceInterface> 420 cricket::VideoCapturer* MockMediaStreamDependencyFactory::CreateVideoCapturer(
421 MockMediaStreamDependencyFactory::CreateLocalVideoSource( 421 const StreamDeviceInfo& info) {
422 int video_session_id, 422 return NULL;
423 bool is_screencast,
424 const webrtc::MediaConstraintsInterface* constraints) {
425 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
426 return last_video_source_;
427 } 423 }
428 424
429 scoped_refptr<webrtc::VideoSourceInterface> 425 scoped_refptr<webrtc::VideoSourceInterface>
430 MockMediaStreamDependencyFactory::CreateVideoSource( 426 MockMediaStreamDependencyFactory::CreateVideoSource(
431 cricket::VideoCapturer* capturer, 427 cricket::VideoCapturer* capturer,
432 const webrtc::MediaConstraintsInterface* constraints) { 428 const webrtc::MediaConstraintsInterface* constraints) {
433 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>(); 429 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
434 last_video_source_->SetVideoCapturer(capturer); 430 last_video_source_->SetVideoCapturer(capturer);
435 return last_video_source_; 431 return last_video_source_;
436 } 432 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 498 }
503 499
504 scoped_refptr<WebRtcAudioCapturer> 500 scoped_refptr<WebRtcAudioCapturer>
505 MockMediaStreamDependencyFactory::MaybeCreateAudioCapturer( 501 MockMediaStreamDependencyFactory::MaybeCreateAudioCapturer(
506 int render_view_id, const StreamDeviceInfo& device_info, 502 int render_view_id, const StreamDeviceInfo& device_info,
507 const blink::WebMediaConstraints& constraints) { 503 const blink::WebMediaConstraints& constraints) {
508 return WebRtcAudioCapturer::CreateCapturer(); 504 return WebRtcAudioCapturer::CreateCapturer();
509 } 505 }
510 506
511 } // namespace content 507 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698