public List <TDIO_StrmFileInfo> DIOQueryFileList(uint loginid, string pChannelId, DateTime st, DateTime et)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXStreamIOSDKProtocol StrmGetVideoInfo loginid:" + loginid + ",pChannelId:" + pChannelId + ",st:" + st.ToString("yyyyMMddHHmmss") + ",et:" + et.ToString("yyyyMMddHHmmss"));
            uint pdwQueryStrmFilesHandle;
            TDIO_QueryFileCondition query = new TDIO_QueryFileCondition()
            {
                tStart = DataModel.Common.ConvertLinuxTime(st),
                tStop  = DataModel.Common.ConvertLinuxTime(et),
                szRest = "",
            };
            UInt32 retVal = IVXDIOSDKProtocol.DIOCreateQueryStrmFilesList(loginid, pChannelId, ref query, out pdwQueryStrmFilesHandle);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }
            List <TDIO_StrmFileInfo> ret = new List <TDIO_StrmFileInfo>();
            StringBuilder            sb  = new StringBuilder();

            while (true)
            {
                TDIO_StrmFileInfo info = new TDIO_StrmFileInfo();
                uint pdwQueryOverFlag;
                IVXDIOSDKProtocol.DIOGetNextFileInfo(pdwQueryStrmFilesHandle, out info, out pdwQueryOverFlag);

                if (pdwQueryOverFlag == 0)
                {
                    break;
                }
                else
                {
                    ret.Add(info);
                    sb.AppendLine("qwFileSize:" + info.qwFileSize + ",tStart:" + info.tStart + ",tStop:" + info.tStop + ",szRest:" + info.szRest);
                }
            }
            IVXDIOSDKProtocol.DIOCloseQueryStrmFilesList(pdwQueryStrmFilesHandle);

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXStreamIOSDKProtocol StrmGetVideoInfo ret:" + 0 + ",list:" + sb.ToString());
            return(ret);
        }
Beispiel #2
0
        public List <TDIO_StrmFileInfo> DIOQueryFileList(uint loginid, string pChannelId, DateTime st, DateTime et)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXStreamIOSDKProtocol StrmGetVideoInfo loginid:" + loginid + ",pChannelId:" + pChannelId + ",st:" + st.ToString("yyyyMMddHHmmss") + ",et:" + et.ToString("yyyyMMddHHmmss"));
            IntPtr ptr    = Marshal.AllocHGlobal(1000);
            uint   ChlNum = 0;
            TDIO_QueryFileCondition query = new TDIO_QueryFileCondition()
            {
                tStart = DataModel.Common.ConvertLinuxTime(st),
                tStop  = DataModel.Common.ConvertLinuxTime(et),
                szRest = "",
            };

            IVXStreamIOSDKProtocol.StrmGetVideoNum(loginid, pChannelId, ref query, out ChlNum);
            IntPtr pchlinfo = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(TDIO_StrmFileInfo)) * (int)ChlNum);
            uint   retVal   = IVXStreamIOSDKProtocol.StrmGetVideoInfo(loginid, pChannelId, ref query, ChlNum, pchlinfo);

            if (retVal > 0)
            {
                DIO_GetError(retVal);
            }
            List <TDIO_StrmFileInfo> ret = new List <TDIO_StrmFileInfo>();
            StringBuilder            sb  = new StringBuilder();

            for (int i = 0; i < ChlNum; i++)
            {
                TDIO_StrmFileInfo temp = (TDIO_StrmFileInfo)Marshal.PtrToStructure(pchlinfo + Marshal.SizeOf(typeof(TDIO_StrmFileInfo)) * i, typeof(TDIO_StrmFileInfo));
                if (temp.qwFileSize == 0)
                {
                    continue;
                }
                ret.Add(temp);
                sb.AppendLine(string.Format("szFileId:{0},tStart:{1},tStop:{2},qwFileSize:{3}", temp.szFileId, temp.tStart, temp.tStop, temp.qwFileSize));
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXStreamIOSDKProtocol StrmGetVideoInfo ret:" + 0 + ",list:" + sb.ToString());
            return(ret);
        }
 public static extern UInt32 DIOCreateQueryStrmFilesList(UInt32 loginHandle, string pChannelId, ref TDIO_QueryFileCondition tFileCondition, out UInt32 pdwQueryStrmFilesHandle);
Beispiel #4
0
 public static extern UInt32 StrmGetVideoInfo(uint LoginId,
                                              string pChannelId,
                                              ref TDIO_QueryFileCondition ptQueryCondition,
                                              uint VideoNum,
                                              /*out  TDIO_StrmFileInfo * */ IntPtr ptStrmFilesInfo);
Beispiel #5
0
 public static extern UInt32 StrmGetVideoNum(uint LoginId,
                                             string pChannelId,
                                             ref TDIO_QueryFileCondition ptQueryCondition,
                                             out uint VideoNum);