OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { | 176 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { |
177 return stats_; | 177 return stats_; |
178 } | 178 } |
179 | 179 |
180 void FakeVideoSendStream::ReconfigureVideoEncoder( | 180 void FakeVideoSendStream::ReconfigureVideoEncoder( |
181 webrtc::VideoEncoderConfig config) { | 181 webrtc::VideoEncoderConfig config) { |
182 if (config.encoder_specific_settings != NULL) { | 182 if (config.encoder_specific_settings != NULL) { |
183 if (config_.encoder_settings.payload_name == "VP8") { | 183 if (config_.encoder_settings.payload_name == "VP8") { |
184 vpx_settings_.vp8 = *reinterpret_cast<const webrtc::VideoCodecVP8*>( | 184 config.encoder_specific_settings->FillVideoCodecVp8(&vpx_settings_.vp8); |
185 config.encoder_specific_settings); | |
186 if (!config.streams.empty()) { | 185 if (!config.streams.empty()) { |
187 vpx_settings_.vp8.numberOfTemporalLayers = static_cast<unsigned char>( | 186 vpx_settings_.vp8.numberOfTemporalLayers = static_cast<unsigned char>( |
188 config.streams.back().temporal_layer_thresholds_bps.size() + 1); | 187 config.streams.back().temporal_layer_thresholds_bps.size() + 1); |
189 } | 188 } |
190 } else if (config_.encoder_settings.payload_name == "VP9") { | 189 } else if (config_.encoder_settings.payload_name == "VP9") { |
191 vpx_settings_.vp9 = *reinterpret_cast<const webrtc::VideoCodecVP9*>( | 190 config.encoder_specific_settings->FillVideoCodecVp9(&vpx_settings_.vp9); |
192 config.encoder_specific_settings); | |
193 if (!config.streams.empty()) { | 191 if (!config.streams.empty()) { |
194 vpx_settings_.vp9.numberOfTemporalLayers = static_cast<unsigned char>( | 192 vpx_settings_.vp9.numberOfTemporalLayers = static_cast<unsigned char>( |
195 config.streams.back().temporal_layer_thresholds_bps.size() + 1); | 193 config.streams.back().temporal_layer_thresholds_bps.size() + 1); |
196 } | 194 } |
197 } else { | 195 } else { |
198 ADD_FAILURE() << "Unsupported encoder payload: " | 196 ADD_FAILURE() << "Unsupported encoder payload: " |
199 << config_.encoder_settings.payload_name; | 197 << config_.encoder_settings.payload_name; |
200 } | 198 } |
201 } | 199 } |
202 encoder_config_ = std::move(config); | 200 encoder_config_ = std::move(config); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 } | 478 } |
481 | 479 |
482 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, | 480 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, |
483 int64_t max_size_bytes) { | 481 int64_t max_size_bytes) { |
484 return false; | 482 return false; |
485 } | 483 } |
486 | 484 |
487 void FakeCall::StopEventLog() {} | 485 void FakeCall::StopEventLog() {} |
488 | 486 |
489 } // namespace cricket | 487 } // namespace cricket |
OLD | NEW |