From 71156fd4aaa5f18ba9f95f9f08bc930a321e257c Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期一, 16 一月 2023 11:26:58 +0800 Subject: [PATCH] 完善摄像机接口, 增加实时轮询参数 --- camera.cpp | 74 +++++++++++++++++++++++++++++++----- 1 files changed, 63 insertions(+), 11 deletions(-) diff --git a/camera.cpp b/camera.cpp index 127ed6e..638d4d2 100644 --- a/camera.cpp +++ b/camera.cpp @@ -1,19 +1,71 @@ +/****************************************************************************** + + 鐗堟潈鎵�鏈� (C), 2001-2011, 鍖椾含璐濇�濈鎶�鏈湁闄愬叕鍙� + + ****************************************************************************** + 鏂� 浠� 鍚� : camera.cpp + 鐗� 鏈� 鍙� : 鍒濈 + 浣� 鑰� : cheliequan + 鐢熸垚鏃ユ湡 : 2023骞�1鏈�13鏃� + 鏈�杩戜慨鏀� : + 鍔熻兘鎻忚堪 : 鑾峰彇鐩告満鐩稿叧淇℃伅 + 鍑芥暟鍒楄〃 : + dbapi_get_cameras_by_runtype + dbapi_get_gb28181_cameras_by_runtype + 淇敼鍘嗗彶 : + 1.鏃� 鏈� : 2023骞�1鏈�13鏃� + 浣� 鑰� : cheliequan + 淇敼鍐呭 : 鍒涘缓鏂囦欢 + +******************************************************************************/ + +/*----------------------------------------------* + * 鍖呭惈澶存枃浠� * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 澶栭儴鍙橀噺璇存槑 * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 澶栭儴鍑芥暟鍘熷瀷璇存槑 * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 鍐呴儴鍑芥暟鍘熷瀷璇存槑 * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 鍏ㄥ眬鍙橀噺 * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 妯″潡绾у彉閲� * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 甯搁噺瀹氫箟 * + *----------------------------------------------*/ + +/*----------------------------------------------* + * 瀹忓畾涔� * + *----------------------------------------------*/ + #include "dbapi.h" #include "util.h" - using namespace protomsg; // 鍔爂et鍙傛暟 runType 1: 瀹炴椂 0 杞 -bool dbapi_get_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> & list) { +bool dbapi_get_cameras_by_runType(void *handle, std::vector<protomsg::Camera> &list, char *runType, bool gb28181) { const char *topic = DATA_URL_PREFIX("/camera/getCamerasByRunType"); + if (gb28181) { + topic = DATA_URL_PREFIX("/gb28181/camera/getCamerasByRunType)"); + } - return true; -} + std::map<string, string> params; + params["runType"] = runType; + bool ret = bus_dbapi_get_list(handle, topic, list, params); + params.clear(); -// 鍔爂et鍙傛暟 runType 1: 瀹炴椂 0 杞 -bool dbapi_get_gb28181_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> & list) { - const char *topic = DATA_URL_PREFIX("/gb28181/camera/getCamerasByRunType"); - - return true; -} - + return ret; +} \ No newline at end of file -- Gitblit v1.8.0