| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 size_t max_data_payload_length_; | 71 size_t max_data_payload_length_; |
| 72 bool nack_enabled_; | 72 bool nack_enabled_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class ViEEncoder::EncodeTask : public rtc::QueuedTask { | 75 class ViEEncoder::EncodeTask : public rtc::QueuedTask { |
| 76 public: | 76 public: |
| 77 EncodeTask(const VideoFrame& frame, | 77 EncodeTask(const VideoFrame& frame, |
| 78 ViEEncoder* vie_encoder, | 78 ViEEncoder* vie_encoder, |
| 79 int64_t time_when_posted_in_ms, | 79 int64_t time_when_posted_in_ms, |
| 80 bool log_stats) | 80 bool log_stats) |
| 81 : vie_encoder_(vie_encoder), | 81 : frame_(frame), |
| 82 vie_encoder_(vie_encoder), |
| 82 time_when_posted_ms_(time_when_posted_in_ms), | 83 time_when_posted_ms_(time_when_posted_in_ms), |
| 83 log_stats_(log_stats) { | 84 log_stats_(log_stats) { |
| 84 frame_ = frame; | |
| 85 ++vie_encoder_->posted_frames_waiting_for_encode_; | 85 ++vie_encoder_->posted_frames_waiting_for_encode_; |
| 86 } | 86 } |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 bool Run() override { | 89 bool Run() override { |
| 90 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_); | 90 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_); |
| 91 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0); | 91 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0); |
| 92 vie_encoder_->stats_proxy_->OnIncomingFrame(frame_.width(), | 92 vie_encoder_->stats_proxy_->OnIncomingFrame(frame_.width(), |
| 93 frame_.height()); | 93 frame_.height()); |
| 94 ++vie_encoder_->captured_frame_count_; | 94 ++vie_encoder_->captured_frame_count_; |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 --scale_counter_[reason]; | 728 --scale_counter_[reason]; |
| 729 source_proxy_->RequestHigherResolutionThan(current_pixel_count); | 729 source_proxy_->RequestHigherResolutionThan(current_pixel_count); |
| 730 LOG(LS_INFO) << "Scaling up resolution."; | 730 LOG(LS_INFO) << "Scaling up resolution."; |
| 731 for (size_t i = 0; i < kScaleReasonSize; ++i) { | 731 for (size_t i = 0; i < kScaleReasonSize; ++i) { |
| 732 LOG(LS_INFO) << "Scaled " << scale_counter_[i] | 732 LOG(LS_INFO) << "Scaled " << scale_counter_[i] |
| 733 << " times for reason: " << (i ? "quality" : "cpu"); | 733 << " times for reason: " << (i ? "quality" : "cpu"); |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 | 736 |
| 737 } // namespace webrtc | 737 } // namespace webrtc |
| OLD | NEW |