| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 const VideoSendStream::Config::EncoderSettings& settings, | 380 const VideoSendStream::Config::EncoderSettings& settings, |
| 381 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, | 381 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, |
| 382 EncodedFrameObserver* encoder_timing, | 382 EncodedFrameObserver* encoder_timing, |
| 383 std::unique_ptr<OveruseFrameDetector> overuse_detector) | 383 std::unique_ptr<OveruseFrameDetector> overuse_detector) |
| 384 : shutdown_event_(true /* manual_reset */, false), | 384 : shutdown_event_(true /* manual_reset */, false), |
| 385 number_of_cores_(number_of_cores), | 385 number_of_cores_(number_of_cores), |
| 386 initial_rampup_(0), | 386 initial_rampup_(0), |
| 387 source_proxy_(new VideoSourceProxy(this)), | 387 source_proxy_(new VideoSourceProxy(this)), |
| 388 sink_(nullptr), | 388 sink_(nullptr), |
| 389 settings_(settings), | 389 settings_(settings), |
| 390 codec_type_(PayloadNameToCodecType(settings.payload_name) | 390 codec_type_(PayloadStringToCodecType(settings.payload_name)), |
| 391 .value_or(VideoCodecType::kVideoCodecUnknown)), | |
| 392 video_sender_(Clock::GetRealTimeClock(), this, this), | 391 video_sender_(Clock::GetRealTimeClock(), this, this), |
| 393 overuse_detector_( | 392 overuse_detector_( |
| 394 overuse_detector.get() | 393 overuse_detector.get() |
| 395 ? overuse_detector.release() | 394 ? overuse_detector.release() |
| 396 : new OveruseFrameDetector( | 395 : new OveruseFrameDetector( |
| 397 GetCpuOveruseOptions(settings.full_overuse_time), | 396 GetCpuOveruseOptions(settings.full_overuse_time), |
| 398 this, | 397 this, |
| 399 encoder_timing, | 398 encoder_timing, |
| 400 stats_proxy)), | 399 stats_proxy)), |
| 401 stats_proxy_(stats_proxy), | 400 stats_proxy_(stats_proxy), |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 std::string VideoStreamEncoder::AdaptCounter::ToString( | 1251 std::string VideoStreamEncoder::AdaptCounter::ToString( |
| 1253 const std::vector<int>& counters) const { | 1252 const std::vector<int>& counters) const { |
| 1254 std::stringstream ss; | 1253 std::stringstream ss; |
| 1255 for (size_t reason = 0; reason < kScaleReasonSize; ++reason) { | 1254 for (size_t reason = 0; reason < kScaleReasonSize; ++reason) { |
| 1256 ss << (reason ? " cpu" : "quality") << ":" << counters[reason]; | 1255 ss << (reason ? " cpu" : "quality") << ":" << counters[reason]; |
| 1257 } | 1256 } |
| 1258 return ss.str(); | 1257 return ss.str(); |
| 1259 } | 1258 } |
| 1260 | 1259 |
| 1261 } // namespace webrtc | 1260 } // namespace webrtc |
| OLD | NEW |