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

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

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after review from Chris Created 7 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 "content/renderer/media/mock_peer_connection_impl.h" 8 #include "content/renderer/media/mock_peer_connection_impl.h"
9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
10 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h" 10 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 scoped_refptr<webrtc::VideoSourceInterface> 342 scoped_refptr<webrtc::VideoSourceInterface>
343 MockMediaStreamDependencyFactory::CreateVideoSource( 343 MockMediaStreamDependencyFactory::CreateVideoSource(
344 int video_session_id, 344 int video_session_id,
345 bool is_screencast, 345 bool is_screencast,
346 const webrtc::MediaConstraintsInterface* constraints) { 346 const webrtc::MediaConstraintsInterface* constraints) {
347 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>(); 347 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
348 return last_video_source_; 348 return last_video_source_;
349 } 349 }
350 350
351 bool MockMediaStreamDependencyFactory::InitializeAudioSource(
352 const StreamDeviceInfo& device_info) {
353 return true;
354 }
355
356 bool MockMediaStreamDependencyFactory::CreateWebAudioSource(
357 WebKit::WebMediaStreamSource* source) {
358 return true;
359 }
360
351 scoped_refptr<webrtc::LocalMediaStreamInterface> 361 scoped_refptr<webrtc::LocalMediaStreamInterface>
352 MockMediaStreamDependencyFactory::CreateLocalMediaStream( 362 MockMediaStreamDependencyFactory::CreateLocalMediaStream(
353 const std::string& label) { 363 const std::string& label) {
354 DCHECK(mock_pc_factory_created_); 364 DCHECK(mock_pc_factory_created_);
355 return new talk_base::RefCountedObject<MockLocalMediaStream>(label); 365 return new talk_base::RefCountedObject<MockLocalMediaStream>(label);
356 } 366 }
357 367
358 scoped_refptr<webrtc::VideoTrackInterface> 368 scoped_refptr<webrtc::VideoTrackInterface>
359 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( 369 MockMediaStreamDependencyFactory::CreateLocalVideoTrack(
360 const std::string& id, 370 const std::string& id,
(...skipping 23 matching lines...) Expand all
384 } 394 }
385 395
386 webrtc::IceCandidateInterface* 396 webrtc::IceCandidateInterface*
387 MockMediaStreamDependencyFactory::CreateIceCandidate( 397 MockMediaStreamDependencyFactory::CreateIceCandidate(
388 const std::string& sdp_mid, 398 const std::string& sdp_mid,
389 int sdp_mline_index, 399 int sdp_mline_index,
390 const std::string& sdp) { 400 const std::string& sdp) {
391 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 401 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
392 } 402 }
393 403
394 void MockMediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) {
395 }
396
397 } // namespace content 404 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_dependency_factory.h ('k') | content/renderer/media/webaudio_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698