1.movie2文件名顺序调整

This commit is contained in:
payton 2023-12-11 15:57:34 +08:00
parent 2b7af14a19
commit a3344924cf
2 changed files with 64 additions and 1 deletions

View File

@ -118,6 +118,7 @@ static VOS_TICK g_alg_end_time= 0;
static VOS_TICK g_vprc_trigger_frm_time= 0; static VOS_TICK g_vprc_trigger_frm_time= 0;
static UINT32 g_vprc_trigger_frm_count= 0; static UINT32 g_vprc_trigger_frm_count= 0;
UINT32 Movie2_nextFolderID = 0, Movie2_nextFileID = 0;
//local function //local function
static void MovieFast_OnRecStart(void); static void MovieFast_OnRecStart(void);
static void MovieFast_OnRecStop(void); static void MovieFast_OnRecStop(void);
@ -857,12 +858,48 @@ static void MovieFast_FileNamingCB(MOVIE_CFG_REC_ID id, char *pFileName)
//2. When it can erntry this function, only the File ID (serial number) is accumulated. //2. When it can erntry this function, only the File ID (serial number) is accumulated.
//3. If the working mode is normal and it is cyclic recording, please judge the DirID and FileID by yourself before enering next new file recording. //3. If the working mode is normal and it is cyclic recording, please judge the DirID and FileID by yourself before enering next new file recording.
UINT32 nextFolderID = 0, nextFileID = 0; UINT32 nextFolderID = 0, nextFileID = 0;
UINT32 max_cnt = 0;
if (DCF_GetDBInfo(DCF_INFO_IS_9999)) { if (DCF_GetDBInfo(DCF_INFO_IS_9999)) {
DBG_ERR("Exceed max dcf file!\r\n"); DBG_ERR("Exceed max dcf file!\r\n");
pFileName[0] = '\0'; pFileName[0] = '\0';
} else { } else {
DCF_GetNextID(&nextFolderID,&nextFileID); DCF_GetNextID(&nextFolderID,&nextFileID);
if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2)
{
Movie2_nextFolderID = nextFolderID;
Movie2_nextFileID = nextFileID;
switch (UI_GetData(FL_CONTINUE_SHOT))//puiPara->Multishot
{
case CONTINUE_SHOT_BURST_5:
max_cnt = 5;
break;
case CONTINUE_SHOT_BURST_4:
max_cnt = 4;
break;
case CONTINUE_SHOT_BURST_3:
max_cnt = 3;
break;
case CONTINUE_SHOT_BURST_2:
max_cnt = 2;
break;
case CONTINUE_SHOT_OFF:
default:
max_cnt = 1;
break;
}
for(UINT32 i = 0 ; i < max_cnt ; i++)
{
nextFileID++;
if (nextFileID > MAX_DCF_FILE_NUM) {
nextFileID = 1;
nextFolderID++;
if (nextFolderID > MAX_DCF_DIR_NUM) {
DBG_ERR("Exceed max dcf file!\r\n");
pFileName[0] = '\0';
}
}
}
}
DCF_MakeObjPath(nextFolderID, nextFileID, DCF_FILE_TYPE_MP4, pFileName); DCF_MakeObjPath(nextFolderID, nextFileID, DCF_FILE_TYPE_MP4, pFileName);
DCF_AddDBfile(pFileName); DCF_AddDBfile(pFileName);
DBG_DUMP("%s added to DCF\r\n", pFileName); DBG_DUMP("%s added to DCF\r\n", pFileName);

View File

@ -111,6 +111,8 @@ AET_STATUS_INFO ae_status = {0}; /* size of AET_STATUS_INFO is quite large, don'
//extern //extern
extern const unsigned char gDemoKit_Font[]; extern const unsigned char gDemoKit_Font[];
extern const unsigned char gDemoKit_Image[]; extern const unsigned char gDemoKit_Image[];
extern UINT32 Movie2_nextFolderID;
extern UINT32 Movie2_nextFileID;
//function //function
INT32 PhotoFast_FileNaming_MakePath(UINT32 filetype, CHAR *pPath, UINT32 uiPathId); INT32 PhotoFast_FileNaming_MakePath(UINT32 filetype, CHAR *pPath, UINT32 uiPathId);
@ -871,6 +873,30 @@ INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId,
fileType = DCF_FILE_TYPE_JPG; fileType = DCF_FILE_TYPE_JPG;
} }
DCF_GetNextID(&nextFolderID,&nextFileID); DCF_GetNextID(&nextFolderID,&nextFileID);
if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2)
{
nextFolderID = Movie2_nextFolderID;
nextFileID = Movie2_nextFileID;
if (nextFileID > MAX_DCF_FILE_NUM) {
nextFileID = 1;
nextFolderID++;
if (nextFolderID > MAX_DCF_DIR_NUM) {
DBG_ERR("Exceed max dcf file!\r\n");
FilePath[0] = '\0';
}
}
Movie2_nextFileID++;
if (Movie2_nextFileID > MAX_DCF_FILE_NUM) {
Movie2_nextFileID = 1;
Movie2_nextFolderID++;
if (Movie2_nextFolderID > MAX_DCF_DIR_NUM) {
DBG_ERR("Exceed max dcf file!\r\n");
FilePath[0] = '\0';
}
}
}
DCF_MakeObjPath(nextFolderID, nextFileID, fileType, FilePath); DCF_MakeObjPath(nextFolderID, nextFileID, fileType, FilePath);
DCF_AddDBfile(FilePath); DCF_AddDBfile(FilePath);
DBG_DUMP("%s added to DCF\r\n", FilePath); DBG_DUMP("%s added to DCF\r\n", FilePath);