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)
|
if (status == 0)
|
||||||
{
|
{
|
||||||
g_streaming = true;
|
g_streaming = true;
|
||||||
// 启动推流:挂载本地配置中 enabled 的摄像头
|
|
||||||
for (const auto &cam : g_app_config.cameras)
|
for (const auto &cam : g_app_config.cameras)
|
||||||
{
|
{
|
||||||
if (!cam.enabled)
|
if (!cam.enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (RTSPManager::is_streaming(cam.name))
|
// 不再提前卸载
|
||||||
{
|
|
||||||
RTSPManager::unmount_camera(cam);
|
|
||||||
LOG_WARN("[MQTT] Start-before-unmount: " + cam.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
RTSPManager::mount_camera(cam);
|
RTSPManager::mount_camera(cam);
|
||||||
LOG_INFO("[MQTT] Started streaming: " + cam.name);
|
LOG_INFO("[MQTT] Started streaming: " + cam.name);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user