From a3344924cfb81369a7b6e09a1e2cda00472a2e76 Mon Sep 17 00:00:00 2001 From: payton Date: Mon, 11 Dec 2023 15:57:34 +0800 Subject: [PATCH] =?UTF-8?q?1.movie2=E6=96=87=E4=BB=B6=E5=90=8D=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cardv/SrcCode/UIApp/MovieFast/MovieFast.c | 39 ++++++++++++++++++- .../cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c | 26 +++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c index 7e2be1faa..3ec4a95c2 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -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); diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c index 0f2ff02ff..10f6b49c0 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c @@ -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);