Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: webrtc/video/vie_encoder.cc

Issue 2742383004: Delete support for receiving RTCP RPSI and SLI messages. (Closed)
Patch Set: Add back OnReceivedSLI and OnReceivedRPSI, to not break downstream sub classes. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 stats_proxy), 272 stats_proxy),
273 stats_proxy_(stats_proxy), 273 stats_proxy_(stats_proxy),
274 pre_encode_callback_(pre_encode_callback), 274 pre_encode_callback_(pre_encode_callback),
275 module_process_thread_(nullptr), 275 module_process_thread_(nullptr),
276 pending_encoder_reconfiguration_(false), 276 pending_encoder_reconfiguration_(false),
277 encoder_start_bitrate_bps_(0), 277 encoder_start_bitrate_bps_(0),
278 max_data_payload_length_(0), 278 max_data_payload_length_(0),
279 nack_enabled_(false), 279 nack_enabled_(false),
280 last_observed_bitrate_bps_(0), 280 last_observed_bitrate_bps_(0),
281 encoder_paused_and_dropped_frame_(false), 281 encoder_paused_and_dropped_frame_(false),
282 has_received_sli_(false),
283 picture_id_sli_(0),
284 has_received_rpsi_(false),
285 picture_id_rpsi_(0),
286 clock_(Clock::GetRealTimeClock()), 282 clock_(Clock::GetRealTimeClock()),
287 scale_counter_(kScaleReasonSize, 0), 283 scale_counter_(kScaleReasonSize, 0),
288 degradation_preference_(DegradationPreference::kMaintainResolution), 284 degradation_preference_(DegradationPreference::kMaintainResolution),
289 last_captured_timestamp_(0), 285 last_captured_timestamp_(0),
290 delta_ntp_internal_ms_(clock_->CurrentNtpInMilliseconds() - 286 delta_ntp_internal_ms_(clock_->CurrentNtpInMilliseconds() -
291 clock_->TimeInMilliseconds()), 287 clock_->TimeInMilliseconds()),
292 last_frame_log_ms_(clock_->TimeInMilliseconds()), 288 last_frame_log_ms_(clock_->TimeInMilliseconds()),
293 captured_frame_count_(0), 289 captured_frame_count_(0),
294 dropped_frame_count_(0), 290 dropped_frame_count_(0),
295 bitrate_observer_(nullptr), 291 bitrate_observer_(nullptr),
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 if (quality_scaler_) 647 if (quality_scaler_)
652 quality_scaler_->ReportDroppedFrame(); 648 quality_scaler_->ReportDroppedFrame();
653 }); 649 });
654 } 650 }
655 651
656 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) { 652 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) {
657 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread()); 653 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread());
658 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate); 654 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate);
659 } 655 }
660 656
661 // TODO(nisse): Delete.
662 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) {
663 if (!encoder_queue_.IsCurrent()) {
664 encoder_queue_.PostTask([this, picture_id] { OnReceivedSLI(picture_id); });
665 return;
666 }
667 RTC_DCHECK_RUN_ON(&encoder_queue_);
668 picture_id_sli_ = picture_id;
669 has_received_sli_ = true;
670 }
671
672 // TODO(nisse): Delete.
673 void ViEEncoder::OnReceivedRPSI(uint64_t picture_id) {
674 if (!encoder_queue_.IsCurrent()) {
675 encoder_queue_.PostTask([this, picture_id] { OnReceivedRPSI(picture_id); });
676 return;
677 }
678 RTC_DCHECK_RUN_ON(&encoder_queue_);
679 picture_id_rpsi_ = picture_id;
680 has_received_rpsi_ = true;
681 }
682
683 void ViEEncoder::OnReceivedIntraFrameRequest(size_t stream_index) { 657 void ViEEncoder::OnReceivedIntraFrameRequest(size_t stream_index) {
684 if (!encoder_queue_.IsCurrent()) { 658 if (!encoder_queue_.IsCurrent()) {
685 encoder_queue_.PostTask( 659 encoder_queue_.PostTask(
686 [this, stream_index] { OnReceivedIntraFrameRequest(stream_index); }); 660 [this, stream_index] { OnReceivedIntraFrameRequest(stream_index); });
687 return; 661 return;
688 } 662 }
689 RTC_DCHECK_RUN_ON(&encoder_queue_); 663 RTC_DCHECK_RUN_ON(&encoder_queue_);
690 // Key frame request from remote side, signal to VCM. 664 // Key frame request from remote side, signal to VCM.
691 TRACE_EVENT0("webrtc", "OnKeyFrameRequest"); 665 TRACE_EVENT0("webrtc", "OnKeyFrameRequest");
692 video_sender_.IntraFrameRequest(stream_index); 666 video_sender_.IntraFrameRequest(stream_index);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 --scale_counter_[reason]; 771 --scale_counter_[reason];
798 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 772 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
799 LOG(LS_INFO) << "Scaling up resolution."; 773 LOG(LS_INFO) << "Scaling up resolution.";
800 for (size_t i = 0; i < kScaleReasonSize; ++i) { 774 for (size_t i = 0; i < kScaleReasonSize; ++i) {
801 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 775 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
802 << " times for reason: " << (i ? "cpu" : "quality"); 776 << " times for reason: " << (i ? "cpu" : "quality");
803 } 777 }
804 } 778 }
805 779
806 } // namespace webrtc 780 } // namespace webrtc
OLDNEW
« webrtc/modules/rtp_rtcp/source/rtp_utility.cc ('K') | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698