MP4录像增加一级目录,按照:年月/年月日/*.mp4存储;

增加按月,按天查询mp4录像;
消除一处编译器警告;
This commit is contained in:
liuziloong
2020-01-20 15:02:45 +08:00
parent ee2ca4bda5
commit 2384aa5bbd
3 changed files with 84 additions and 22 deletions

View File

@@ -53,9 +53,10 @@ MP4Recorder::~MP4Recorder() {
void MP4Recorder::createFile() {
closeFile();
auto strDate = getTimeStr("%Y-%m-%d");
auto strDay = getTimeStr("%Y-%m-%d");
auto strTime = getTimeStr("%H-%M-%S");
auto strFileTmp = _strPath + strDate + "/." + strTime + ".mp4";
auto strFile = _strPath + strDate + "/" + strTime + ".mp4";
auto strFileTmp = _strPath + strDate + "/" + strDay + "/." + strTime + ".mp4";
auto strFile = _strPath + strDate + "/" + strDay + "/" + strTime + ".mp4";
/////record 业务逻辑//////
_info.ui64StartedTime = ::time(NULL);
@@ -66,6 +67,7 @@ void MP4Recorder::createFile() {
+ _info.strAppName + "/"
+ _info.strStreamId + "/"
+ strDate + "/"
+ strDay + "/"
+ strTime + ".mp4";
try {