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

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

Issue 2508853002: Reland of Declare VideoCodec.codec_specific_info private (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/config.cc ('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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(), 522 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(),
523 "Encode"); 523 "Encode");
524 524
525 overuse_detector_.FrameCaptured(video_frame, time_when_posted_in_ms); 525 overuse_detector_.FrameCaptured(video_frame, time_when_posted_in_ms);
526 526
527 if (codec_type_ == webrtc::kVideoCodecVP8) { 527 if (codec_type_ == webrtc::kVideoCodecVP8) {
528 webrtc::CodecSpecificInfo codec_specific_info; 528 webrtc::CodecSpecificInfo codec_specific_info;
529 codec_specific_info.codecType = webrtc::kVideoCodecVP8; 529 codec_specific_info.codecType = webrtc::kVideoCodecVP8;
530 530
531 codec_specific_info.codecSpecific.VP8.hasReceivedRPSI = 531 codec_specific_info.codecSpecific.VP8.hasReceivedRPSI = has_received_rpsi_;
532 has_received_rpsi_; 532 codec_specific_info.codecSpecific.VP8.hasReceivedSLI = has_received_sli_;
533 codec_specific_info.codecSpecific.VP8.hasReceivedSLI = 533 codec_specific_info.codecSpecific.VP8.pictureIdRPSI = picture_id_rpsi_;
534 has_received_sli_; 534 codec_specific_info.codecSpecific.VP8.pictureIdSLI = picture_id_sli_;
535 codec_specific_info.codecSpecific.VP8.pictureIdRPSI = 535 has_received_sli_ = false;
536 picture_id_rpsi_; 536 has_received_rpsi_ = false;
537 codec_specific_info.codecSpecific.VP8.pictureIdSLI =
538 picture_id_sli_;
539 has_received_sli_ = false;
540 has_received_rpsi_ = false;
541 537
542 video_sender_.AddVideoFrame(video_frame, &codec_specific_info); 538 video_sender_.AddVideoFrame(video_frame, &codec_specific_info);
543 return; 539 return;
544 } 540 }
545 video_sender_.AddVideoFrame(video_frame, nullptr); 541 video_sender_.AddVideoFrame(video_frame, nullptr);
546 } 542 }
547 543
548 void ViEEncoder::SendKeyFrame() { 544 void ViEEncoder::SendKeyFrame() {
549 if (!encoder_queue_.IsCurrent()) { 545 if (!encoder_queue_.IsCurrent()) {
550 encoder_queue_.PostTask([this] { SendKeyFrame(); }); 546 encoder_queue_.PostTask([this] { SendKeyFrame(); });
551 return; 547 return;
552 } 548 }
553 RTC_DCHECK_RUN_ON(&encoder_queue_); 549 RTC_DCHECK_RUN_ON(&encoder_queue_);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 current_pixel_count > *max_pixel_count_step_up_) { 684 current_pixel_count > *max_pixel_count_step_up_) {
689 max_pixel_count_ = rtc::Optional<int>(); 685 max_pixel_count_ = rtc::Optional<int>();
690 max_pixel_count_step_up_ = rtc::Optional<int>(current_pixel_count); 686 max_pixel_count_step_up_ = rtc::Optional<int>(current_pixel_count);
691 --cpu_restricted_counter_; 687 --cpu_restricted_counter_;
692 stats_proxy_->OnCpuRestrictedResolutionChanged(cpu_restricted_counter_ > 0); 688 stats_proxy_->OnCpuRestrictedResolutionChanged(cpu_restricted_counter_ > 0);
693 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 689 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
694 } 690 }
695 } 691 }
696 692
697 } // namespace webrtc 693 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698