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

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

Issue 2753783002: Delete VP8 feedback mode. (Closed)
Patch Set: Rebased. 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
« no previous file with comments | « webrtc/modules/video_coding/include/video_codec_interface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 TraceFrameDropStart(); 601 TraceFrameDropStart();
602 return; 602 return;
603 } 603 }
604 TraceFrameDropEnd(); 604 TraceFrameDropEnd();
605 605
606 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(), 606 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(),
607 "Encode"); 607 "Encode");
608 608
609 overuse_detector_.FrameCaptured(video_frame, time_when_posted_us); 609 overuse_detector_.FrameCaptured(video_frame, time_when_posted_us);
610 610
611 if (codec_type_ == webrtc::kVideoCodecVP8) {
612 webrtc::CodecSpecificInfo codec_specific_info;
613 codec_specific_info.codecType = webrtc::kVideoCodecVP8;
614
615 codec_specific_info.codecSpecific.VP8.hasReceivedRPSI = has_received_rpsi_;
616 codec_specific_info.codecSpecific.VP8.hasReceivedSLI = has_received_sli_;
617 codec_specific_info.codecSpecific.VP8.pictureIdRPSI = picture_id_rpsi_;
618 codec_specific_info.codecSpecific.VP8.pictureIdSLI = picture_id_sli_;
619 has_received_sli_ = false;
620 has_received_rpsi_ = false;
621
622 video_sender_.AddVideoFrame(video_frame, &codec_specific_info);
623 return;
624 }
625 video_sender_.AddVideoFrame(video_frame, nullptr); 611 video_sender_.AddVideoFrame(video_frame, nullptr);
626 } 612 }
627 613
628 void ViEEncoder::SendKeyFrame() { 614 void ViEEncoder::SendKeyFrame() {
629 if (!encoder_queue_.IsCurrent()) { 615 if (!encoder_queue_.IsCurrent()) {
630 encoder_queue_.PostTask([this] { SendKeyFrame(); }); 616 encoder_queue_.PostTask([this] { SendKeyFrame(); });
631 return; 617 return;
632 } 618 }
633 RTC_DCHECK_RUN_ON(&encoder_queue_); 619 RTC_DCHECK_RUN_ON(&encoder_queue_);
634 video_sender_.IntraFrameRequest(0); 620 video_sender_.IntraFrameRequest(0);
(...skipping 30 matching lines...) Expand all
665 if (quality_scaler_) 651 if (quality_scaler_)
666 quality_scaler_->ReportDroppedFrame(); 652 quality_scaler_->ReportDroppedFrame();
667 }); 653 });
668 } 654 }
669 655
670 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) { 656 void ViEEncoder::SendStatistics(uint32_t bit_rate, uint32_t frame_rate) {
671 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread()); 657 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread());
672 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate); 658 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate);
673 } 659 }
674 660
661 // TODO(nisse): Delete.
675 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { 662 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) {
676 if (!encoder_queue_.IsCurrent()) { 663 if (!encoder_queue_.IsCurrent()) {
677 encoder_queue_.PostTask([this, picture_id] { OnReceivedSLI(picture_id); }); 664 encoder_queue_.PostTask([this, picture_id] { OnReceivedSLI(picture_id); });
678 return; 665 return;
679 } 666 }
680 RTC_DCHECK_RUN_ON(&encoder_queue_); 667 RTC_DCHECK_RUN_ON(&encoder_queue_);
681 picture_id_sli_ = picture_id; 668 picture_id_sli_ = picture_id;
682 has_received_sli_ = true; 669 has_received_sli_ = true;
683 } 670 }
684 671
672 // TODO(nisse): Delete.
685 void ViEEncoder::OnReceivedRPSI(uint64_t picture_id) { 673 void ViEEncoder::OnReceivedRPSI(uint64_t picture_id) {
686 if (!encoder_queue_.IsCurrent()) { 674 if (!encoder_queue_.IsCurrent()) {
687 encoder_queue_.PostTask([this, picture_id] { OnReceivedRPSI(picture_id); }); 675 encoder_queue_.PostTask([this, picture_id] { OnReceivedRPSI(picture_id); });
688 return; 676 return;
689 } 677 }
690 RTC_DCHECK_RUN_ON(&encoder_queue_); 678 RTC_DCHECK_RUN_ON(&encoder_queue_);
691 picture_id_rpsi_ = picture_id; 679 picture_id_rpsi_ = picture_id;
692 has_received_rpsi_ = true; 680 has_received_rpsi_ = true;
693 } 681 }
694 682
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 --scale_counter_[reason]; 797 --scale_counter_[reason];
810 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 798 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
811 LOG(LS_INFO) << "Scaling up resolution."; 799 LOG(LS_INFO) << "Scaling up resolution.";
812 for (size_t i = 0; i < kScaleReasonSize; ++i) { 800 for (size_t i = 0; i < kScaleReasonSize; ++i) {
813 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 801 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
814 << " times for reason: " << (i ? "cpu" : "quality"); 802 << " times for reason: " << (i ? "cpu" : "quality");
815 } 803 }
816 } 804 }
817 805
818 } // namespace webrtc 806 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/include/video_codec_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698