add addDelegate with std::function, remove FrameWriterInterfaceHelper

This commit is contained in:
cqm
2022-11-01 08:54:56 +08:00
parent d2c64b1f09
commit ac3d7bd21f
8 changed files with 25 additions and 23 deletions

View File

@@ -112,9 +112,9 @@ bool Demuxer::addTrack(const Track::Ptr &track) {
}
if (_sink->addTrack(track)) {
track->addDelegate(std::make_shared<FrameWriterInterfaceHelper>([this](const Frame::Ptr &frame) {
track->addDelegate([this](const Frame::Ptr &frame) {
return _sink->inputFrame(frame);
}));
});
return true;
}
return false;