OLD | NEW |
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 height_(0) { | 129 height_(0) { |
130 } | 130 } |
131 | 131 |
132 virtual void SetRequestedFormat( | 132 virtual void SetRequestedFormat( |
133 const media::VideoCaptureFormat& format) OVERRIDE { | 133 const media::VideoCaptureFormat& format) OVERRIDE { |
134 } | 134 } |
135 | 135 |
136 virtual void OnFrameCaptured( | 136 virtual void OnFrameCaptured( |
137 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE { | 137 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE { |
138 ++number_of_capturered_frames_; | 138 ++number_of_capturered_frames_; |
139 width_ = frame->coded_size().width(); | 139 width_ = frame->visible_rect().width(); |
140 height_ = frame->coded_size().height(); | 140 height_ = frame->visible_rect().height(); |
141 } | 141 } |
142 | 142 |
143 int GetLastFrameWidth() const { | 143 int GetLastFrameWidth() const { |
144 return width_; | 144 return width_; |
145 } | 145 } |
146 | 146 |
147 int GetLastFrameHeight() const { | 147 int GetLastFrameHeight() const { |
148 return height_; | 148 return height_; |
149 } | 149 } |
150 | 150 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, | 522 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, |
523 constraints, NULL); | 523 constraints, NULL); |
524 } | 524 } |
525 | 525 |
526 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( | 526 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( |
527 WebRtcLocalAudioTrack* audio_track) { | 527 WebRtcLocalAudioTrack* audio_track) { |
528 return; | 528 return; |
529 } | 529 } |
530 | 530 |
531 } // namespace content | 531 } // namespace content |
OLD | NEW |