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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 size_t max_data_payload_length_; | 79 size_t max_data_payload_length_; |
80 bool nack_enabled_; | 80 bool nack_enabled_; |
81 }; | 81 }; |
82 | 82 |
83 class ViEEncoder::EncodeTask : public rtc::QueuedTask { | 83 class ViEEncoder::EncodeTask : public rtc::QueuedTask { |
84 public: | 84 public: |
85 EncodeTask(const VideoFrame& frame, | 85 EncodeTask(const VideoFrame& frame, |
86 ViEEncoder* vie_encoder, | 86 ViEEncoder* vie_encoder, |
87 int64_t time_when_posted_in_ms, | 87 int64_t time_when_posted_in_ms, |
88 bool log_stats) | 88 bool log_stats) |
89 : vie_encoder_(vie_encoder), | 89 : frame_(frame), |
| 90 vie_encoder_(vie_encoder), |
90 time_when_posted_ms_(time_when_posted_in_ms), | 91 time_when_posted_ms_(time_when_posted_in_ms), |
91 log_stats_(log_stats) { | 92 log_stats_(log_stats) { |
92 frame_ = frame; | |
93 ++vie_encoder_->posted_frames_waiting_for_encode_; | 93 ++vie_encoder_->posted_frames_waiting_for_encode_; |
94 } | 94 } |
95 | 95 |
96 private: | 96 private: |
97 bool Run() override { | 97 bool Run() override { |
98 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_); | 98 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_); |
99 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0); | 99 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0); |
100 vie_encoder_->stats_proxy_->OnIncomingFrame(frame_.width(), | 100 vie_encoder_->stats_proxy_->OnIncomingFrame(frame_.width(), |
101 frame_.height()); | 101 frame_.height()); |
102 ++vie_encoder_->captured_frame_count_; | 102 ++vie_encoder_->captured_frame_count_; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 --scale_counter_[reason]; | 752 --scale_counter_[reason]; |
753 source_proxy_->RequestHigherResolutionThan(current_pixel_count); | 753 source_proxy_->RequestHigherResolutionThan(current_pixel_count); |
754 LOG(LS_INFO) << "Scaling up resolution."; | 754 LOG(LS_INFO) << "Scaling up resolution."; |
755 for (size_t i = 0; i < kScaleReasonSize; ++i) { | 755 for (size_t i = 0; i < kScaleReasonSize; ++i) { |
756 LOG(LS_INFO) << "Scaled " << scale_counter_[i] | 756 LOG(LS_INFO) << "Scaled " << scale_counter_[i] |
757 << " times for reason: " << (i ? "quality" : "cpu"); | 757 << " times for reason: " << (i ? "quality" : "cpu"); |
758 } | 758 } |
759 } | 759 } |
760 | 760 |
761 } // namespace webrtc | 761 } // namespace webrtc |
OLD | NEW |