From d3b7bbe7102cd089680a828f5d8f6402c8cf6342 Mon Sep 17 00:00:00 2001 From: pansen <pansen626@sina.com> Date: 星期四, 07 三月 2019 14:43:28 +0800 Subject: [PATCH] GB28181集成完成,集成推流模块 --- QiaoJiaSystem/StructureApp/HiredisTool.h | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/QiaoJiaSystem/StructureApp/HiredisTool.h b/QiaoJiaSystem/StructureApp/HiredisTool.h index b57e0ee..d4adab1 100644 --- a/QiaoJiaSystem/StructureApp/HiredisTool.h +++ b/QiaoJiaSystem/StructureApp/HiredisTool.h @@ -2,12 +2,14 @@ #define HIREDISTOOL_H #include <opencv/cv.h> //#include <hiredis.h> +#include <basic/util/BASE64/Base64.h> #include "../../BasicPlatForm/libs/hiredis-master/include/hiredis.h" #include <map> #include <queue> struct ImgInfo { std::string time; + uint64_t framePts; cv::Mat img; }; @@ -22,6 +24,10 @@ // std::map<std::string,int> findAllCamera(); bool clearAllImageBuf(); + bool setKeyImage(const std::string& file_name,const cv::Mat& img); + void getKeyImage(const std::string& imageName,cv::Mat& img); + + bool pushImageBuf(const std::string& file_name,const cv::Mat& img); void getImage(const std::string& file_name,cv::Mat& img); @@ -32,6 +38,7 @@ bool delKey(const std::string& key); bool listRpop(const std::string& key,std::string& value); + bool listLpush(const std::string& key,const std::string& value); int getSize(const std::string& key); bool hashDel(const std::string& tab,const std::string &key); bool hashSet(const std::string& tab,const std::string& key,const int& value); @@ -40,15 +47,18 @@ bool listLindex(const std::string& key,std::string& value); // bool listRpop(const std::string& key,std::string& value); - bool listLpush(const std::string& key,const std::string& value); - - + //bool listLpush(const std::string& key,const std::string& value); + //Redis SET KEY VALUE cmd + bool setKeyValue(const std::string& key,const std::string& value); + //bool GET KEY cmd + bool getKeyValue(const std::string& key,std::string& value); bool checkParam(); bool checkResult(redisReply *reply); void init(); private: redisContext *m_redis; int m_nImgListLen; + Base64 m_base64; }; -- Gitblit v1.8.0