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 9e5b7ca90..828ae78aa 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -2239,7 +2239,7 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); DBG_DUMP("Trigger speed = %lu\n", g_vprc_trigger_frm_time / 1000); } else{ - hd_videoproc_pull_out_buf(alg_path, &frame_capture, -1); + hd_videoproc_pull_out_buf(alg_path, &frame_capture, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); } DBG_DUMP("tmp_buf = %lx , frame.phy_addr[0] = %lx , copy size = %lx\n", @@ -2250,15 +2250,7 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); tmp_buf += yuv_size; */ hd_videoproc_release_out_buf(alg_path, &frame_capture); - #if HUNTING_CAMERA_MCU == ENABLE - sf_set_date_time_make_ymdhms(); - led_flag = FALSE; - ViewPullFlag = TRUE; - if((SF_MULTISHOT_INTEVEL_0S != puiPara->MultiShotIntevel) && (sf_is_night_mode(0) ==TRUE)){ - sf_ir_led_set(0, 0, 0, 0); - } - #endif //if(++cnt >= max_cnt) // break; vos_perf_mark(&t2); @@ -2269,8 +2261,50 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); goto EXIT; } -#if HUNTING_CAMERA_MCU == ENABLE - while(ViewPullFlag) { +#if 1 + if((tmp_buf + yuv_size) > (tmp_buf + tmp_buf_size)){ + DBG_ERR("tmp buffer overflow!!\n"); + goto EXIT; + } + + if(cnt == 0){ + g_vprc_trigger_frm_time = frame_capture.timestamp; + g_vprc_trigger_frm_count = frame_capture.count; + DBG_DUMP("Trigger speed = %lu\n", g_vprc_trigger_frm_time / 1000); + } + else{ + hd_videoproc_pull_out_buf(alg_path, &frame_capture, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS); + } + + DBG_DUMP("tmp_buf = %lx , frame.phy_addr[0] = %lx , copy size = %lx\n", + tmp_buf, frame_capture.phy_addr[0], yuv_size); + if(cnt>0) + { + memcpy((void*)(tmp_buf), (void*)frame_capture.phy_addr[0], yuv_size); + + tmp_buf += yuv_size; + #if HUNTING_CAMERA_MCU == ENABLE + sf_set_date_time_make_ymdhms(); + #endif + } + hd_videoproc_release_out_buf(alg_path, &frame_capture); + + #if HUNTING_CAMERA_MCU == ENABLE + //sf_set_date_time_make_ymdhms(); + + led_flag = FALSE; + ViewPullFlag = TRUE; + if((cnt>0) && (SF_MULTISHOT_INTEVEL_0S != puiPara->MultiShotIntevel) && (sf_is_night_mode(0) ==TRUE)){ + sf_ir_led_set(0, 0, 0, 0); + } + #endif + + cnt++; + if(cnt > max_cnt) + break; + + #if HUNTING_CAMERA_MCU == ENABLE + while((cnt>1) && (ViewPullFlag)) { if(TRUE == flow_preview_get_stop_flag()){ DBG_WRN("detected stop signal, power off ...\n"); @@ -2305,33 +2339,6 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); } } #endif -#if 1 - if((tmp_buf + yuv_size) > (tmp_buf + tmp_buf_size)){ - DBG_ERR("tmp buffer overflow!!\n"); - goto EXIT; - } - - if(cnt == 0){ - g_vprc_trigger_frm_time = frame_capture.timestamp; - g_vprc_trigger_frm_count = frame_capture.count; - DBG_DUMP("Trigger speed = %lu\n", g_vprc_trigger_frm_time / 1000); - } - else{ - hd_videoproc_pull_out_buf(alg_path, &frame_capture, -1); - } - - DBG_DUMP("tmp_buf = %lx , frame.phy_addr[0] = %lx , copy size = %lx\n", - tmp_buf, frame_capture.phy_addr[0], yuv_size); - if(cnt>0) - { - memcpy((void*)(tmp_buf), (void*)frame_capture.phy_addr[0], yuv_size); - - tmp_buf += yuv_size; - } - hd_videoproc_release_out_buf(alg_path, &frame_capture); - cnt++; - if(cnt > max_cnt) - break; #endif } while(TRUE != flow_preview_get_stop_flag()); #endif @@ -2341,9 +2348,10 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); if(sf_is_night_mode(0) ==TRUE) { DBG_ERR(">>>>>>>>>>>>>>>>>>>>>night mode<<<<<<<<<<<<<\r\n"); - /*if((SF_MULTISHOT_INTEVEL_0S == puiPara->MultiShotIntevel)){ + if((SF_MULTISHOT_INTEVEL_0S == puiPara->MultiShotIntevel)){ sf_ir_led_set(0, 0, 0, 0); - }*/ + } + vos_util_delay_ms(10); sf_ir_led_set(((2 == puiPara->NightMode) ? 2 : 1),puiPara->FlashLed, puiPara->NightMode, 1); } #endif