mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复低版本gcc编译器lambda不支持可变长度模板参数捕获导致的编译问题:#2295
This commit is contained in:
parent
843e3423cf
commit
d818cad3c0
@ -19,11 +19,10 @@ using namespace mediakit;
|
|||||||
class MediaHelper : public MediaSourceEvent , public std::enable_shared_from_this<MediaHelper> {
|
class MediaHelper : public MediaSourceEvent , public std::enable_shared_from_this<MediaHelper> {
|
||||||
public:
|
public:
|
||||||
using Ptr = std::shared_ptr<MediaHelper>;
|
using Ptr = std::shared_ptr<MediaHelper>;
|
||||||
template<typename ...ArgsType>
|
MediaHelper(const char *vhost, const char *app, const char *stream, float duration, const ProtocolOption &option) {
|
||||||
MediaHelper(ArgsType &&...args) {
|
|
||||||
_poller = EventPollerPool::Instance().getPoller();
|
_poller = EventPollerPool::Instance().getPoller();
|
||||||
// 在poller线程中创建DevChannel(MultiMediaSourceMuxer)对象,确保严格的线程安全限制
|
// 在poller线程中创建DevChannel(MultiMediaSourceMuxer)对象,确保严格的线程安全限制
|
||||||
_poller->sync([&]() { _channel = std::make_shared<DevChannel>(std::forward<ArgsType>(args)...); });
|
_poller->sync([&]() { _channel = std::make_shared<DevChannel>(vhost, app, stream, duration, option); });
|
||||||
}
|
}
|
||||||
|
|
||||||
~MediaHelper() = default;
|
~MediaHelper() = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user