1
This commit is contained in:
parent
a4add5014a
commit
cb0d03e2a1
@ -104,18 +104,13 @@ static void on_mqtt_message_received(const std::string &topic, const std::string
|
||||
if (status == 0)
|
||||
{
|
||||
g_streaming = true;
|
||||
// 启动推流:挂载本地配置中 enabled 的摄像头
|
||||
|
||||
for (const auto &cam : g_app_config.cameras)
|
||||
{
|
||||
if (!cam.enabled)
|
||||
continue;
|
||||
|
||||
if (RTSPManager::is_streaming(cam.name))
|
||||
{
|
||||
RTSPManager::unmount_camera(cam);
|
||||
LOG_WARN("[MQTT] Start-before-unmount: " + cam.name);
|
||||
}
|
||||
|
||||
// 不再提前卸载
|
||||
RTSPManager::mount_camera(cam);
|
||||
LOG_INFO("[MQTT] Started streaming: " + cam.name);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user