Пример #1
0
 public void Stop()
 {
     PlayCtrl_X86.PlayM4_Stop(ClientPort);
     PlayCtrl_X86.PlayM4_CloseStream(ClientPort);
     PlayCtrl_X86.PlayM4_FreePort(ClientPort);
     HCNetSDK_X86.NET_DVR_StopRealPlay(RealHandle);
 }
Пример #2
0
 public void ZoomIn()
 {
     pSrcRect.Init();
     pSrcRect.right  = 352;
     pSrcRect.bottom = 288;
     PlayCtrl_X86.PlayM4_SetDisplayRegion(ClientPort, 0, ref pSrcRect, (IntPtr)0, true);
 }
Пример #3
0
        private void Playback(int lRealHandle, uint dwDataType, ref byte pBuffer, uint dwBufSize, IntPtr pUser)
        {
            switch (dwDataType)
            {
            case 1:         // sys head
                RealHandle = lRealHandle;
                PlayCtrl_X86.PlayM4_GetPort(ref ClientPort);
                if (dwBufSize > 0)
                {
                    PlayCtrl_X86.PlayM4_SetStreamOpenMode(ClientPort, PlayCtrl_X86.STREAME_REALTIME);
                    PlayCtrl_X86.PlayM4_OpenStream(ClientPort, ref pBuffer, dwBufSize, 1024 * 1024);
                    PlayCtrl_X86.PlayM4_Play(ClientPort, WndHandle);
                    PlayCtrl_X86.PlayM4_SetDisplayBuf(ClientPort, 15);
                    PlayCtrl_X86.PlayM4_SetOverlayMode(ClientPort, 0, 0);
                }
                break;

            case 2:         // video stream data
                PlayCtrl_X86.PlayM4_InputData(ClientPort, ref pBuffer, dwBufSize);
                break;

            case 3:         //  Audio Stream Data
                PlayCtrl_X86.PlayM4_InputVideoData(ClientPort, ref pBuffer, dwBufSize);
                break;

            default:
                break;
            }
        }
Пример #4
0
 public void ZoomOut(int zoomleft, int zoomup, int zoomright, int zoomdown)
 {
     pSrcRect.left   = zoomleft;
     pSrcRect.top    = zoomup;
     pSrcRect.right  = zoomright;
     pSrcRect.bottom = zoomdown;
     PlayCtrl_X86.PlayM4_SetDisplayRegion(ClientPort, 0, ref pSrcRect, (IntPtr)0, true);
 }