1.cameraID修复
This commit is contained in:
parent
e0ddead330
commit
022af3dd8c
|
@ -688,13 +688,15 @@ void appCreatThumbList(S8 *fileName)//start file name example: 10010032.JPG
|
|||
|
||||
MLOGI("fileName:%s\n",fileName);
|
||||
|
||||
if(fileName != NULL && fileName[0] != '\0' && fileName[0] != '0')
|
||||
if(fileName != NULL && fileName[0] != '\0' && fileName[0] != '0' && (strstr((char *)fileName, SF_DCF_EXT_MOV) || strstr((char *)fileName, SF_DCF_EXT_PHOTO)))
|
||||
{
|
||||
MLOGI("fileName2:%s\n",fileName);
|
||||
strncpy((char *)startDirKey, (char *)fileName, 3);
|
||||
strncpy((char *)startFileKey, (char *)fileName+4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
MLOGI("fileName3:%s\n",fileName);
|
||||
startDirKey[0] = '\0';
|
||||
startFileKey[0] = '\0';
|
||||
//strncpy((char *)startDirKey, "100", 3);
|
||||
|
@ -963,7 +965,7 @@ void sf_app_Get_Camera_Para(MSG_DEV_Param_Get_Rsp_T *CamPara)
|
|||
|
||||
CamPara->batType = puiPara->BatteryType;
|
||||
|
||||
CamPara->cameraID = puiPara->CamNameSwitch == 0 ? 1:0;
|
||||
CamPara->cameraID = puiPara->CamNameSwitch == SF_CAMID_OFF ? 0:1;
|
||||
strcpy((char *)CamPara->cameraIDstr, (char *)puiPara->CamNameStr);
|
||||
|
||||
CamPara->dateTimeAuto = puiPara->DateAuto;
|
||||
|
@ -1208,6 +1210,7 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
|
|||
strcpy((char *)fileName, (char *)pMsgStruct->msgBuf.getThumbList.fileName);
|
||||
MLOGI("[WIFI_GET_FILE_THUMBLIST],fileName:%s\n",fileName);
|
||||
appCreatThumbList(fileName);
|
||||
MLOGI("[WIFI_GET_FILE_THUMBLIST],fileName:%s\n",fileName);
|
||||
|
||||
memset((void *)&msgParse, 0, sizeof(msgParse));
|
||||
msgParse.magicNum = htons(MSG_PRE_FIX);
|
||||
|
@ -1650,7 +1653,7 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
|
|||
|
||||
case WIFI_SET_CAMERA_CameraID: //O
|
||||
MLOGI("[WIFI_SET_CAMERA_CameraID],cameraID:%d\n",pMsgStruct->msgBuf.setCameraID.cameraID);
|
||||
puiPara->CamNameSwitch = pMsgStruct->msgBuf.setCameraID.cameraID ? 0 : 1;
|
||||
puiPara->CamNameSwitch = pMsgStruct->msgBuf.setCameraID.cameraID == 0 ? SF_CAMID_OFF : SF_CAMID_ON;
|
||||
strncpy(puiPara->CamNameStr, (char *)pMsgStruct->msgBuf.setCameraID.cameraIDstr, 4); //Use SF_STRNCPY to avoid that APP has not send '\0'.
|
||||
sf_camera_name_check(puiPara->CamNameStr);
|
||||
puiPara->CamNameStr[4] = '\0';
|
||||
|
|
Loading…
Reference in New Issue
Block a user