public PullAndPushJob(PlayEngine engine) { _engine = engine; }
public override void Start() { // Ensure the play engine exists if (_engine == null) { IScope scope = this.Scope; if (scope != null) { ISchedulingService schedulingService = scope.GetService(typeof(ISchedulingService)) as ISchedulingService; IConsumerService consumerService = scope.GetService(typeof(IConsumerService)) as IConsumerService; IProviderService providerService = scope.GetService(typeof(IProviderService)) as IProviderService; _engine = new PlayEngine.Builder(this, schedulingService, consumerService, providerService).Build(); } else { if( log.IsErrorEnabled ) log.Error("Scope was null on start"); } } // Create bw control service and register myself // Bandwidth control service should not be bound to a specific scope because it's designed to control // the bandwidth system-wide. _bwController = this.Scope.GetService(typeof(IBWControlService)) as IBWControlService; _bwContext = _bwController.RegisterBWControllable(this); //Set bandwidth members on the engine _engine.SetBandwidthController(_bwController, _bwContext); //Set buffer check interval _engine.BufferCheckInterval = _bufferCheckInterval; //Set underrun trigger _engine.UnderrunTrigger = _underrunTrigger; // Start playback engine _engine.Start(); // Notify subscribers on start NotifySubscriberStart(); }
public PlaylistSubscriberStreamJob2(PlayEngine engine, string itemName) { _engine = engine; _itemName = itemName; }
/// <summary> /// Creates a play engine based on current services (scheduling service, consumer service, and provider service). /// </summary> /// <param name="schedulingService">The scheduling service.</param> /// <param name="consumerService">The consumer service.</param> /// <param name="providerService">The provider service.</param> /// <returns>Play engine.</returns> PlayEngine CreateEngine(ISchedulingService schedulingService, IConsumerService consumerService, IProviderService providerService) { _engine = new PlayEngine.Builder(this, schedulingService, consumerService, providerService).Build(); return _engine; }