private IDictionary <int, byte[]> GetImages(DataType dt, int second) { try { IDictionary <int, byte[]> ret = new Dictionary <int, byte[]>(); if (screenIndexList == null) { if (colhelperScreenImage == null) { colhelperScreenImage = GetCOLFilerHelper(dt); } screenIndexList = colhelperScreenImage.GetIndexList(); } List <Index> screenImageIndexs = screenIndexList.GetImageIndexBySecond(second); foreach (Index index in screenImageIndexs) { byte[] buf = colhelperScreenImage.SeekData(index.DataOffset, (int)index.DataLength); ret.Add(new KeyValuePair <int, byte[]>((index.Row * Constants.MAX_ROW_NO + index.Col), buf)); } return(ret); } catch (Exception ex) { return(null); } finally { } }
private List <WBLine> GetWhiteBoardImage(DataType dt, int second) { try { if (wbImageIndexs == null) { if (colhelperWbImage == null) { colhelperWbImage = GetCOLFilerHelper(dt, false); } IndexList list = colhelperWbImage.GetIndexList(); wbImageIndexs = list.GetIndexList(); } IDictionary <int, int> mapIndex = GetIndexMapByMinute(wbImageIndexs); List <WBLine> lines = new List <WBLine>(); TimeSpan tspan = TimeSpan.FromSeconds(second); lines = GetDataList <WBLine>(colhelperWbImage, wbImageIndexs, mapIndex, WBLine.StreamSize, tspan); return(lines); } catch (Exception ex) { return(null); } finally { } }
private List <WBEvent> GetWhiteBoardSequence(DataType dt, int ts) { try { if (wbSequenceIndexs == null) { if (colhelperWbSequence == null) { colhelperWbSequence = GetCOLFilerHelper(dt, true); } IndexList list = colhelperWbSequence.GetIndexList(); wbSequenceIndexs = list.GetIndexList(); } IDictionary <int, int> mapIndex = GetIndexMapByMinute(wbSequenceIndexs); List <WBEvent> events = new List <WBEvent>(); TimeSpan tspan = TimeSpan.FromSeconds(ts); events = GetDataList <WBEvent>(colhelperWbSequence, wbSequenceIndexs, mapIndex, WBEvent.StreamSize, tspan); return(events); } catch (Exception ex) { return(null); } finally { } }