/// <summary>
 /// Initializes a new instance of the <see cref="DoubleBufferSegmentDownloadTask"/> class.
 /// </summary>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="segmentDownloader">The segment downloader.</param>
 /// <param name="segmentWriter">The segment writer.</param>
 public DoubleBufferSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     m_BufferSize        = bufferSize;
     m_SegmentDownloader = segmentDownloader;
     m_SegmentWriter     = segmentWriter;
     m_InputBufferQueue  = new Queue <byte[]>();
     m_OutputBufferQueue = new Queue <SegmentDownloadInfo>();
     m_Threads           = new Thread[2];
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DoubleBufferSegmentDownloadTask"/> class.
 /// </summary>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="segmentDownloader">The segment downloader.</param>
 /// <param name="segmentWriter">The segment writer.</param>
 public DoubleBufferSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     m_BufferSize = bufferSize;
     m_SegmentDownloader = segmentDownloader;
     m_SegmentWriter = segmentWriter;
     m_InputBufferQueue = new Queue<byte[]>();
     m_OutputBufferQueue = new Queue<SegmentDownloadInfo>();
     m_Threads = new Thread[2];
 }
Пример #3
0
 protected override ISegmentDownloadTask CreateSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     return(new DoubleBufferSegmentDownloadTask(bufferSize, segmentDownloader, segmentWriter));
 }
Пример #4
0
 public VideoDownloadHelper(INicoHttp http, ISegmentWriter writer, ILogger logger)
 {
     this._http   = http;
     this._writer = writer;
     this._logger = logger;
 }
Пример #5
0
 protected abstract ISegmentDownloadTask CreateSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter);
 protected abstract ISegmentDownloadTask CreateSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter);
 protected override ISegmentDownloadTask CreateSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     return new SegmentDownloadTask(bufferSize, segmentDownloader, segmentWriter);
 }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SegmentDownloadTask"/> class.
 /// </summary>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="segmentDownloader">The segment downloader.</param>
 /// <param name="segmentWriter">The segment writer.</param>
 public SegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     m_BufferSize        = bufferSize;
     m_SegmentDownloader = segmentDownloader;
     m_SegmentWriter     = segmentWriter;
 }
 public SegmentWriterSimulator(ISegmentWriter segmentWriter)
 {
     m_SegmentWriter = segmentWriter;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SegmentDownloadTask"/> class.
 /// </summary>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="segmentDownloader">The segment downloader.</param>
 /// <param name="segmentWriter">The segment writer.</param>
 public SegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter)
 {
     m_BufferSize = bufferSize;
     m_SegmentDownloader = segmentDownloader;
     m_SegmentWriter = segmentWriter;
 }