add MediaTuple

This commit is contained in:
Johnny
2023-05-25 16:23:24 +08:00
committed by 夏楚
parent f4ee607feb
commit 0232caf068
41 changed files with 242 additions and 273 deletions

View File

@@ -22,7 +22,8 @@ public:
MediaHelper(const char *vhost, const char *app, const char *stream, float duration, const ProtocolOption &option) {
_poller = EventPollerPool::Instance().getPoller();
// 在poller线程中创建DevChannel(MultiMediaSourceMuxer)对象,确保严格的线程安全限制
_poller->sync([&]() { _channel = std::make_shared<DevChannel>(vhost, app, stream, duration, option); });
auto tuple = MediaTuple{vhost, app, stream};
_poller->sync([&]() { _channel = std::make_shared<DevChannel>(tuple, duration, option); });
}
~MediaHelper() = default;