mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 20:15:58 +08:00
Add srt caller mode and stream encryption support. (#4088)
Add srt caller mode and stream encryption support. 1. Support srt caller mode, realize srt proxy pull stream proxy push stream; url parameter format such as: srt://127.0.0.1:9000?streamid=#! ::r=live/test11 2. Support srt stream encrypted transmission in caller and listener mode. --------- Co-authored-by: xiongguangjie <xiong_panda@163.com>
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
#include "Rtmp/FlvPlayer.h"
|
||||
#include "Http/HlsPlayer.h"
|
||||
#include "Http/TsPlayerImp.h"
|
||||
#ifdef ENABLE_SRT
|
||||
#include "Srt/SrtPlayerImp.h"
|
||||
#endif // ENABLE_SRT
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
@@ -70,6 +73,12 @@ PlayerBase::Ptr PlayerBase::createPlayer(const EventPoller::Ptr &in_poller, cons
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SRT
|
||||
if (strcasecmp("srt", prefix.data()) == 0) {
|
||||
return PlayerBase::Ptr(new SrtPlayerImp(poller), release_func);
|
||||
}
|
||||
#endif//ENABLE_SRT
|
||||
|
||||
throw std::invalid_argument("not supported play schema:" + url_in);
|
||||
}
|
||||
|
||||
@@ -78,6 +87,8 @@ PlayerBase::PlayerBase() {
|
||||
this->mINI::operator[](Client::kMediaTimeoutMS) = 5000;
|
||||
this->mINI::operator[](Client::kBeatIntervalMS) = 5000;
|
||||
this->mINI::operator[](Client::kWaitTrackReady) = true;
|
||||
this->mINI::operator[](Client::kLatency) = 0;
|
||||
this->mINI::operator[](Client::kPassPhrase) = "";
|
||||
}
|
||||
|
||||
} /* namespace mediakit */
|
||||
|
||||
Reference in New Issue
Block a user