dahua sdk export jpg realtime c++

216 views
Skip to first unread message

Maciel Sousa

unread,
Dec 31, 2017, 9:58:53 AM12/31/17
to C++ RTMP Server
I am using sdk dahua to connect to a DVR. Until then. I'm having trouble getting the bytes returned from a camera. and export in image format. I'm a beginner and I have no idea. how.


// real-time monitoring method
g_lRealHandle = CLIENT_RealPlayEx(g_lLoginHandle, command_options.dvr_channel, NULL, emRealPlayType);


//set-callback  
CLIENT_SetRealDataCallBackEx(g_lRealHandle, &RealDataCallBackEx, NULL, dwFlag)

//bytes de retorno da camera
void CALLBACK RealDataCallBackEx(LLONG lRealHandle, DWORD dwDataType, BYTE *pBuffer, DWORD dwBufSize, LONG param, LDWORD dwUser) {
// if more than one real-time monitoring use same data callback, we can judge by parameter lRealHandle.


         fwrite (pBuffer, 1, dwBufSize, file);
         fflush(file);
         //original A/V hybrid data

         //printf("receive real data, param: lRealHandle[%ld], dwDataType[%u], pBuffer[%p], dwBufSize[%u], param[%d], dwUser[%ld] - [%d]\n", lRealHandle, dwDataType, pBuffer, dwBufSize, param, dwUser, bInput);


}
Reply all
Reply to author
Forward
0 new messages