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

Side by Side Diff: webrtc/modules/video_coding/video_sender.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 | « no previous file | webrtc/modules/video_coding/video_sender_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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (_sendStatsTimer.TimeUntilProcess() == 0) { 56 if (_sendStatsTimer.TimeUntilProcess() == 0) {
57 // |_sendStatsTimer.Processed()| must be called. Otherwise 57 // |_sendStatsTimer.Processed()| must be called. Otherwise
58 // VideoSender::Process() will be called in an infinite loop. 58 // VideoSender::Process() will be called in an infinite loop.
59 _sendStatsTimer.Processed(); 59 _sendStatsTimer.Processed();
60 if (send_stats_callback_) { 60 if (send_stats_callback_) {
61 uint32_t bitRate = _mediaOpt.SentBitRate(); 61 uint32_t bitRate = _mediaOpt.SentBitRate();
62 uint32_t frameRate = _mediaOpt.SentFrameRate(); 62 uint32_t frameRate = _mediaOpt.SentFrameRate();
63 send_stats_callback_->SendStatistics(bitRate, frameRate); 63 send_stats_callback_->SendStatistics(bitRate, frameRate);
64 } 64 }
65 } 65 }
66 {
67 rtc::CritScope cs(&params_crit_);
68 // Force an encoder parameters update, so that incoming frame rate is
69 // updated even if bandwidth hasn't changed.
70 encoder_params_.input_frame_rate = _mediaOpt.InputFrameRate();
71 }
72 } 66 }
73 67
74 int64_t VideoSender::TimeUntilNextProcess() { 68 int64_t VideoSender::TimeUntilNextProcess() {
75 return _sendStatsTimer.TimeUntilProcess(); 69 return _sendStatsTimer.TimeUntilProcess();
76 } 70 }
77 71
78 // Register the send codec to be used. 72 // Register the send codec to be used.
79 int32_t VideoSender::RegisterSendCodec(const VideoCodec* sendCodec, 73 int32_t VideoSender::RegisterSendCodec(const VideoCodec* sendCodec,
80 uint32_t numberOfCores, 74 uint32_t numberOfCores,
81 uint32_t maxPayloadSize) { 75 uint32_t maxPayloadSize) {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 393 }
400 394
401 int32_t VideoSender::EnableFrameDropper(bool enable) { 395 int32_t VideoSender::EnableFrameDropper(bool enable) {
402 rtc::CritScope lock(&encoder_crit_); 396 rtc::CritScope lock(&encoder_crit_);
403 frame_dropper_enabled_ = enable; 397 frame_dropper_enabled_ = enable;
404 _mediaOpt.EnableFrameDropper(enable); 398 _mediaOpt.EnableFrameDropper(enable);
405 return VCM_OK; 399 return VCM_OK;
406 } 400 }
407 } // namespace vcm 401 } // namespace vcm
408 } // namespace webrtc 402 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/video_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698