mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 20:45:57 +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:
@@ -12,6 +12,9 @@
|
||||
#include "PusherBase.h"
|
||||
#include "Rtsp/RtspPusher.h"
|
||||
#include "Rtmp/RtmpPusher.h"
|
||||
#ifdef ENABLE_SRT
|
||||
#include "Srt/SrtPusher.h"
|
||||
#endif // ENABLE_SRT
|
||||
|
||||
using namespace toolkit;
|
||||
|
||||
@@ -50,6 +53,13 @@ PusherBase::Ptr PusherBase::createPusher(const EventPoller::Ptr &in_poller,
|
||||
return PusherBase::Ptr(new RtmpPusherImp(poller, std::dynamic_pointer_cast<RtmpMediaSource>(src)), release_func);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SRT
|
||||
if (strcasecmp("srt", prefix.data()) == 0) {
|
||||
return PusherBase::Ptr(new SrtPusherImp(poller, std::dynamic_pointer_cast<TSMediaSource>(src)), release_func);
|
||||
}
|
||||
#endif//ENABLE_SRT
|
||||
|
||||
|
||||
throw std::invalid_argument("not supported push schema:" + url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user