Commit 61e306c1ccf2f6092d79ea86cf6b6b1cba12e9aa
1 parent
80793f7b
更新demo
Showing
1 changed file
with
31 additions
and
4 deletions
src/demo/demo.cpp
... | ... | @@ -996,11 +996,10 @@ string createTask(void *handle, std::vector<algorithm_type_t> algor_vec, int gi, |
996 | 996 | tparam.ipc_url = "rtsp://192.168.51.200:8554/320202202308231001001002"; |
997 | 997 | break; |
998 | 998 | case 26: |
999 | - // FFmpeg生成的解码错误数据流 | |
1000 | - tparam.ipc_url = "rtsp://192.168.10.4:8554/street"; | |
999 | + tparam.ipc_url = "/data/share/data/Street_4k_265.mp4"; | |
1001 | 1000 | break; |
1002 | 1001 | case 27: |
1003 | - tparam.ipc_url = "/data/share/data/Street_4k_265.mp4"; | |
1002 | + tparam.ipc_url = "rtsp://admin:ad123456@192.168.10.67:554/h264/ch1/main/av_stream"; | |
1004 | 1003 | break; |
1005 | 1004 | case 28: |
1006 | 1005 | tparam.ipc_url = "http://192.168.60.179:10016/公安局老桥头_CVR15F89410_1465819864_1B.mp4"; |
... | ... | @@ -1008,6 +1007,12 @@ string createTask(void *handle, std::vector<algorithm_type_t> algor_vec, int gi, |
1008 | 1007 | case 29: |
1009 | 1008 | tparam.ipc_url = "http://192.168.60.179:10016/不带头盔2.mp4"; |
1010 | 1009 | break; |
1010 | + case 30: | |
1011 | + tparam.ipc_url = "http://192.168.60.179:10016/nx_1-00000002.mp4"; | |
1012 | + break; | |
1013 | + case 31: | |
1014 | + tparam.ipc_url = "http://192.168.60.179:10016/duan1.avi"; | |
1015 | + break; | |
1011 | 1016 | default: |
1012 | 1017 | tparam.ipc_url = "/opt/share/data/Street.uvf"; |
1013 | 1018 | break; |
... | ... | @@ -1347,7 +1352,7 @@ init_mq_conn(handle); |
1347 | 1352 | |
1348 | 1353 | |
1349 | 1354 | |
1350 | - // int status = -1; | |
1355 | + int status = -1; | |
1351 | 1356 | // while (true) |
1352 | 1357 | // { |
1353 | 1358 | // status = get_task_status(handle,"34020000001320000207"); |
... | ... | @@ -1365,6 +1370,28 @@ init_mq_conn(handle); |
1365 | 1370 | // std::this_thread::sleep_for(std::chrono::seconds(5)); |
1366 | 1371 | // } |
1367 | 1372 | |
1373 | + map<int, string> gi_taskid_map; | |
1374 | + | |
1375 | +gi_taskid_map[27] = createTask(handle, algor_vec2, 27, true); | |
1376 | +gi_taskid_map[28] = createTask(handle, algor_vec2, 28, true); | |
1377 | +gi_taskid_map[29] = createTask(handle, algor_vec2, 29, true); | |
1378 | +gi_taskid_map[30] = createTask(handle, algor_vec2, 30, true); | |
1379 | +gi_taskid_map[31] = createTask(handle, algor_vec2, 31, true); | |
1380 | + | |
1381 | +while (1) { | |
1382 | + for (auto it = gi_taskid_map.begin(); it != gi_taskid_map.end(); it++) | |
1383 | + { | |
1384 | + int gi = it->first; | |
1385 | + string task_id = it->second; | |
1386 | + status = get_task_status(handle, task_id.c_str()); | |
1387 | + if (status == 0) { | |
1388 | + createTask(handle, algor_vec2, gi, true); | |
1389 | + } | |
1390 | + } | |
1391 | + | |
1392 | + std::this_thread::sleep_for(std::chrono::seconds(5)); | |
1393 | +} | |
1394 | + | |
1368 | 1395 | |
1369 | 1396 | |
1370 | 1397 | char ch = 'a'; | ... | ... |