| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 return number_of_capturered_frames_; | 151 return number_of_capturered_frames_; |
| 152 } | 152 } |
| 153 | 153 |
| 154 private: | 154 private: |
| 155 int number_of_capturered_frames_; | 155 int number_of_capturered_frames_; |
| 156 int width_; | 156 int width_; |
| 157 int height_; | 157 int height_; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 MockVideoRenderer::MockVideoRenderer() | 160 MockVideoRenderer::MockVideoRenderer() |
| 161 : width_(0), | 161 : num_(0) {} |
| 162 height_(0), | |
| 163 num_(0) {} | |
| 164 | 162 |
| 165 MockVideoRenderer::~MockVideoRenderer() {} | 163 MockVideoRenderer::~MockVideoRenderer() {} |
| 166 | 164 |
| 167 bool MockVideoRenderer::SetSize(int width, int height, int reserved) { | |
| 168 width_ = width; | |
| 169 height_ = height; | |
| 170 return true; | |
| 171 } | |
| 172 | |
| 173 bool MockVideoRenderer::RenderFrame(const cricket::VideoFrame* frame) { | 165 bool MockVideoRenderer::RenderFrame(const cricket::VideoFrame* frame) { |
| 174 ++num_; | 166 ++num_; |
| 175 return true; | 167 return true; |
| 176 } | 168 } |
| 177 | 169 |
| 178 MockAudioSource::MockAudioSource( | 170 MockAudioSource::MockAudioSource( |
| 179 const webrtc::MediaConstraintsInterface* constraints, bool remote) | 171 const webrtc::MediaConstraintsInterface* constraints, bool remote) |
| 180 : remote_(remote), state_(MediaSourceInterface::kLive), | 172 : remote_(remote), state_(MediaSourceInterface::kLive), |
| 181 optional_constraints_(constraints->GetOptional()), | 173 optional_constraints_(constraints->GetOptional()), |
| 182 mandatory_constraints_(constraints->GetMandatory()) { | 174 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, | 531 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, constraints, NULL, |
| 540 audio_source); | 532 audio_source); |
| 541 } | 533 } |
| 542 | 534 |
| 543 void MockPeerConnectionDependencyFactory::StartLocalAudioTrack( | 535 void MockPeerConnectionDependencyFactory::StartLocalAudioTrack( |
| 544 WebRtcLocalAudioTrack* audio_track) { | 536 WebRtcLocalAudioTrack* audio_track) { |
| 545 audio_track->Start(); | 537 audio_track->Start(); |
| 546 } | 538 } |
| 547 | 539 |
| 548 } // namespace content | 540 } // namespace content |
| OLD | NEW |