transport controller: move ice transport initialization
out of the DTLS transport creation and into the ICE transport creation. BUG=None Change-Id: I9f1a74bbabde842234e5ae7cc64aa9632ab2ba78 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281480 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Philipp Hancke <phancke@microsoft.com> Cr-Commit-Position: refs/heads/main@{#38541}
This commit is contained in:
parent
bdf2567097
commit
df0a6228e5
@ -399,8 +399,13 @@ JsepTransportController::CreateIceTransport(const std::string& transport_name,
|
||||
init.set_async_dns_resolver_factory(async_dns_resolver_factory_);
|
||||
init.set_event_log(config_.event_log);
|
||||
init.set_field_trials(config_.field_trials);
|
||||
return config_.ice_transport_factory->CreateIceTransport(
|
||||
auto transport = config_.ice_transport_factory->CreateIceTransport(
|
||||
transport_name, component, std::move(init));
|
||||
RTC_DCHECK(transport);
|
||||
transport->internal()->SetIceRole(ice_role_);
|
||||
transport->internal()->SetIceTiebreaker(ice_tiebreaker_);
|
||||
transport->internal()->SetIceConfig(ice_config_);
|
||||
return transport;
|
||||
}
|
||||
|
||||
std::unique_ptr<cricket::DtlsTransportInternal>
|
||||
@ -421,9 +426,8 @@ JsepTransportController::CreateDtlsTransport(
|
||||
}
|
||||
|
||||
RTC_DCHECK(dtls);
|
||||
dtls->ice_transport()->SetIceRole(ice_role_);
|
||||
dtls->ice_transport()->SetIceTiebreaker(ice_tiebreaker_);
|
||||
dtls->ice_transport()->SetIceConfig(ice_config_);
|
||||
RTC_DCHECK_EQ(ice, dtls->ice_transport());
|
||||
|
||||
if (certificate_) {
|
||||
bool set_cert_success = dtls->SetLocalCertificate(certificate_);
|
||||
RTC_DCHECK(set_cert_success);
|
||||
@ -1035,7 +1039,6 @@ RTCError JsepTransportController::MaybeCreateJsepTransport(
|
||||
|
||||
rtc::scoped_refptr<webrtc::IceTransportInterface> ice =
|
||||
CreateIceTransport(content_info.name, /*rtcp=*/false);
|
||||
RTC_DCHECK(ice);
|
||||
|
||||
std::unique_ptr<cricket::DtlsTransportInternal> rtp_dtls_transport =
|
||||
CreateDtlsTransport(content_info, ice->internal());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user