diff --git a/src/mqtt_client_wrapper.cpp b/src/mqtt_client_wrapper.cpp index 0aed6c6..4948ecd 100644 --- a/src/mqtt_client_wrapper.cpp +++ b/src/mqtt_client_wrapper.cpp @@ -113,8 +113,11 @@ static void handle_video_down_request(const nlohmann::json& req) int loc = 0; for (const auto& ch : channels_info) { - resp["data"].push_back({{"loc", loc}, {"url", ch.url}}); - loc++; + if (ch.running) + { + resp["data"].push_back({{"loc", loc}, {"url", ch.url}}); + loc++; + } } mqtt_client->publish(g_app_config.mqtt.topics.video_down, resp.dump(-1), 1); diff --git a/src/rtmp_manager.cpp b/src/rtmp_manager.cpp index a75bfd5..751a450 100644 --- a/src/rtmp_manager.cpp +++ b/src/rtmp_manager.cpp @@ -306,7 +306,7 @@ bool RTMPManager::is_streaming(const std::string& cam_name) std::string RTMPManager::get_stream_url(const std::string& cam_name) { std::string ip = get_ip_address("enP2p33s0"); - if (ip.empty()) ip = "127.0.0.1"; + if (ip.empty()) ip = "192.168.4.194"; return "http://" + ip + ":11985/rtc/v1/whep/?app=camera&stream=" + cam_name + "_main&vhost=live"; }