コード例 #1
0
        public void TestFolderManager_GetIndexesPacket()
        {
            string path = "D:\\读写测试\\GetIndexesPacketsInvalid";

            new DirectoryInfo(path).Create();
            string fileName = null;

            Assert.IsNull(FolderManager.GetIndexesPacket(path, new DateTime(2016, 1, 1), ref fileName));
        }
コード例 #2
0
        /// <summary>获取某通道视频在某时间点对应文件的视频头</summary>
        public static StreamPacket GetVideoHeader(string videoId, int streamId, DateTime time)
        {
            string        indexesFile = null;
            string        path        = getPath(videoId, streamId, time);
            IndexesPacket packet      = FolderManager.GetIndexesPacket(path, time, ref indexesFile);

            if (packet != null)
            {
                return(FileManager.GetVideoHeader(GlobalProcess.GetRecFileName(indexesFile)));
            }
            return(null);
        }