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 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { | 175 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { |
176 return stats_; | 176 return stats_; |
177 } | 177 } |
178 | 178 |
179 void FakeVideoSendStream::ReconfigureVideoEncoder( | 179 void FakeVideoSendStream::ReconfigureVideoEncoder( |
180 const webrtc::VideoEncoderConfig& config) { | 180 const webrtc::VideoEncoderConfig& config) { |
181 encoder_config_ = config; | 181 encoder_config_ = 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 codec_settings_set_ = config.encoder_specific_settings != NULL; | 200 codec_settings_set_ = config.encoder_specific_settings != NULL; |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 } | 477 } |
480 | 478 |
481 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, | 479 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, |
482 int64_t max_size_bytes) { | 480 int64_t max_size_bytes) { |
483 return false; | 481 return false; |
484 } | 482 } |
485 | 483 |
486 void FakeCall::StopEventLog() {} | 484 void FakeCall::StopEventLog() {} |
487 | 485 |
488 } // namespace cricket | 486 } // namespace cricket |
OLD | NEW |