From 61e306c1ccf2f6092d79ea86cf6b6b1cba12e9aa Mon Sep 17 00:00:00 2001 From: cmhu <2657262686@qq.com> Date: Thu, 17 Oct 2024 16:13:33 +0800 Subject: [PATCH] 更新demo --- src/demo/demo.cpp | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/demo/demo.cpp b/src/demo/demo.cpp index 97d0b3b..ff911f9 100755 --- a/src/demo/demo.cpp +++ b/src/demo/demo.cpp @@ -996,11 +996,10 @@ string createTask(void *handle, std::vector algor_vec, int gi, tparam.ipc_url = "rtsp://192.168.51.200:8554/320202202308231001001002"; break; case 26: - // FFmpeg生成的解码错误数据流 - tparam.ipc_url = "rtsp://192.168.10.4:8554/street"; + tparam.ipc_url = "/data/share/data/Street_4k_265.mp4"; break; case 27: - tparam.ipc_url = "/data/share/data/Street_4k_265.mp4"; + tparam.ipc_url = "rtsp://admin:ad123456@192.168.10.67:554/h264/ch1/main/av_stream"; break; case 28: tparam.ipc_url = "http://192.168.60.179:10016/公安局老桥头_CVR15F89410_1465819864_1B.mp4"; @@ -1008,6 +1007,12 @@ string createTask(void *handle, std::vector algor_vec, int gi, case 29: tparam.ipc_url = "http://192.168.60.179:10016/不带头盔2.mp4"; break; + case 30: + tparam.ipc_url = "http://192.168.60.179:10016/nx_1-00000002.mp4"; + break; + case 31: + tparam.ipc_url = "http://192.168.60.179:10016/duan1.avi"; + break; default: tparam.ipc_url = "/opt/share/data/Street.uvf"; break; @@ -1347,7 +1352,7 @@ init_mq_conn(handle); - // int status = -1; + int status = -1; // while (true) // { // status = get_task_status(handle,"34020000001320000207"); @@ -1365,6 +1370,28 @@ init_mq_conn(handle); // std::this_thread::sleep_for(std::chrono::seconds(5)); // } + map gi_taskid_map; + +gi_taskid_map[27] = createTask(handle, algor_vec2, 27, true); +gi_taskid_map[28] = createTask(handle, algor_vec2, 28, true); +gi_taskid_map[29] = createTask(handle, algor_vec2, 29, true); +gi_taskid_map[30] = createTask(handle, algor_vec2, 30, true); +gi_taskid_map[31] = createTask(handle, algor_vec2, 31, true); + +while (1) { + for (auto it = gi_taskid_map.begin(); it != gi_taskid_map.end(); it++) + { + int gi = it->first; + string task_id = it->second; + status = get_task_status(handle, task_id.c_str()); + if (status == 0) { + createTask(handle, algor_vec2, gi, true); + } + } + + std::this_thread::sleep_for(std::chrono::seconds(5)); +} + char ch = 'a'; -- libgit2 0.21.4