1.预约发送检查文件是否存在
This commit is contained in:
parent
041d8d89a3
commit
52f09283fc
|
@ -1975,12 +1975,17 @@ void sf_hd_pic_add_to_list(UINT8 *fileName)
|
|||
UINT8 tempStr[20] = {0};
|
||||
SubImgList_t *pList = pSubImgListHead;
|
||||
SubImgList_t *qList = pSubImgListHead;
|
||||
|
||||
char fname[50] = {0};
|
||||
printf("[%s:%d] add to list:%s\n", __FUNCTION__, __LINE__, fileName);
|
||||
SF_STRNCPY(tempStr, fileName+1, 3);
|
||||
dirKey = atoi((const char *)tempStr);
|
||||
fileKey = atoi((const char *)fileName+4);
|
||||
|
||||
SF_SPRINTF(fname, "%s/%03dMEDIA/%s%04d.JPG", SF_DCIM_DIR, dirKey, DCF_FILE_NAME, fileKey);
|
||||
if(sf_file_IsExsit(fname) != SF_TRUE)
|
||||
{
|
||||
MLOGE("%s\n", fname);
|
||||
return;
|
||||
}
|
||||
if(pSubImgListHead == NULL)
|
||||
{
|
||||
pSubImgListHead = (SubImgList_t *)malloc(sizeof(SubImgList_t));
|
||||
|
@ -2088,13 +2093,40 @@ void sf_video_add_to_list(UINT8 *fileName)
|
|||
SubImgList_t *qList = pSubVideoListHead;
|
||||
//sfPara_t* pSifarPara = sf_ParaGet();
|
||||
//UINT8 subscribeMaxNum = SUBSCRIBE_MAX_NUM - pSifarPara->subscribeSendCnt;
|
||||
|
||||
char fname[50] = {0};
|
||||
UINT32 fileSize = 0;
|
||||
UINT32 fileIndex = 0;
|
||||
UINT8 i = 0;
|
||||
UINT16 dirKeytmp = 0;
|
||||
UINT16 fileKeytmp = 0;
|
||||
printf("add to list:%s\n", fileName);
|
||||
|
||||
SF_STRNCPY(tempStr, fileName+1, 3);
|
||||
dirKey = atoi((const char *)tempStr);
|
||||
fileKey = atoi((const char *)fileName+4);
|
||||
|
||||
fileIndex = dirKey * 10000 + fileKey + 1;
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
dirKeytmp = fileIndex / 10000;
|
||||
fileKeytmp = fileIndex % 10000;
|
||||
SF_SPRINTF(fname, "%s/%03dMEDIA/%s%04d.MP4", SF_DCIM_DIR, dirKeytmp, DCF_FILE_NAME, fileKeytmp);
|
||||
sf_file_size_get(fname,&fileSize);
|
||||
printf("find video:%s size=%d\n", fname, fileSize);
|
||||
|
||||
if(fileSize != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
fileIndex++;
|
||||
}
|
||||
if(fileSize == 0)
|
||||
{
|
||||
MLOGE("No File %s\n", fname);
|
||||
return;
|
||||
}
|
||||
|
||||
if(pSubVideoListHead == NULL)
|
||||
{
|
||||
pSubVideoListHead = (SubImgList_t *)malloc(sizeof(SubImgList_t));
|
||||
|
@ -2167,10 +2199,10 @@ SINT32 sf_simcom_check_need_send(void)
|
|||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||
|
||||
UINT8 PowerOnMode = sf_poweron_type_get();
|
||||
printf("[%s:%d]sf_get_pic()=%d,puiPara->NetGeneration=%d\n", __FUNCTION__, __LINE__, sf_get_pic(), puiPara->NetGeneration);
|
||||
printf("[%s:%d]sf_get_pic()=%d,netGeneration=%d\n", __FUNCTION__, __LINE__, sf_get_pic(), sf_get_net_generation());
|
||||
|
||||
if((sf_get_sim_insert()) && ((sf_get_mode_flag() == 1) || (PowerOnMode == PWR_ON_PIR) || (PowerOnMode == PWR_ON_TIMELAPSE) || (sf_get_pic() == SF_TRUE))
|
||||
&& ((puiPara->SendPhotoSwitch == 1) || ((puiPara->CamMode == SF_CAM_MODE_VIDEO) && (puiPara->SendVideoSwitch == 1) && (puiPara->NetGeneration == 4))))
|
||||
&& ((puiPara->SendPhotoSwitch == 1) || ((puiPara->CamMode == SF_CAM_MODE_VIDEO) && (puiPara->SendVideoSwitch == 1) && (sf_get_net_generation() == 4))))
|
||||
{
|
||||
if((sf_check_ftp_send(1) == SF_SUCCESS))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user