first commit
This commit is contained in:
parent
d9a1d9732f
commit
ac50a5c01c
12
src/main.cpp
12
src/main.cpp
@ -52,18 +52,18 @@ int main()
|
|||||||
// 先在主线程初始化 GStreamer
|
// 先在主线程初始化 GStreamer
|
||||||
RTSPManager::init();
|
RTSPManager::init();
|
||||||
|
|
||||||
std::thread rtsp_thread = nullptr;
|
std::thread rtsp_thread;
|
||||||
std::thread mqtt_thread = nullptr;
|
std::thread mqtt_thread;
|
||||||
|
|
||||||
std::thread rtsp_thread([&]()
|
std::thread rtsp_thread([&]()
|
||||||
{
|
{
|
||||||
RTSPManager::start(g_app_config.cameras);
|
RTSPManager::start(g_app_config.cameras);
|
||||||
rtsp_thread_exited.store(true, std::memory_order_relaxed); });
|
rtsp_thread_exited.store(true, std::memory_order_relaxed); });
|
||||||
|
|
||||||
std::thread mqtt_thread([&]()
|
// std::thread mqtt_thread([&]()
|
||||||
{
|
// {
|
||||||
mqtt_client_thread_func();
|
// mqtt_client_thread_func();
|
||||||
mqtt_thread_exited.store(true, std::memory_order_relaxed); });
|
// mqtt_thread_exited.store(true, std::memory_order_relaxed); });
|
||||||
|
|
||||||
// 等待退出信号
|
// 等待退出信号
|
||||||
while (g_running.load(std::memory_order_relaxed))
|
while (g_running.load(std::memory_order_relaxed))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user