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

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

Issue 2616393003: Periodically update channel parameters and send TargetBitrate message. (Closed)
Patch Set: Rebase Created 3 years, 11 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/video/vie_encoder.h ('k') | webrtc/video/vie_encoder_unittest.cc » ('j') | 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 pending_encoder_reconfiguration_ = true; 540 pending_encoder_reconfiguration_ = true;
541 last_frame_info_ = rtc::Optional<VideoFrameInfo>( 541 last_frame_info_ = rtc::Optional<VideoFrameInfo>(
542 VideoFrameInfo(video_frame.width(), video_frame.height(), 542 VideoFrameInfo(video_frame.width(), video_frame.height(),
543 video_frame.rotation(), video_frame.is_texture())); 543 video_frame.rotation(), video_frame.is_texture()));
544 LOG(LS_INFO) << "Video frame parameters changed: dimensions=" 544 LOG(LS_INFO) << "Video frame parameters changed: dimensions="
545 << last_frame_info_->width << "x" << last_frame_info_->height 545 << last_frame_info_->width << "x" << last_frame_info_->height
546 << ", rotation=" << last_frame_info_->rotation 546 << ", rotation=" << last_frame_info_->rotation
547 << ", texture=" << last_frame_info_->is_texture; 547 << ", texture=" << last_frame_info_->is_texture;
548 } 548 }
549 549
550 int64_t now_ms = clock_->TimeInMilliseconds();
550 if (pending_encoder_reconfiguration_) { 551 if (pending_encoder_reconfiguration_) {
551 ReconfigureEncoder(); 552 ReconfigureEncoder();
553 } else if (!last_parameters_update_ms_ ||
554 now_ms - *last_parameters_update_ms_ >=
555 vcm::VCMProcessTimer::kDefaultProcessIntervalMs) {
556 video_sender_.UpdateChannelParemeters(rate_allocator_.get(),
557 bitrate_observer_);
552 } 558 }
559 last_parameters_update_ms_.emplace(now_ms);
553 560
554 if (EncoderPaused()) { 561 if (EncoderPaused()) {
555 TraceFrameDropStart(); 562 TraceFrameDropStart();
556 return; 563 return;
557 } 564 }
558 TraceFrameDropEnd(); 565 TraceFrameDropEnd();
559 566
560 last_frame_height_ = video_frame.height(); 567 last_frame_height_ = video_frame.height();
561 last_frame_width_ = video_frame.width(); 568 last_frame_width_ = video_frame.width();
562 569
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 --scale_counter_[reason]; 761 --scale_counter_[reason];
755 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 762 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
756 LOG(LS_INFO) << "Scaling up resolution."; 763 LOG(LS_INFO) << "Scaling up resolution.";
757 for (size_t i = 0; i < kScaleReasonSize; ++i) { 764 for (size_t i = 0; i < kScaleReasonSize; ++i) {
758 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 765 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
759 << " times for reason: " << (i ? "cpu" : "quality"); 766 << " times for reason: " << (i ? "cpu" : "quality");
760 } 767 }
761 } 768 }
762 769
763 } // namespace webrtc 770 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | webrtc/video/vie_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698