diff options
Diffstat (limited to 'third_party/libwebrtc/api/test/create_time_controller.cc')
-rw-r--r-- | third_party/libwebrtc/api/test/create_time_controller.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/third_party/libwebrtc/api/test/create_time_controller.cc b/third_party/libwebrtc/api/test/create_time_controller.cc index 7523e05208..cbf1f09aa1 100644 --- a/third_party/libwebrtc/api/test/create_time_controller.cc +++ b/third_party/libwebrtc/api/test/create_time_controller.cc @@ -16,10 +16,10 @@ #include "absl/base/nullability.h" #include "api/enable_media_with_defaults.h" #include "api/environment/environment.h" +#include "api/environment/environment_factory.h" #include "api/peer_connection_interface.h" #include "call/call.h" -#include "call/rtp_transport_config.h" -#include "call/rtp_transport_controller_send_factory_interface.h" +#include "call/call_config.h" #include "pc/media_factory.h" #include "rtc_base/checks.h" #include "system_wrappers/include/clock.h" @@ -49,9 +49,12 @@ void EnableMediaWithDefaultsAndTimeController( : clock_(clock), media_factory_(std::move(media_factory)) {} std::unique_ptr<Call> CreateCall(const CallConfig& config) override { - return Call::Create(config, clock_, - config.rtp_transport_controller_send_factory->Create( - config.ExtractTransportConfig(), clock_)); + EnvironmentFactory env_factory(config.env); + env_factory.Set(clock_); + + CallConfig config_with_custom_clock = config; + config_with_custom_clock.env = env_factory.Create(); + return media_factory_->CreateCall(config_with_custom_clock); } std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine( |