From 9434ecdf920c13f73af4e557f0cd91b22c9f589a Mon Sep 17 00:00:00 2001 From: cxh Date: Tue, 9 Sep 2025 11:08:34 +0800 Subject: [PATCH] first commit --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b28d89e..8860aef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,8 +35,14 @@ int main() return -1; } + // 先在主线程初始化 GStreamer + RTSPManager::init(); + + // 启动 RTSP server(loop 可在子线程) std::thread rtsp_thread([&]() { RTSPManager::start(g_app_config.cameras); }); + + // 启动 MQTT 客户端线程 std::thread mqtt_thread(mqtt_client_thread_func); // 等待退出信号