From 1f16245b4b4fc36c519e7afc9fd9cf828f25199d Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期四, 28 二月 2019 20:06:35 +0800
Subject: [PATCH] 修改新增摄像机获取底图问题 解码两次问题
---
QiaoJiaSystem/StructureApp/NewRecordVideoElement.h | 56 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
index 8da45c7..2b578f5 100644
--- a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
+++ b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
@@ -1,12 +1,13 @@
#ifndef NEWRECORDVIDEOELEMENT_H
#define NEWRECORDVIDEOELEMENT_H
-
+//#include <basic/pipe/PipeElement.h>
#include <basic/pipe_element/ffmpeg/FfmpegElement.h>
-struct ImgInfo
-{
- std::string time;
- cv::Mat img;
-};
+#include "HiredisTool.h"
+//struct ImgInfo
+//{
+// std::string time;
+// cv::Mat img;
+//};
class NewRecordVideoElement {
public:
@@ -16,23 +17,42 @@
~NewRecordVideoElement();
- std::string startRecord();
+ void setSdkTrigger(bool isTrigger);
+ void pushImgBuf(const std::string& time,cv::Mat& img);
- void doRecord();
-
- void endRecord();
-
- void pushImgBuf(const std::string& time,cv::Mat img);
-
- void getImg(ImgInfo& info);
-
+//private:
+// virtual void threadFunc() override;
+// virtual void threadInitial() override;
private:
- std::string getFileName(std::string timeStamp);
- std::string makeDir();
+ void recordInit(int videoMin, int videoMax);
+ void Record();
+
+ int fileMin;
+ int fileMax;
+ bool sdkTrigger;
+ int triggerDelay;
+
+#define RECORD_STOP (0)
+#define RECORD_DOING (1)
+#define RECORD_ENDING (2)
+ int recordStatus;
+ int videoLength;
+ int recordDelay;
+private:
+ std::string startRecord();
+ void doRecord();
+ void endRecord();
+ void getImg(ImgInfo& info);
+ std::string getFileName(const std::string& timeStamp);
+ std::string makeDir(const std::string& timeStamp);
+
ffmpeg::VideoEncodeElement videoEncoderElement;
std::string camID;
std::string m_cutPath;
- std::list<ImgInfo> m_imgBufQue;
+ std::queue<ImgInfo> m_imgBufQue;
+ HiredisTool m_hiredisTool;
+ std::string m_filename;
+ bool m_bSaveWH;
};
#endif // RECORDVIDEOELEMENT_H
--
Gitblit v1.8.0