Replace the tuple (vhost/app/stream) with MediaTuple. (#2560)

This commit is contained in:
johzzy
2023-06-17 10:28:01 +08:00
committed by GitHub
parent c0a7a4ab70
commit 03770ff409
11 changed files with 37 additions and 76 deletions

View File

@@ -155,9 +155,10 @@ void initEventListener() {
//监听rtsp、rtmp源注册或注销事件此处用于测试rtmp保存为flv录像保存在http根目录下
NoticeCenter::Instance().addListener(nullptr, Broadcast::kBroadcastMediaChanged, [](BroadcastMediaChangedArgs) {
if (sender.getSchema() == RTMP_SCHEMA && sender.getApp() == "live") {
auto tuple = sender.getMediaTuple();
if (sender.getSchema() == RTMP_SCHEMA && tuple.app == "live") {
lock_guard<mutex> lck(s_mtxFlvRecorder);
auto key = sender.shortUrl();
auto key = tuple.shortUrl();
if (bRegist) {
DebugL << "开始录制RTMP" << sender.getUrl();
GET_CONFIG(string, http_root, Http::kRootPath);