• 0
Sign in to follow this  
macielcr7

c++ exportar frames de array de bytes

Question

Estou usando o sdk dahua para conectar-me a um DVR. Até então. Estou tendo problemas para obter os bytes

retornados de uma câmera. e exportar em formato de imagem. Sou iniciante e não tenho ideia. como.

// 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.

         //NESTA PARTE RECEBO OS BYTES QUERIA SABER COMO SALVAR EM FORTAMO DE IMAGEM OS FRAMES DESSE BYTE  
         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);


}

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this