#include "NewRecordVideoElement.h" #include #include #include //#todo index int -> string NewRecordVideoElement::NewRecordVideoElement(std::string camid) : //videoEncoderElement(cv::Size(1920, 1080), 5, 0), camID(camid), m_bSaveWH(false) { // basicPath(); //isRecord=false; m_cutPath= appPref.getStringData("user.loop.absolute.path"); recordInit(appPref.getIntData("n_cut_min_duration"),appPref.getIntData("n_cut_max_duration")); } NewRecordVideoElement::~NewRecordVideoElement() { std::queue empty; empty.swap(m_imgBufQue); } std::string NewRecordVideoElement::startRecord() { ImgInfo info; getImg(info); std::string srcPath= getFileName(info.time); m_filename=srcPath; // DBG("m_filename: " << m_filename); if(!m_bSaveWH) { m_bSaveWH=m_hiredisTool.hashSet(camID,"width",info.img.cols) && m_hiredisTool.hashSet(camID,"height",info.img.rows); DBG("m_bSaveWH="<