Exemplo n.º 1
0
        public HlsPlaylistSegmentManager(IProgramStream programStream, IPlatformServices platformServices, CancellationToken cancellationToken)
        {
            if (null == programStream)
            {
                throw new ArgumentNullException("programStream");
            }
            if (null == platformServices)
            {
                throw new ArgumentNullException("platformServices");
            }
            this._programStream     = programStream;
            this._platformServices  = platformServices;
            this._cancellationToken = cancellationToken;
            HlsPlaylistParameters parameters = HlsPlaylistSettings.Parameters;

            this._minimumRetry       = parameters.MinimumRetry;
            this._minimumReload      = parameters.MinimumReload;
            this._maximumReload      = parameters.MaximumReload;
            this._excessiveDuration  = parameters.ExcessiveDuration;
            this._abortTokenSource   = CancellationTokenSource.CreateLinkedTokenSource(this._cancellationToken);
            this._isDynamicPlaylist  = true;
            this._readTask           = new SignalTask(new Func <Task>(this.ReadSubList), this._abortTokenSource.Token);
            this._segmentsExpiration = Environment.TickCount;
            this.Playlist            = (IAsyncEnumerable <ISegment>) new HlsPlaylistSegmentManager.PlaylistEnumerable(this);
        }
Exemplo n.º 2
0
        public HlsPlaylistSegmentManager(IProgramStream programStream, IPlatformServices platformServices, CancellationToken cancellationToken)
        {
            if (null == programStream)
            {
                throw new ArgumentNullException("programStream");
            }
            if (null == platformServices)
            {
                throw new ArgumentNullException("platformServices");
            }
            _programStream     = programStream;
            _platformServices  = platformServices;
            _cancellationToken = cancellationToken;
            var parameters = HlsPlaylistSettings.Parameters;

            _minimumRetry       = parameters.MinimumRetry;
            _minimumReload      = parameters.MinimumReload;
            _maximumReload      = parameters.MaximumReload;
            _excessiveDuration  = parameters.ExcessiveDuration;
            _abortTokenSource   = CancellationTokenSource.CreateLinkedTokenSource(_cancellationToken);
            _isDynamicPlaylist  = true;
            _readTask           = new SignalTask(ReadSubList, _abortTokenSource.Token);
            _segmentsExpiration = Environment.TickCount;
            Playlist            = new PlaylistEnumerable(this);
        }
 public PlaylistSubProgram(IProgram program, IProgramStream video)
     : base(program)
 {
     this._video = video;
 }
Exemplo n.º 4
0
 public PlaylistSubProgram(IProgram program, IProgramStream video)
     : base(program)
 {
     _video = video;
 }