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

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

Issue 2753783002: Delete VP8 feedback mode. (Closed)
Patch Set: 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 TraceFrameDropStart(); 602 TraceFrameDropStart();
603 return; 603 return;
604 } 604 }
605 TraceFrameDropEnd(); 605 TraceFrameDropEnd();
606 606
607 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(), 607 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(),
608 "Encode"); 608 "Encode");
609 609
610 overuse_detector_.FrameCaptured(video_frame, time_when_posted_us); 610 overuse_detector_.FrameCaptured(video_frame, time_when_posted_us);
611 611
612 if (codec_type_ == webrtc::kVideoCodecVP8) {
613 webrtc::CodecSpecificInfo codec_specific_info;
614 codec_specific_info.codecType = webrtc::kVideoCodecVP8;
615
616 codec_specific_info.codecSpecific.VP8.hasReceivedRPSI = has_received_rpsi_;
617 codec_specific_info.codecSpecific.VP8.hasReceivedSLI = has_received_sli_;
618 codec_specific_info.codecSpecific.VP8.pictureIdRPSI = picture_id_rpsi_;
619 codec_specific_info.codecSpecific.VP8.pictureIdSLI = picture_id_sli_;
620 has_received_sli_ = false;
621 has_received_rpsi_ = false;
622
623 video_sender_.AddVideoFrame(video_frame, &codec_specific_info);
624 return;
625 }
626 video_sender_.AddVideoFrame(video_frame, nullptr); 612 video_sender_.AddVideoFrame(video_frame, nullptr);
627 } 613 }
628 614
629 void ViEEncoder::SendKeyFrame() { 615 void ViEEncoder::SendKeyFrame() {
630 if (!encoder_queue_.IsCurrent()) { 616 if (!encoder_queue_.IsCurrent()) {
631 encoder_queue_.PostTask([this] { SendKeyFrame(); }); 617 encoder_queue_.PostTask([this] { SendKeyFrame(); });
632 return; 618 return;
633 } 619 }
634 RTC_DCHECK_RUN_ON(&encoder_queue_); 620 RTC_DCHECK_RUN_ON(&encoder_queue_);
635 video_sender_.IntraFrameRequest(0); 621 video_sender_.IntraFrameRequest(0);
(...skipping 30 matching lines...) Expand all
666 if (quality_scaler_) 652 if (quality_scaler_)
667 quality_scaler_->ReportDroppedFrame(); 653 quality_scaler_->ReportDroppedFrame();
668 }); 654 });
669 } 655 }
670 656
671 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) { 657 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) {
672 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread()); 658 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread());
673 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate); 659 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate);
674 } 660 }
675 661
662 // TODO(nisse): Delete.
danilchap 2017/03/15 09:05:32 may be replace implementation with a noop (which w
nisse-webrtc 2017/03/15 09:29:46 To me it seems good enough to leave these untouche
danilchap 2017/03/15 12:00:16 Ok
676 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { 663 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) {
677 if (!encoder_queue_.IsCurrent()) { 664 if (!encoder_queue_.IsCurrent()) {
678 encoder_queue_.PostTask([this, picture_id] { OnReceivedSLI(picture_id); }); 665 encoder_queue_.PostTask([this, picture_id] { OnReceivedSLI(picture_id); });
679 return; 666 return;
680 } 667 }
681 RTC_DCHECK_RUN_ON(&encoder_queue_); 668 RTC_DCHECK_RUN_ON(&encoder_queue_);
682 picture_id_sli_ = picture_id; 669 picture_id_sli_ = picture_id;
683 has_received_sli_ = true; 670 has_received_sli_ = true;
684 } 671 }
685 672
673 // TODO(nisse): Delete.
686 void ViEEncoder::OnReceivedRPSI(uint64_t picture_id) { 674 void ViEEncoder::OnReceivedRPSI(uint64_t picture_id) {
687 if (!encoder_queue_.IsCurrent()) { 675 if (!encoder_queue_.IsCurrent()) {
688 encoder_queue_.PostTask([this, picture_id] { OnReceivedRPSI(picture_id); }); 676 encoder_queue_.PostTask([this, picture_id] { OnReceivedRPSI(picture_id); });
689 return; 677 return;
690 } 678 }
691 RTC_DCHECK_RUN_ON(&encoder_queue_); 679 RTC_DCHECK_RUN_ON(&encoder_queue_);
692 picture_id_rpsi_ = picture_id; 680 picture_id_rpsi_ = picture_id;
693 has_received_rpsi_ = true; 681 has_received_rpsi_ = true;
694 } 682 }
695 683
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 --scale_counter_[reason]; 798 --scale_counter_[reason];
811 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 799 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
812 LOG(LS_INFO) << "Scaling up resolution."; 800 LOG(LS_INFO) << "Scaling up resolution.";
813 for (size_t i = 0; i < kScaleReasonSize; ++i) { 801 for (size_t i = 0; i < kScaleReasonSize; ++i) {
814 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 802 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
815 << " times for reason: " << (i ? "cpu" : "quality"); 803 << " times for reason: " << (i ? "cpu" : "quality");
816 } 804 }
817 } 805 }
818 806
819 } // namespace webrtc 807 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698