mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
支持客户端自定义设置EventPoller对象,提高线程安全性
This commit is contained in:
@@ -86,7 +86,7 @@ public:
|
||||
class PlayerBase : public DemuxerBase, public mINI{
|
||||
public:
|
||||
typedef std::shared_ptr<PlayerBase> Ptr;
|
||||
static Ptr createPlayer(const string &strUrl);
|
||||
static Ptr createPlayer(const EventPoller::Ptr &poller,const string &strUrl);
|
||||
|
||||
PlayerBase();
|
||||
virtual ~PlayerBase(){}
|
||||
@@ -154,7 +154,10 @@ class PlayerImp : public Parent
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr<PlayerImp> Ptr;
|
||||
PlayerImp(){}
|
||||
|
||||
template<typename ...ArgsType>
|
||||
PlayerImp(ArgsType &&...args):Parent(std::forward<ArgsType>(args)...){}
|
||||
|
||||
virtual ~PlayerImp(){}
|
||||
void setOnShutdown(const function<void(const SockException &)> &cb) override {
|
||||
if (_parser) {
|
||||
|
||||
Reference in New Issue
Block a user