Example #1
0
        public void StartDownloadAsync(DateTime beginTime, DateTime endTime, string fileName)
        {
            NetDvrTime begin = new NetDvrTime
            {
                Year   = (uint)beginTime.Year,
                Month  = (uint)beginTime.Month,
                Day    = (uint)beginTime.Day,
                Hour   = (uint)beginTime.Hour,
                Minute = (uint)beginTime.Minute
            };

            NetDvrTime end = new NetDvrTime
            {
                Year   = (uint)endTime.Year,
                Month  = (uint)endTime.Month,
                Day    = (uint)endTime.Day,
                Hour   = (uint)endTime.Hour,
                Minute = (uint)endTime.Minute
            };

            NetDvrPlayCondition condition = new NetDvrPlayCondition();

            condition.Channel   = 33;
            condition.StartTime = begin;
            condition.StopTime  = end;

            _fileHandle = OfficalAPI.NET_DVR_GetFileByTime_V40(_userId, fileName, ref condition);

            PlayBackControl(NetDvrPlayBackControlCode.NET_DVR_PLAYSTART);
        }