/******************************************************************************
* function : main()
* Description : video venc sample
******************************************************************************/
int sample_venc(char which)
{
HI_S32 s32Ret;
joseph_feed_pthread_by_signal();
which +=0x30;
switch (which)
{
case '0': /* H.264@720p@30fps+H.264@VGA@30fps+H.264@QVGA@30fps */
s32Ret = SAMPLE_VENC_720P_CLASSIC();
break;
case '1':/* 1*720p mjpeg encode */
s32Ret = SAMPLE_VENC_720P_MJPEG();
break;
case '2':/* 1*720p JPEG snap */
s32Ret = SAMPLE_VENC_720P_Snap();
break;
default:
printf("the index is invaild!\n");
return HI_FAILURE;
}
if (HI_SUCCESS == s32Ret)
{
printf("program exit normally!\n");
return 0;
}
else
{
printf("program exit abnormally!\n");
return -1;
}
//exit(s32Ret);
}