public void TestGlobalProcess_FileNameTrans() { string indexesName = @"D:\视频录像\videoId_2\2016\03\22\20160322235101156.Indexes"; string recName = @"D:\视频录像\videoId_2\2016\03\22\20160322235101156.rec"; Assert.AreEqual(recName, GlobalProcess.GetRecFileName(indexesName)); Assert.AreEqual(indexesName, GlobalProcess.GetIndexesFileName(recName)); }
/// <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); }