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

Unified Diff: webrtc/modules/video_coding/video_sender.cc

Issue 2513383002: Initial rate allocation should not use fps = 0 (Closed)
Patch Set: nit 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/video_sender.cc
diff --git a/webrtc/modules/video_coding/video_sender.cc b/webrtc/modules/video_coding/video_sender.cc
index c202d34e859819dabad29201dba1bef82b46d28d..148d2374dbcfbf0ec066b0d1602595810a75b542 100644
--- a/webrtc/modules/video_coding/video_sender.cc
+++ b/webrtc/modules/video_coding/video_sender.cc
@@ -37,7 +37,7 @@ VideoSender::VideoSender(Clock* clock,
send_stats_callback_(send_stats_callback),
_codecDataBase(&_encodedFrameCallback),
frame_dropper_enabled_(true),
- _sendStatsTimer(1000, clock_),
+ _sendStatsTimer(VCMProcessTimer::kDefaultProcessIntervalMs, clock_),
current_codec_(),
encoder_params_({BitrateAllocation(), 0, 0, 0}),
encoder_has_internal_source_(false),
@@ -199,6 +199,9 @@ EncoderParameters VideoSender::UpdateEncoderParameters(
uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates(
target_bitrate_bps, params.loss_rate, params.rtt);
uint32_t input_frame_rate = _mediaOpt.InputFrameRate();
+ if (input_frame_rate == 0)
+ input_frame_rate = current_codec_.maxFramerate;
+
BitrateAllocation bitrate_allocation;
if (bitrate_allocator) {
bitrate_allocation = bitrate_allocator->GetAllocation(video_target_rate_bps,
« no previous file with comments | « webrtc/modules/video_coding/video_coding_impl.h ('k') | webrtc/modules/video_coding/video_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698