first commit

This commit is contained in:
cxh 2025-09-08 15:25:59 +08:00
parent 58f991fe2b
commit ef8217467e

View File

@ -2,6 +2,8 @@
#include "app_config.hpp"
#include "rtsp_manager.hpp"
#include "logger.hpp"
#include "mqtt_client_wrapper.hpp"
#include <thread>
#include <atomic>
#include <csignal>
@ -31,8 +33,17 @@ int main()
return -1;
}
// 启动 RTSP
RTSPManager::init();
RTSPManager::start(g_app_config.cameras);
std::thread rtsp_thread([&]()
{ RTSPManager::start(g_app_config.cameras); });
// 启动 MQTT 客户端线程
std::thread mqtt_thread(mqtt_client_thread_func);
// 等待退出信号
rtsp_thread.join();
mqtt_thread.join();
return 0;
}