예제 #1
0
        private static void addErrorFile(string videoId, int streamId, DateTime date)
        {
            string path = Path.Combine(GlobalData.Path, $"{videoId}_{streamId}", GlobalProcess.FolderPath(date));

            Directory.CreateDirectory(path);
            writeError(path, $"{GlobalProcess.FileNameFromDate(date)}235959999{GlobalProcess.IndexesFormat()}");
            writeError(path, $"{GlobalProcess.FileNameFromDate(date)}235959999{GlobalProcess.RecFormat()}");
        }
예제 #2
0
        public static void Add1()
        {
            var    beginTime = new DateTime(2016, 3, 22, 23, 50, 1, 156);
            string videoId   = "videoId";
            int    streamId  = 2;
            string path      = System.IO.Path.Combine(GlobalData.Path, $"{videoId}_{streamId}");

            GlobalData.FileLengthSup = new TimeSpan(0, 5, 0);
            using (SyncRecorder recorder = new SyncRecorder(path))
            {
                recordAddMinutes(recorder, beginTime, 0, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 1, DataType.SysHead);       //new
                recordAddMinutes(recorder, beginTime, 1, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 2, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 3, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 4, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 5, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 6, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 7, DataType.StreamDataKey);  //new
                recordAddMinutes(recorder, beginTime, 8, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 9, DataType.SysHead);        //new
                recordAddMinutes(recorder, beginTime, 9, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 10, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 11, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 12, DataType.StreamDataKey);  //new
                recordAddMinutes(recorder, beginTime, 13, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 14, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 15, DataType.StreamDataKey);
                recordAddMinutes(recorder, beginTime, 16, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 17, DataType.StreamData);
                recordAddMinutes(recorder, beginTime, 18, DataType.StopSign);
                writeError(Path.Combine(path, GlobalProcess.FolderPath(beginTime)), $"20100322235959999{GlobalProcess.IndexesFormat()}");
            }
        }