1.调试超时
This commit is contained in:
parent
99fdc6b2e0
commit
f112b33866
|
@ -1049,11 +1049,20 @@ static void MovieFast_Manual_Raw_Task(void* arg)
|
||||||
HD_PATH_ID vprc_path = ImageApp_MovieMulti_GetVprcInPort(_CFG_REC_ID_1);
|
HD_PATH_ID vprc_path = ImageApp_MovieMulti_GetVprcInPort(_CFG_REC_ID_1);
|
||||||
HD_RESULT ret;
|
HD_RESULT ret;
|
||||||
HD_VIDEO_FRAME frame;
|
HD_VIDEO_FRAME frame;
|
||||||
|
VOS_TICK t1, t2;
|
||||||
g_is_manual_raw_tsk_running = TRUE;
|
g_is_manual_raw_tsk_running = TRUE;
|
||||||
|
vos_perf_mark(&t1);
|
||||||
|
|
||||||
while(g_manual_raw_tsk_running)
|
while(g_manual_raw_tsk_running)
|
||||||
{
|
{
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
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, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS);
|
||||||
if(ret != HD_OK){
|
if(ret != HD_OK){
|
||||||
DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret);
|
DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret);
|
||||||
|
@ -1074,9 +1083,17 @@ static void MovieFast_Manual_Raw_Task(void* arg)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vos_perf_mark(&t1);
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (30*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
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, PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS);
|
||||||
if(ret != HD_OK){
|
if(ret != HD_OK){
|
||||||
DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret);
|
DBG_ERR("hd_videocap_pull_out_buf failed!(%d)\n", ret);
|
||||||
|
@ -1909,6 +1926,14 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n");
|
||||||
|
|
||||||
DBG_DUMP("count = %llu, timestamp = %llu\n", frame.count, frame.timestamp);
|
DBG_DUMP("count = %llu, timestamp = %llu\n", frame.count, frame.timestamp);
|
||||||
|
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("failed timeout\n");
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
if( vcap_frm_cnt >= PHOTOFAST_START_CAP_FRAME_CNT ||
|
if( vcap_frm_cnt >= PHOTOFAST_START_CAP_FRAME_CNT ||
|
||||||
(ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 5))){
|
(ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 5))){
|
||||||
|
|
||||||
|
@ -1929,13 +1954,6 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n");
|
||||||
hd_videoproc_release_out_buf(alg_path, &frame);
|
hd_videoproc_release_out_buf(alg_path, &frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
vos_perf_mark(&t2);
|
|
||||||
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
|
||||||
{
|
|
||||||
fastboot_msg_en(ENABLE);
|
|
||||||
DBG_ERR("failed timeout\n");
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
} while(1);
|
} while(1);
|
||||||
|
|
||||||
vos_perf_mark(&g_alg_end_time);
|
vos_perf_mark(&g_alg_end_time);
|
||||||
|
@ -2215,13 +2233,13 @@ static void MovieFast_Close(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(5);
|
||||||
}
|
}
|
||||||
vos_perf_mark(&t2);
|
vos_perf_mark(&t2);
|
||||||
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
||||||
{
|
{
|
||||||
fastboot_msg_en(ENABLE);
|
fastboot_msg_en(ENABLE);
|
||||||
DBG_ERR("failed timeout\n");
|
DBG_ERR("failed es timeout\n");
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2238,10 +2256,15 @@ static void MovieFast_Close(void)
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
||||||
DCF_Close(g_dcf_hdl);
|
if(g_dcf_hdl >= 0){
|
||||||
|
DCF_Close(g_dcf_hdl);
|
||||||
|
g_dcf_hdl = -1;
|
||||||
|
}
|
||||||
#if (FS_MULTI_STRG_FUNC)
|
#if (FS_MULTI_STRG_FUNC)
|
||||||
DCF_Close(g_dcf_hdl2);
|
if(g_dcf_hdl2 >= 0){
|
||||||
|
DCF_Close(g_dcf_hdl2);
|
||||||
|
g_dcf_hdl2 = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DCF_UnInstallID();
|
DCF_UnInstallID();
|
||||||
|
|
|
@ -1924,6 +1924,7 @@ static lfqueue_t queue23 = {0};
|
||||||
|
|
||||||
INT32 PhotoFast_Sliceencode2_Enq_Frame(const HD_VIDEO_FRAME* video_frame)
|
INT32 PhotoFast_Sliceencode2_Enq_Frame(const HD_VIDEO_FRAME* video_frame)
|
||||||
{
|
{
|
||||||
|
static int cnt = 0;
|
||||||
if(lfqueue_size(&queue12) >= PHOTOFAST_SLICE_ENC_QUEUE12_MAX_SIZE){
|
if(lfqueue_size(&queue12) >= PHOTOFAST_SLICE_ENC_QUEUE12_MAX_SIZE){
|
||||||
return E_SYS;
|
return E_SYS;
|
||||||
}
|
}
|
||||||
|
@ -1935,6 +1936,12 @@ INT32 PhotoFast_Sliceencode2_Enq_Frame(const HD_VIDEO_FRAME* video_frame)
|
||||||
|
|
||||||
while (lfqueue_enq(&queue12, (void*) queue_ele_out) == -1)
|
while (lfqueue_enq(&queue12, (void*) queue_ele_out) == -1)
|
||||||
{
|
{
|
||||||
|
cnt++;
|
||||||
|
if(cnt > 3)
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("cnt%d timeout\n",cnt);
|
||||||
|
}
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(1);
|
||||||
DBG_ERR("ENQ Full ?\r\n");
|
DBG_ERR("ENQ Full ?\r\n");
|
||||||
}
|
}
|
||||||
|
@ -1944,6 +1951,7 @@ INT32 PhotoFast_Sliceencode2_Enq_Frame(const HD_VIDEO_FRAME* video_frame)
|
||||||
|
|
||||||
INT32 PhotoFast_Sliceencode2_Stop(void)
|
INT32 PhotoFast_Sliceencode2_Stop(void)
|
||||||
{
|
{
|
||||||
|
static int cnt = 0;
|
||||||
PhotoFast_SliceEncode_Queue12_Param* queue_ele_out = NULL;
|
PhotoFast_SliceEncode_Queue12_Param* queue_ele_out = NULL;
|
||||||
queue_ele_out = (PhotoFast_SliceEncode_Queue12_Param*) malloc(sizeof(PhotoFast_SliceEncode_Queue12_Param));
|
queue_ele_out = (PhotoFast_SliceEncode_Queue12_Param*) malloc(sizeof(PhotoFast_SliceEncode_Queue12_Param));
|
||||||
memset(queue_ele_out, 0, sizeof(PhotoFast_SliceEncode_Queue12_Param));
|
memset(queue_ele_out, 0, sizeof(PhotoFast_SliceEncode_Queue12_Param));
|
||||||
|
@ -1951,6 +1959,12 @@ INT32 PhotoFast_Sliceencode2_Stop(void)
|
||||||
|
|
||||||
while (lfqueue_enq(&queue12, (void*) queue_ele_out) == -1)
|
while (lfqueue_enq(&queue12, (void*) queue_ele_out) == -1)
|
||||||
{
|
{
|
||||||
|
cnt++;
|
||||||
|
if(cnt > 3)
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("cnt%d timeout\n",cnt);
|
||||||
|
}
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(1);
|
||||||
DBG_ERR("ENQ Full ?\r\n");
|
DBG_ERR("ENQ Full ?\r\n");
|
||||||
}
|
}
|
||||||
|
@ -1978,6 +1992,7 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
|
||||||
UINT32 enc_accum_size = 0;
|
UINT32 enc_accum_size = 0;
|
||||||
static UINT8 primary_quality = CFG_PHOTOFAST_SLICE_ENC_INIT_QUALITY_PRIMARY;
|
static UINT8 primary_quality = CFG_PHOTOFAST_SLICE_ENC_INIT_QUALITY_PRIMARY;
|
||||||
static UINT8 screennail_quality = CFG_PHOTOFAST_SLICE_ENC_INIT_QUALITY_SCREENNAIL;
|
static UINT8 screennail_quality = CFG_PHOTOFAST_SLICE_ENC_INIT_QUALITY_SCREENNAIL;
|
||||||
|
VOS_TICK t1, t2;
|
||||||
|
|
||||||
if(!user_data){
|
if(!user_data){
|
||||||
DBG_ERR("user_data can't be null!\n");
|
DBG_ERR("user_data can't be null!\n");
|
||||||
|
@ -2033,9 +2048,18 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
|
||||||
exif_mem_info.blk_size = CFG_JPG_HEADER_SIZE;
|
exif_mem_info.blk_size = CFG_JPG_HEADER_SIZE;
|
||||||
if(PhotoFast_SliceEncode_Alloc_Buffer(&exif_mem_info, "slice_enc_exif") != E_OK)
|
if(PhotoFast_SliceEncode_Alloc_Buffer(&exif_mem_info, "slice_enc_exif") != E_OK)
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
|
|
||||||
|
vos_perf_mark(&t1);
|
||||||
|
|
||||||
do{
|
do{
|
||||||
|
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (30*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("sfailed timeout\n");
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
queue_ele_in = (PhotoFast_SliceEncode_Queue12_Param*)lfqueue_deq(param->queue12);
|
queue_ele_in = (PhotoFast_SliceEncode_Queue12_Param*)lfqueue_deq(param->queue12);
|
||||||
if(queue_ele_in == NULL){
|
if(queue_ele_in == NULL){
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(1);
|
||||||
|
@ -2214,9 +2238,16 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
|
||||||
DCF_AddDBfile(queue_ele_out->file_path);
|
DCF_AddDBfile(queue_ele_out->file_path);
|
||||||
DBG_DUMP("%s added to DCF\r\n", queue_ele_out->file_path);
|
DBG_DUMP("%s added to DCF\r\n", queue_ele_out->file_path);
|
||||||
#endif
|
#endif
|
||||||
|
vos_perf_mark(&t1);
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("2failed timeout\n");
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
if(lfqueue_size(param->queue23) >= PHOTOFAST_SLICE_ENC_QUEUE23_MAX_SIZE){
|
if(lfqueue_size(param->queue23) >= PHOTOFAST_SLICE_ENC_QUEUE23_MAX_SIZE){
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(1);
|
||||||
continue;
|
continue;
|
||||||
|
@ -2224,6 +2255,13 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
|
||||||
else{
|
else{
|
||||||
while (lfqueue_enq(param->queue23, (void*) queue_ele_out) == -1)
|
while (lfqueue_enq(param->queue23, (void*) queue_ele_out) == -1)
|
||||||
{
|
{
|
||||||
|
vos_perf_mark(&t2);
|
||||||
|
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("23failed timeout\n");
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
DBG_ERR("ENQ Full ?\r\n");
|
DBG_ERR("ENQ Full ?\r\n");
|
||||||
vos_util_delay_ms(5);
|
vos_util_delay_ms(5);
|
||||||
}
|
}
|
||||||
|
@ -2291,6 +2329,7 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
|
||||||
PhotoFast_SliceEncode_CB3_Param* param = NULL;
|
PhotoFast_SliceEncode_CB3_Param* param = NULL;
|
||||||
PhotoFast_SliceEncode_Queue23_Param* queue_ele_in = NULL;
|
PhotoFast_SliceEncode_Queue23_Param* queue_ele_in = NULL;
|
||||||
VOS_TICK t1, t2, t3, t4;
|
VOS_TICK t1, t2, t3, t4;
|
||||||
|
VOS_TICK t5, t6;
|
||||||
|
|
||||||
if(!user_data){
|
if(!user_data){
|
||||||
DBG_ERR("user_data can't be null!\n");
|
DBG_ERR("user_data can't be null!\n");
|
||||||
|
@ -2301,8 +2340,16 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
|
||||||
param = (PhotoFast_SliceEncode_CB3_Param*) user_data;
|
param = (PhotoFast_SliceEncode_CB3_Param*) user_data;
|
||||||
param->cnt = 0;
|
param->cnt = 0;
|
||||||
|
|
||||||
do{
|
vos_perf_mark(&t5);
|
||||||
|
|
||||||
|
do{
|
||||||
|
vos_perf_mark(&t6);
|
||||||
|
if((vos_perf_duration(t5, t6) / 1000) > (30*1000))
|
||||||
|
{
|
||||||
|
fastboot_msg_en(ENABLE);
|
||||||
|
DBG_ERR("erfailed timeout\n");
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
queue_ele_in = (PhotoFast_SliceEncode_Queue23_Param*)lfqueue_deq(param->queue23);
|
queue_ele_in = (PhotoFast_SliceEncode_Queue23_Param*)lfqueue_deq(param->queue23);
|
||||||
if(queue_ele_in == NULL){
|
if(queue_ele_in == NULL){
|
||||||
vos_util_delay_ms(1);
|
vos_util_delay_ms(1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user