Exemple #1
0
        private static List <WBEvent> GetWBSequenceData(int second)
        {
            try
            {
                if (wbSequenceIndex == null)
                {
                    var buffer = FileApi.GetIndexFile(wbSequenceIndexFile);
                    wbSequenceIndexList = FileApi.GetIndexList(buffer);
                    wbSequenceIndex     = FileApi.GetWBIndex(wbSequenceIndexList);
                }

                TimeSpan       tspan  = TimeSpan.FromSeconds(second);
                List <WBEvent> events = FileApi.GetWBSequenceData(wbSequenceDataFile, wbSequenceIndexList, wbSequenceIndex, WBEvent.StreamSize, tspan);
                return(events);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemple #2
0
        private static List <WBLine> GetWBImageData(int second)
        {
            try
            {
                if (wbImageIndex == null)
                {
                    var buffer = FileApi.GetIndexFile(wbImageIndexFile);
                    wbImageIndexList = FileApi.GetIndexList(buffer);
                    wbImageIndex     = FileApi.GetWBIndex(wbImageIndexList);
                }

                TimeSpan      tspan = TimeSpan.FromSeconds(second);
                List <WBLine> lines = FileApi.GetWBImageData(wbImageDataFile, wbImageIndexList, wbImageIndex, WBLine.StreamSize, tspan);
                return(lines);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemple #3
0
        public static List <SSImage> GetScreenshotData(int second)
        {
            if (ssIndexList == null || ssIndexList.Count == 0)
            {
                var buffer = FileApi.GetIndexFile(ssIndexFile);
                ssIndexList = FileApi.GetIndexList(buffer);

                ssIndexMap.Clear();
                for (int i = 0; i < ssIndexList.Count; i++)
                {
                    if (!ssIndexMap.ContainsKey(ssIndexList[i].TimeStamp))
                    {
                        ssIndexMap.Add(new KeyValuePair <int, int>(ssIndexList[i].TimeStamp, i));
                    }
                }
            }

            var ssIndex = FileApi.GetSSIndex(ssIndexList, ssIndexMap, second);

            return(FileApi.GetSSData(ssDataFile, ssIndex));
        }
Exemple #4
0
 public static void Close()
 {
     FileApi.Close();
 }