Home > Software engineering > On access to through the socket hai kang device camera data stream is sent to the client how to acqu
On access to through the socket hai kang device camera data stream is sent to the client how to acqu
Time:09-17
Hello everyone, I by socket telecommunication using mina framework to write a remote access to the sea, streaming real-time view, the current network communication has already passed, but on the server how to obtain video stream data sent to the client here is in trouble, don't know how to pick up the sea kang equipment data stream is sent to the client, client implementation preview Hai kang SDK provides the callback source: now I add it to my source, how can I do to get to ask everybody to help
public class FRealDataCallBack implements HCNetSDK. FRealDataCallBack_V30 { @ Override Public void invoke (NativeLong lRealHandle, int dwDataType, ByteByReference pBuffer, int dwBufSize, Pointer pUser) { //TODO Auto - generated method stub HWND HWND=new HWND (Native getComponentPointer (top)); The switch (dwDataType) { Case HCNetSDK.NET _DVR_SYSHEAD: System. The out. Println (" System data "); if (! PlayControl. PlayM4_GetPort (m_lPort)) { System. The out. Println (" broadcast port number "+ playControl. PlayM4_GetPort (m_lPort)); break; } If (dwBufSize> 0 { if (! PlayControl. PlayM4_SetStreamOpenMode (m_lPort. GetValue (), PlayCtrl. STREAME_REALTIME)) { System. The out. Println (" set up a real-time streaming mode "); break; } if (! PlayControl. PlayM4_OpenStream (m_lPort. GetValue (), pBuffer, dwBufSize, 1024 * 1024))//open flow interface { System. The out. Println (" open flow interface "); break; }
If (! PlayControl. PlayM4_Play (m_lPort. GetValue (), the HWND))//play begin { System. The out. Println (" played "); break; }