1.movie2文件名顺序调整
This commit is contained in:
parent
2b7af14a19
commit
a3344924cf
|
@ -118,6 +118,7 @@ static VOS_TICK g_alg_end_time= 0;
|
|||
static VOS_TICK g_vprc_trigger_frm_time= 0;
|
||||
static UINT32 g_vprc_trigger_frm_count= 0;
|
||||
|
||||
UINT32 Movie2_nextFolderID = 0, Movie2_nextFileID = 0;
|
||||
//local function
|
||||
static void MovieFast_OnRecStart(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.
|
||||
//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 max_cnt = 0;
|
||||
if (DCF_GetDBInfo(DCF_INFO_IS_9999)) {
|
||||
DBG_ERR("Exceed max dcf file!\r\n");
|
||||
pFileName[0] = '\0';
|
||||
} else {
|
||||
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_AddDBfile(pFileName);
|
||||
DBG_DUMP("%s added to DCF\r\n", pFileName);
|
||||
|
|
|
@ -111,6 +111,8 @@ AET_STATUS_INFO ae_status = {0}; /* size of AET_STATUS_INFO is quite large, don'
|
|||
//extern
|
||||
extern const unsigned char gDemoKit_Font[];
|
||||
extern const unsigned char gDemoKit_Image[];
|
||||
extern UINT32 Movie2_nextFolderID;
|
||||
extern UINT32 Movie2_nextFileID;
|
||||
|
||||
//function
|
||||
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;
|
||||
}
|
||||
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_AddDBfile(FilePath);
|
||||
DBG_DUMP("%s added to DCF\r\n", FilePath);
|
||||
|
|
Loading…
Reference in New Issue
Block a user