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

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

Issue 212973002: Refactor VideoDestinationHandler to implement MediaStreamVideoSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 class MockRtcVideoCapturer : public WebRtcVideoCapturerAdapter { 123 class MockRtcVideoCapturer : public WebRtcVideoCapturerAdapter {
124 public: 124 public:
125 explicit MockRtcVideoCapturer(bool is_screencast) 125 explicit MockRtcVideoCapturer(bool is_screencast)
126 : WebRtcVideoCapturerAdapter(is_screencast), 126 : WebRtcVideoCapturerAdapter(is_screencast),
127 number_of_capturered_frames_(0), 127 number_of_capturered_frames_(0),
128 width_(0), 128 width_(0),
129 height_(0) { 129 height_(0) {
130 } 130 }
131 131
132 virtual void SetRequestedFormat(
133 const media::VideoCaptureFormat& format) OVERRIDE {
134 }
135
136 virtual void OnFrameCaptured( 132 virtual void OnFrameCaptured(
137 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE { 133 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE {
138 ++number_of_capturered_frames_; 134 ++number_of_capturered_frames_;
139 width_ = frame->visible_rect().width(); 135 width_ = frame->visible_rect().width();
140 height_ = frame->visible_rect().height(); 136 height_ = frame->visible_rect().height();
141 } 137 }
142 138
143 int GetLastFrameWidth() const { 139 int GetLastFrameWidth() const {
144 return width_; 140 return width_;
145 } 141 }
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, 518 return WebRtcAudioCapturer::CreateCapturer(-1, device_info,
523 constraints, NULL); 519 constraints, NULL);
524 } 520 }
525 521
526 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( 522 void MockMediaStreamDependencyFactory::StartLocalAudioTrack(
527 WebRtcLocalAudioTrack* audio_track) { 523 WebRtcLocalAudioTrack* audio_track) {
528 return; 524 return;
529 } 525 }
530 526
531 } // namespace content 527 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698