Function description
Real- time video and video playback reports GPS and related status description
Operating instructions
Live video
a. report according to ttx standard (this method is recommended)
When the program is initialized, fill in true, and the network library will automatically upload gps information once every 3 seconds.
TTXNET_SetUpStateInfoMode(true)
Platform video playback
// Read a frame of data
// Returns stream information for video and audio
// Some video frames also include GPS information. You need to return the GPS information as an information frame.
virtual bool ReadFrame( TTXFILEFrame_S pFrame1, TTXFILEFrame_S pFrame2 );
There are two ways to fill content
a. report according to ttx standard (this method is recommended)
The contents are as follows:
TTXGpsInfo_S TtxGps = TDNNetWorkIns()- >GetGpsInfo();
//TTXGpsInfo_S pTtxGps = &TtxGps;
TTXVehiStatus_S TtxVehStatus = TDNNetWorkIns()- >GetVehiStatus();
TTXIOStatus_S TtxIOStatus = TDNNetWorkIns()- >GetIOStatus();
TTXGsensorInfo_S TtxGsensor = TDNNetWorkIns()- >GetGsensorStatus();
//TTXVehiStatus_S pTtxVehStatus = &TtxVehStatus;
char cTemp[256] = {0};
TTXStateInfoIndexHead_S pHdr = (TTXStateInfoIndexHead_S)cTemp;
pHdr- >unStateInfoflag = TTX_UPLOAD_STATES_INFO;//This flag is used to judge the information frame of ttx
int offset = sizeof(TTXStateInfoIndexHead_S);
memcpy(cTemp offset,&TtxVehStatus,sizeof(TTXVehiStatus_S));
offset = sizeof(TTXVehiStatus_S);
pHdr- >usDataType | = (1<<0);// vehicle status information
memcpy(cTemp offset,&TtxGps,sizeof(TTXGpsInfo_S));
offset = sizeof(TTXGpsInfo_S);
pHdr- >usDataType | = (1<<1);// gps info
memcpy(cTemp offset,&TtxIOStatus,sizeof(TTXIOStatus_S));
offset = sizeof(TTXIOStatus_S);
pHdr- >usDataType | = (1<<2);// IO status
memcpy(cTemp offset,&TtxGsensor,sizeof(TTXGsensorInfo_S));
offset = sizeof(TTXGsensorInfo_S);
pHdr- >usDataType | = (1<<3);// gsensor status
pHdr- >usDataLen = offset - sizeof(TTXStateInfoIndexHead_S);