Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 /// <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);
 }