Extend IceControllerFactoryArgs with field trial string
This patch adds a field trial string for the IceController to the factory interface, the string is from the "WebRTC-IceControllerFieldTrials" key. This makes it possible to add new field trials using that key as needed. Bug: chromium:1024965 Change-Id: I50498e45da3c49b8e1d620c90c674eedc15dc16e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173900 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31134}
This commit is contained in:
parent
cc73ed3e70
commit
f7f7cc93aa
@ -12,6 +12,7 @@
|
|||||||
#define P2P_BASE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
|
#define P2P_BASE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "p2p/base/ice_controller_interface.h"
|
#include "p2p/base/ice_controller_interface.h"
|
||||||
#include "p2p/base/ice_transport_internal.h"
|
#include "p2p/base/ice_transport_internal.h"
|
||||||
@ -24,6 +25,7 @@ struct IceControllerFactoryArgs {
|
|||||||
std::function<IceRole()> ice_role_func;
|
std::function<IceRole()> ice_role_func;
|
||||||
std::function<bool(const Connection*)> is_connection_pruned_func;
|
std::function<bool(const Connection*)> is_connection_pruned_func;
|
||||||
const IceFieldTrials* ice_field_trials;
|
const IceFieldTrials* ice_field_trials;
|
||||||
|
std::string ice_controller_field_trials;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IceControllerFactoryInterface {
|
class IceControllerFactoryInterface {
|
||||||
|
|||||||
@ -174,8 +174,7 @@ P2PTransportChannel::P2PTransportChannel(
|
|||||||
ice_event_log_.set_event_log(event_log);
|
ice_event_log_.set_event_log(event_log);
|
||||||
|
|
||||||
IceControllerFactoryArgs args{
|
IceControllerFactoryArgs args{
|
||||||
[this] { return GetState(); },
|
[this] { return GetState(); }, [this] { return GetIceRole(); },
|
||||||
[this] { return GetIceRole(); },
|
|
||||||
[this](const Connection* connection) {
|
[this](const Connection* connection) {
|
||||||
// TODO(webrtc:10647/jonaso): Figure out a way to remove friendship
|
// TODO(webrtc:10647/jonaso): Figure out a way to remove friendship
|
||||||
// between P2PTransportChannel and Connection.
|
// between P2PTransportChannel and Connection.
|
||||||
@ -183,7 +182,7 @@ P2PTransportChannel::P2PTransportChannel(
|
|||||||
IsRemoteCandidatePruned(connection->remote_candidate());
|
IsRemoteCandidatePruned(connection->remote_candidate());
|
||||||
},
|
},
|
||||||
&field_trials_,
|
&field_trials_,
|
||||||
};
|
webrtc::field_trial::FindFullName("WebRTC-IceControllerFieldTrials")};
|
||||||
if (ice_controller_factory != nullptr) {
|
if (ice_controller_factory != nullptr) {
|
||||||
ice_controller_ = ice_controller_factory->Create(args);
|
ice_controller_ = ice_controller_factory->Create(args);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user