mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-22 00:42:22 +08:00
srtp自动初始化,支持多线程
This commit is contained in:
@@ -5,15 +5,16 @@
|
||||
WebRtcTransport::WebRtcTransport() {
|
||||
static onceToken token([](){
|
||||
RTC::DtlsTransport::ClassInit();
|
||||
RTC::DepLibSRTP::ClassInit();
|
||||
RTC::SrtpSession::ClassInit();
|
||||
});
|
||||
|
||||
dtls_transport_ = std::make_shared<RTC::DtlsTransport>(EventPollerPool::Instance().getFirstPoller(), this);
|
||||
ice_server_ = std::make_shared<RTC::IceServer>(this, makeRandStr(4), makeRandStr(24));
|
||||
}
|
||||
|
||||
WebRtcTransport::~WebRtcTransport() {}
|
||||
WebRtcTransport::~WebRtcTransport() {
|
||||
dtls_transport_ = nullptr;
|
||||
ice_server_ = nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user