void PeerConnectionMedia::StartIceChecks(const JsepSession& session) { std::vector<size_t> numComponentsByLevel; auto transports = session.GetTransports(); for (size_t i = 0; i < transports.size(); ++i) { RefPtr<JsepTransport> transport = transports[i]; if (transport->mState == JsepTransport::kJsepTransportClosed) { CSFLogDebug(logTag, "Transport %s is disabled", transport->mTransportId.c_str()); numComponentsByLevel.push_back(0); // Make sure the MediaPipelineFactory doesn't try to use these. RemoveTransportFlow(i, false); RemoveTransportFlow(i, true); } else { CSFLogDebug(logTag, "Transport %s has %u components", transport->mTransportId.c_str(), static_cast<unsigned>(transport->mComponents)); numComponentsByLevel.push_back(transport->mComponents); } } nsCOMPtr<nsIRunnable> runnable( WrapRunnable( RefPtr<PeerConnectionMedia>(this), &PeerConnectionMedia::StartIceChecks_s, session.IsIceControlling(), session.RemoteIsIceLite(), // Copy, just in case API changes to return a ref std::vector<std::string>(session.GetIceOptions()), numComponentsByLevel)); PerformOrEnqueueIceCtxOperation(runnable); }
void PeerConnectionMedia::StartIceChecks(const JsepSession& aSession) { nsCOMPtr<nsIRunnable> runnable( WrapRunnable( RefPtr<PeerConnectionMedia>(this), &PeerConnectionMedia::StartIceChecks_s, aSession.IsIceControlling(), aSession.RemoteIsIceLite(), // Copy, just in case API changes to return a ref std::vector<std::string>(aSession.GetIceOptions()))); PerformOrEnqueueIceCtxOperation(runnable); }