/// <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]; }
protected override ISegmentDownloadTask CreateSegmentDownloadTask(int bufferSize, ISegmentDownloader segmentDownloader, ISegmentWriter segmentWriter) { return(new DoubleBufferSegmentDownloadTask(bufferSize, segmentDownloader, segmentWriter)); }
public VideoDownloadHelper(INicoHttp http, ISegmentWriter writer, ILogger logger) { this._http = http; this._writer = writer; this._logger = logger; }
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); }
/// <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; }