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 6df1f7358..35aeb532a 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -171,6 +171,16 @@ static ER MovieFast_InstallID(void) return ret; } +void sf_power_off(void) +{ + sf_file_thumb_cfg_sava(); + sf_para_print(); + sf_log_sava(); + FileSys_CloseEx('A', FST_TIME_INFINITE); + FileSys_CloseEx('B', FST_TIME_INFINITE); + fastboot_set_done(BOOT_FLOW_BOOT); + flow_wait_linux(); +} THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg) { const BOOL delay_ms = 200; @@ -194,6 +204,7 @@ THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg) { fastboot_msg_en(ENABLE); DBG_ERR("failed timeout ID:%d\n", MOVIEFAST_FLG_ID); + sf_power_off(); goto exit; break; } @@ -204,10 +215,10 @@ THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg) vos_flag_set(MOVIEFAST_FLG_ID, FLGMOVIEFAST_SHUTDOWN); } else{ - exit: + MovieFast_ShutDown(); } - + exit: THREAD_RETURN(0); } @@ -1099,13 +1110,13 @@ static void MovieFast_Manual_Raw_Task(void* arg) break; } - ret = hd_videocap_pull_out_buf(vcap_path, &frame, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); + ret = hd_videocap_pull_out_buf(vcap_path, &frame, 300); if(ret != HD_OK){ DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret); continue; } - ret = hd_videoproc_push_in_buf(vprc_path, &frame, NULL, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); + ret = hd_videoproc_push_in_buf(vprc_path, &frame, NULL, 300); /* exposure time might quicker than ipp capability , ignore overrun err */ if(ret != HD_OK && ret != HD_ERR_OVERRUN){ DBG_ERR("hd_videoproc_push_in_buf failed!(%d)\n", ret); @@ -1130,13 +1141,13 @@ static void MovieFast_Manual_Raw_Task(void* arg) DBG_ERR("failed timeout\n"); break; } - ret = hd_videocap_pull_out_buf(vcap_path, &frame, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); + ret = hd_videocap_pull_out_buf(vcap_path, &frame, 300); if(ret != HD_OK){ DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret); break; } - ret = hd_videoproc_push_in_buf(vprc_path, &frame, NULL, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); + ret = hd_videoproc_push_in_buf(vprc_path, &frame, NULL, 300); /* exposure time might quicker than ipp capability , ignore overrun err */ if(ret != HD_OK && ret != HD_ERR_OVERRUN){ @@ -2247,7 +2258,7 @@ static void MovieFast_Close(void) UINT32 delay_cnt; - delay_cnt = 10; + delay_cnt = 1000; g_manual_raw_tsk_running = FALSE; while (g_is_manual_raw_tsk_running && delay_cnt) {