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

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: Rebased 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return 278 return
278 static_cast<MockRtcVideoCapturer*>(capturer_.get())->GetLastFrameHeight(); 279 static_cast<MockRtcVideoCapturer*>(capturer_.get())->GetLastFrameHeight();
279 } 280 }
280 281
281 int MockVideoSource::GetFrameNum() const { 282 int MockVideoSource::GetFrameNum() const {
282 DCHECK(capturer_); 283 DCHECK(capturer_);
283 return static_cast<MockRtcVideoCapturer*>(capturer_.get())->GetFrameNum(); 284 return static_cast<MockRtcVideoCapturer*>(capturer_.get())->GetFrameNum();
284 } 285 }
285 286
286 MockWebRtcVideoTrack::MockWebRtcVideoTrack( 287 MockWebRtcVideoTrack::MockWebRtcVideoTrack(
287 std::string id, 288 std::string id,
tommi (sloooow) - chröme 2014/04/07 10:05:44 const &
perkj_chrome 2014/04/07 15:33:52 Done.
288 webrtc::VideoSourceInterface* source) 289 webrtc::VideoSourceInterface* source)
289 : enabled_(false), 290 : enabled_(false),
290 id_(id), 291 id_(id),
291 state_(MediaStreamTrackInterface::kLive), 292 state_(MediaStreamTrackInterface::kLive),
292 source_(source), 293 source_(source),
293 observer_(NULL), 294 observer_(NULL),
294 renderer_(NULL) { 295 renderer_(NULL) {
295 } 296 }
296 297
297 MockWebRtcVideoTrack::~MockWebRtcVideoTrack() {} 298 MockWebRtcVideoTrack::~MockWebRtcVideoTrack() {}
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 MockMediaStreamDependencyFactory::CreateIceCandidate( 514 MockMediaStreamDependencyFactory::CreateIceCandidate(
514 const std::string& sdp_mid, 515 const std::string& sdp_mid,
515 int sdp_mline_index, 516 int sdp_mline_index,
516 const std::string& sdp) { 517 const std::string& sdp) {
517 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 518 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
518 } 519 }
519 520
520 scoped_refptr<WebRtcAudioCapturer> 521 scoped_refptr<WebRtcAudioCapturer>
521 MockMediaStreamDependencyFactory::CreateAudioCapturer( 522 MockMediaStreamDependencyFactory::CreateAudioCapturer(
522 int render_view_id, const StreamDeviceInfo& device_info, 523 int render_view_id, const StreamDeviceInfo& device_info,
523 const blink::WebMediaConstraints& constraints) { 524 const blink::WebMediaConstraints& constraints,
525 MediaStreamAudioSource* audio_source) {
526 DCHECK(audio_source);
524 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, 527 return WebRtcAudioCapturer::CreateCapturer(-1, device_info,
525 constraints, NULL); 528 constraints, NULL, audio_source);
526 } 529 }
527 530
528 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( 531 void MockMediaStreamDependencyFactory::StartLocalAudioTrack(
529 WebRtcLocalAudioTrack* audio_track) { 532 WebRtcLocalAudioTrack* audio_track) {
530 return; 533 audio_track->Start();
531 } 534 }
532 535
533 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698