This commit is contained in:
cxh 2025-10-15 08:34:51 +08:00
parent d283647065
commit 8ae850dd63

View File

@ -79,7 +79,7 @@ static void on_mqtt_message_received(const std::string &topic, const std::string
if (switch_val == 0) if (switch_val == 0)
{ {
if (!RTMPManager::is_streaming(cam.name)) if (!RTMPManager::is_streaming(cam.name, type))
{ {
RTMPManager::start_camera(cam, type); RTMPManager::start_camera(cam, type);
op_result = true; op_result = true;
@ -87,7 +87,7 @@ static void on_mqtt_message_received(const std::string &topic, const std::string
} }
else else
{ {
if (RTMPManager::is_streaming(cam.name)) if (RTMPManager::is_streaming(cam.name, type))
{ {
RTMPManager::stop_camera(cam.name, type); RTMPManager::stop_camera(cam.name, type);
op_result = true; op_result = true;