Replace field trials with WebRtcKeyValueConfig in RtpRtcpModule

Replaces use of field trials in RtpSender and RtpVideoSender with injectable WebRtcKeyValueConfig.
Implementation still defaults to field trials.

BUG: webrtc:10335
Change-Id: I5fc6d327ee5d011ccc41385734b38344df172627
Reviewed-on: https://webrtc-review.googlesource.com/c/123447
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26795}
This commit is contained in:
Per Kjellander
2019-02-21 07:55:59 +01:00
committed by Commit Bot
parent aa1a43e31f
commit e11b7d2e80
11 changed files with 125 additions and 67 deletions

View File

@ -18,6 +18,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/transport/webrtc_key_value_config.h"
#include "api/video/video_bitrate_allocation.h"
#include "modules/include/module.h"
#include "modules/rtp_rtcp/include/flexfec_sender.h"
@ -107,6 +108,10 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface {
// Corresponds to extmap-allow-mixed in SDP negotiation.
bool extmap_allow_mixed = false;
// If set, field trials are read from |field_trials|, otherwise
// defaults to webrtc::FieldTrialBasedConfig.
WebRtcKeyValueConfig* field_trials = nullptr;
private:
RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
};