public void Reset(long timestamp, long duration, uint bitrate, HLSStream hlsStream, int dataSize, MediaStreamDescription msd, SampleBuffer buffer)
 {
     _timestamp = timestamp;
     _duration = duration;
     _bitrate = bitrate;
     _hlsStream = hlsStream;
     _msd = msd;
     _isKeyFrame = false;
     _adjustedTimeStamp = 0;
     if (dataSize != -1 && null != buffer)
     {
         _dataItem = buffer.FIFOMemoryPool.Alloc(dataSize);
     }
     else
     {
         _dataItem = null;
     }
     _sampleBuffer = buffer;
 }
 /// <summary>
 /// Appends to sample data.
 /// </summary>
 /// <param name="data"></param>
 /// <param name="offset"></param>
 /// <param name="count"></param>
 public void AddData(byte[] data, int offset, int count)
 {
     if (null == _dataItem)
     {
         _dataItem = _sampleBuffer.FIFOMemoryPool.Alloc(count);
     }
     _dataItem.Write(data, offset, count);
 }