Пример #1
0
        public uint DIOPtzCtrl(uint dwRealStrmId, uint dwPtzType, double dParam1, double dParam2)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            return(retVal);
        }
Пример #2
0
        public uint DIOLogoutDevice(uint dwLoginId)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOLogoutDevice ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOLogoutDevice(dwLoginId);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOLogoutDevice ret:" + retVal);
            return(retVal);
        }
Пример #3
0
        public uint DIOCloseQueryStrmFilesList(uint dwQueryStrmFilesHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            return(retVal);
        }
Пример #4
0
        public uint DIOGetNextChannelInfo(uint dwQueryChnLstHandle, out TDIO_ChannelInfo ptChannelInfo, out uint pdwQueryOverFlag)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOGetNextChannelInfo ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOGetNextChannelInfo(dwQueryChnLstHandle, out ptChannelInfo, out pdwQueryOverFlag);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOGetNextChannelInfo ret:" + retVal);
            return(retVal);
        }
Пример #5
0
        public uint DIOCreateQueryChannelList(uint dwLoginId, out uint pdwQueryChnLstHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOCreateQueryChannelList ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOCreateQueryChannelList(dwLoginId, out pdwQueryChnLstHandle);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOCreateQueryChannelList ret:" + retVal);
            return(retVal);
        }
Пример #6
0
        public uint DIOStopDownload(uint dwStrmId)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            return(retVal);
        }
Пример #7
0
        public uint DIOGetDownloadFilePercent(uint dwStrmId, out uint pdwPercent)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pdwPercent = 0;
            return(retVal);
        }
Пример #8
0
        public uint DIOPlayCtrl(uint dwStrmId, uint dwCtrlCmd, uint dwInValue, out uint pdwOutValue)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pdwOutValue = 0;
            return(retVal);
        }
Пример #9
0
        public uint DIOGetVer(out TDIO_Version ver)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            ver = new TDIO_Version();
            return(retVal);
        }
Пример #10
0
        public uint DIOQueryChannelStatus(uint dwLoginId, string pChannelId, out TDIO_ChannelStatus ptChannelStatus)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            ptChannelStatus = new TDIO_ChannelStatus();
            return(retVal);
        }
Пример #11
0
        public uint DIOStartDownloadByTimeSF(uint dwLoginId, string pChannelId,
                                             uint ptStartTime, uint ptEndTime, string pSavedFile, out uint pdwStrmId)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pdwStrmId = 0;
            return(retVal);
        }
Пример #12
0
        public uint DIOGetNextFileInfo(uint dwQueryStrmFilesHandle, out TDIO_StrmFileInfo ptStrmFilesInfo, out uint pdwQueryOverFlag)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            ptStrmFilesInfo  = new TDIO_StrmFileInfo();
            pdwQueryOverFlag = 0;
            return(retVal);
        }
Пример #13
0
        public uint DIOCreateQueryStrmFilesList(uint dwLoginId, string pChannelId,
                                                TDIO_QueryFileCondition ptQueryCondition, out uint pdwQueryStrmFilesHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pdwQueryStrmFilesHandle = 0;
            return(retVal);
        }
Пример #14
0
        public uint DIORealPlay(uint dwLoginId, string pChannelId, uint dwStrmType,
                                uint hWnd, IntPtr pUserContext, out uint pdwRealStrmId)
        {
            m_LPSTRMCALLBACK = OnLPSTRMCALLBACK;
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIORealPlay ");
            UInt32 retVal = IVXDIOSDKProtocol.DIORealPlay(dwLoginId, pChannelId, dwStrmType, hWnd, m_LPSTRMCALLBACK, pUserContext, out pdwRealStrmId);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIORealPlay ret:" + retVal);
            return(retVal);
        }
Пример #15
0
        public uint DIOLoginDevice(uint dwConnType, string pIp,
                                   ushort uPort, string pUser, string pPassword, uint dwTimeout, out uint pdwLoginId)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOLoginDevice ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOLoginDevice(dwConnType, pIp, uPort, pUser, pPassword, dwTimeout, out pdwLoginId);

            if (retVal > 0)
            {
                pdwLoginId = 0;
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOLoginDevice ret:" + retVal);
            return(retVal);
        }
Пример #16
0
        public uint DIOSetExceptionCallbackFun(uint dwLoginId, out IntPtr pUserContext)
        {
            LPEXCEPTIONCALLBACK fCallback;

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pUserContext = IntPtr.Zero;
            return(retVal);
        }
Пример #17
0
        public uint DIOStartDownloadByTimeCB(uint dwLoginId, string pChannelId,
                                             uint ptStartTime, uint ptEndTime, out IntPtr pUserContext, out uint pdwStrmId)
        {
            LPSTRMCALLBACK fCallback;

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pUserContext = IntPtr.Zero;
            pdwStrmId    = 0;
            return(retVal);
        }
Пример #18
0
        public uint DIOPlaybackByFile(uint dwLoginId, string pChannelId,
                                      TDIO_PlaybackFile ptRecFile, uint hWnd, out IntPtr pUserContext, out uint pdwStrmId)
        {
            LPSTRMCALLBACK fCallback;

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOInit();

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOInit ret:" + retVal);
            pUserContext = IntPtr.Zero;
            pdwStrmId    = 0;
            return(retVal);
        }
Пример #19
0
        public System.Drawing.Image DIOSnapPicture(uint dwStrmId)
        {
            //System.Drawing.Image t = new System.Drawing.Bitmap(1920, 1080);
            // System.Drawing.Graphics.FromImage(t).DrawString("DIOSnapPicture",new System.Drawing.Font("宋体",30), System.Drawing.Brushes.Red,new System.Drawing.PointF(100,100));
            //return t;
            uint   dwPicBufMaxLen   = DataModel.Common.MAX_PIC_DATA_LEN;
            IntPtr pPicBuf          = Marshal.AllocHGlobal((int)dwPicBufMaxLen);
            uint   pdwPicBufRealLen = 0;
            uint   pdwPicBufType    = 0;

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOSnapPicture ");
            UInt32 retVal = IVXDIOSDKProtocol.DIOSnapPicture(dwStrmId, pPicBuf, dwPicBufMaxLen, out pdwPicBufRealLen, out pdwPicBufType);

            if ((retVal > 0) && pdwPicBufRealLen > dwPicBufMaxLen && dwPicBufMaxLen > 0)
            {
                if (pPicBuf != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(pPicBuf);
                }

                dwPicBufMaxLen   = pdwPicBufRealLen;
                pPicBuf          = Marshal.AllocHGlobal((int)dwPicBufMaxLen);
                pdwPicBufRealLen = 0;
                pdwPicBufType    = 0;
                retVal           = IVXDIOSDKProtocol.DIOSnapPicture(dwStrmId, pPicBuf, dwPicBufMaxLen, out pdwPicBufRealLen, out pdwPicBufType);
            }

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }
            System.Drawing.Image img = ModelParser.GetImage(pPicBuf, (int)pdwPicBufRealLen);

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXDIOSDKProtocol DIOSnapPicture ret:" + retVal);
            if (pPicBuf != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(pPicBuf);
            }
            return(img);
        }