mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-20 07:12:21 +08:00
优化FrameDispatcher相关代码
This commit is contained in:
@@ -290,12 +290,13 @@ public:
|
||||
/**
|
||||
* 添加代理
|
||||
*/
|
||||
void addDelegate(const FrameWriterInterface::Ptr &delegate) {
|
||||
FrameWriterInterface* addDelegate(FrameWriterInterface::Ptr delegate) {
|
||||
std::lock_guard<std::mutex> lck(_mtx);
|
||||
_delegates.emplace(delegate.get(), delegate);
|
||||
return _delegates.emplace(delegate.get(), std::move(delegate)).first->second.get();
|
||||
}
|
||||
|
||||
FrameWriterInterface* addDelegate(const std::function<bool(const Frame::Ptr &frame)> &cb);
|
||||
FrameWriterInterface* addDelegate(std::function<bool(const Frame::Ptr &frame)> cb);
|
||||
|
||||
/**
|
||||
* 删除代理
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user