OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webrtc/mock_peer_connection_dependency_factory. h" | 5 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 int height_; | 157 int height_; |
158 }; | 158 }; |
159 | 159 |
160 MockVideoRenderer::MockVideoRenderer() | 160 MockVideoRenderer::MockVideoRenderer() |
161 : width_(0), | 161 : width_(0), |
162 height_(0), | 162 height_(0), |
163 num_(0) {} | 163 num_(0) {} |
164 | 164 |
165 MockVideoRenderer::~MockVideoRenderer() {} | 165 MockVideoRenderer::~MockVideoRenderer() {} |
166 | 166 |
167 bool MockVideoRenderer::SetSize(int width, int height, int reserved) { | |
168 width_ = width; | |
perkj_chrome
2016/01/12 17:02:33
please also remove width_ and height and their acc
nisse-chromium (ooo August 14)
2016/01/13 07:47:52
Done. I thought they were used, but I mixed it up
| |
169 height_ = height; | |
170 return true; | |
171 } | |
172 | |
173 bool MockVideoRenderer::RenderFrame(const cricket::VideoFrame* frame) { | 167 bool MockVideoRenderer::RenderFrame(const cricket::VideoFrame* frame) { |
174 ++num_; | 168 ++num_; |
175 return true; | 169 return true; |
176 } | 170 } |
177 | 171 |
178 MockAudioSource::MockAudioSource( | 172 MockAudioSource::MockAudioSource( |
179 const webrtc::MediaConstraintsInterface* constraints, bool remote) | 173 const webrtc::MediaConstraintsInterface* constraints, bool remote) |
180 : remote_(remote), state_(MediaSourceInterface::kLive), | 174 : remote_(remote), state_(MediaSourceInterface::kLive), |
181 optional_constraints_(constraints->GetOptional()), | 175 optional_constraints_(constraints->GetOptional()), |
182 mandatory_constraints_(constraints->GetMandatory()) { | 176 mandatory_constraints_(constraints->GetMandatory()) { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
539 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, constraints, NULL, | 533 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, constraints, NULL, |
540 audio_source); | 534 audio_source); |
541 } | 535 } |
542 | 536 |
543 void MockPeerConnectionDependencyFactory::StartLocalAudioTrack( | 537 void MockPeerConnectionDependencyFactory::StartLocalAudioTrack( |
544 WebRtcLocalAudioTrack* audio_track) { | 538 WebRtcLocalAudioTrack* audio_track) { |
545 audio_track->Start(); | 539 audio_track->Start(); |
546 } | 540 } |
547 | 541 |
548 } // namespace content | 542 } // namespace content |
OLD | NEW |