Allowing to set PCF options via peer configurer

Bug: webrtc:15752
Change-Id: I408cf2e118d09504d59a09ef4c2767ab89982db4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332645
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41462}
This commit is contained in:
Dor Hen 2024-01-01 23:43:40 -08:00 committed by WebRTC LUCI CQ
parent 6dd30183a2
commit 764ac7ec0a
4 changed files with 9 additions and 0 deletions

View File

@ -136,6 +136,7 @@ struct Params {
// provided into VideoEncoder::SetRates(...).
double video_encoder_bitrate_multiplier = 1.0;
PeerConnectionFactoryInterface::Options peer_connection_factory_options;
PeerConnectionInterface::RTCConfiguration rtc_configuration;
PeerConnectionInterface::RTCOfferAnswerOptions rtc_offer_answer_options;
BitrateSettings bitrate_settings;

View File

@ -205,6 +205,11 @@ PeerConfigurer* PeerConfigurer::SetAecDumpPath(absl::string_view path) {
params_->aec_dump_path = std::string(path);
return this;
}
PeerConfigurer* PeerConfigurer::SetPCFOptions(
PeerConnectionFactoryInterface::Options options) {
params_->peer_connection_factory_options = std::move(options);
return this;
}
PeerConfigurer* PeerConfigurer::SetRTCConfiguration(
PeerConnectionInterface::RTCConfiguration configuration) {
params_->rtc_configuration = std::move(configuration);

View File

@ -158,6 +158,8 @@ class PeerConfigurer {
// If is set, an AEC dump will be saved in that location and it will be
// available for further analysis.
PeerConfigurer* SetAecDumpPath(absl::string_view path);
PeerConfigurer* SetPCFOptions(
PeerConnectionFactoryInterface::Options options);
PeerConfigurer* SetRTCConfiguration(
PeerConnectionInterface::RTCConfiguration configuration);
PeerConfigurer* SetRTCOfferAnswerOptions(

View File

@ -327,6 +327,7 @@ std::unique_ptr<TestPeer> TestPeerFactory::CreateTestPeer(
components->worker_thread, components->network_thread);
rtc::scoped_refptr<PeerConnectionFactoryInterface> peer_connection_factory =
CreateModularPeerConnectionFactory(std::move(pcf_deps));
peer_connection_factory->SetOptions(params->peer_connection_factory_options);
// Create peer connection.
PeerConnectionDependencies pc_deps =