Add field trial to force playout delay

This CL adds the field trial WebRTC-ForcePlayoutDelay with parameters
min_ms and max_ms. If both of these values are set, the playout delay
of any received packet will be overridden by the specified values.

Bug: None
Change-Id: I353282097e3ffa437dfc5affdfdf7780b09474e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174180
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31149}
This commit is contained in:
Johannes Kron
2020-04-30 13:50:34 +02:00
committed by Commit Bot
parent 3745d3fc93
commit 14a23a32c4
3 changed files with 97 additions and 35 deletions

View File

@ -43,6 +43,7 @@
#include "modules/video_coding/unique_timestamp_counter.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
@ -299,6 +300,10 @@ class RtpVideoStreamReceiver : public LossNotificationSender,
RemoteNtpTimeEstimator ntp_estimator_;
RtpHeaderExtensionMap rtp_header_extensions_;
// Set by the field trial WebRTC-ForcePlayoutDelay to override any playout
// delay that is specified in the received packets.
FieldTrialOptional<int> forced_playout_delay_max_ms_;
FieldTrialOptional<int> forced_playout_delay_min_ms_;
ReceiveStatistics* const rtp_receive_statistics_;
std::unique_ptr<UlpfecReceiver> ulpfec_receiver_;