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

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

Issue 218763007: Update MediaStreamTrack::Stop to latest draft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments and added tests. Created 6 years, 8 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"
11 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" 11 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
12 #include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h" 12 #include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h"
13 #include "content/renderer/media/webrtc_audio_capturer.h" 13 #include "content/renderer/media/webrtc_audio_capturer.h"
14 #include "content/renderer/media/webrtc_local_audio_track.h"
14 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 15 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
15 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" 16 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
16 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h" 17 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h"
17 #include "third_party/libjingle/source/talk/media/base/videocapturer.h" 18 #include "third_party/libjingle/source/talk/media/base/videocapturer.h"
18 19
19 using webrtc::AudioSourceInterface; 20 using webrtc::AudioSourceInterface;
20 using webrtc::AudioTrackInterface; 21 using webrtc::AudioTrackInterface;
21 using webrtc::AudioTrackVector; 22 using webrtc::AudioTrackVector;
22 using webrtc::IceCandidateCollection; 23 using webrtc::IceCandidateCollection;
23 using webrtc::IceCandidateInterface; 24 using webrtc::IceCandidateInterface;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 MockMediaStreamDependencyFactory::CreateIceCandidate( 513 MockMediaStreamDependencyFactory::CreateIceCandidate(
513 const std::string& sdp_mid, 514 const std::string& sdp_mid,
514 int sdp_mline_index, 515 int sdp_mline_index,
515 const std::string& sdp) { 516 const std::string& sdp) {
516 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 517 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
517 } 518 }
518 519
519 scoped_refptr<WebRtcAudioCapturer> 520 scoped_refptr<WebRtcAudioCapturer>
520 MockMediaStreamDependencyFactory::CreateAudioCapturer( 521 MockMediaStreamDependencyFactory::CreateAudioCapturer(
521 int render_view_id, const StreamDeviceInfo& device_info, 522 int render_view_id, const StreamDeviceInfo& device_info,
522 const blink::WebMediaConstraints& constraints) { 523 const blink::WebMediaConstraints& constraints,
524 MediaStreamAudioSource* audio_source) {
525 DCHECK(audio_source);
523 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, 526 return WebRtcAudioCapturer::CreateCapturer(-1, device_info,
524 constraints, NULL); 527 constraints, NULL, audio_source);
525 } 528 }
526 529
527 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( 530 void MockMediaStreamDependencyFactory::StartLocalAudioTrack(
528 WebRtcLocalAudioTrack* audio_track) { 531 WebRtcLocalAudioTrack* audio_track) {
532 audio_track->Start();
529 return; 533 return;
tommi (sloooow) - chröme 2014/04/03 08:53:16 nit: remove this line
perkj_chrome 2014/04/03 11:58:34 Done.
530 } 534 }
531 535
532 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698