Exemple #1
0
        public override void Start()
        {
            lock (this.SyncRoot)
            {
                IConsumerService consumerManager = this.Scope.GetService(typeof(IConsumerService)) as IConsumerService;
                try
                {
                    //_videoCodecFactory = new VideoCodecFactory();
                    _videoCodecFactory = this.Scope.GetService(typeof(VideoCodecFactory)) as VideoCodecFactory;
                    _checkVideoCodec   = true;
                }
                catch (Exception ex)
                {
                    log.Warn("No video codec factory available.", ex);
                }
                _firstPacketTime = _audioTime = _videoTime = _dataTime = -1;
                _connMsgOut      = consumerManager.GetConsumerOutput(this);
                _connMsgOut.Subscribe(this, null);
                _recordPipe = new InMemoryPushPushPipe();
#if !(NET_1_1)
                Dictionary <string, object> recordParameterMap = new Dictionary <string, object>();
#else
                Hashtable recordParameterMap = new Hashtable();
#endif
                // Clear record flag
                recordParameterMap.Add("record", null);
                _recordPipe.Subscribe(this as IProvider, recordParameterMap);
                _recording         = false;
                _recordingFilename = null;
                this.CodecInfo     = new StreamCodecInfo();
                _closed            = false;
                _bytesReceived     = 0;
                _creationTime      = System.Environment.TickCount;
            }
        }
 public override void Start()
 {
     lock (base.SyncRoot)
     {
         IConsumerService service = base.Scope.GetService(typeof(IConsumerService)) as IConsumerService;
         try
         {
             this._videoCodecFactory = new VideoCodecFactory();
             this._checkVideoCodec   = true;
         }
         catch (Exception exception)
         {
             log.Warn("No video codec factory available.", exception);
         }
         this._firstPacketTime = this._audioTime = this._videoTime = this._dataTime = -1;
         this._connMsgOut      = service.GetConsumerOutput(this);
         this._connMsgOut.Subscribe(this, null);
         this._recordPipe = new InMemoryPushPushPipe();
         Dictionary <string, object> parameterMap = new Dictionary <string, object>();
         parameterMap.Add("record", null);
         this._recordPipe.Subscribe(this, parameterMap);
         this._recording         = false;
         this._recordingFilename = null;
         base.CodecInfo          = new StreamCodecInfo();
         this._closed            = false;
         this._bytesReceived     = 0L;
         this._creationTime      = Environment.TickCount;
     }
 }
Exemple #3
0
 public override void Start()
 {
     try
     {
         _videoCodecFactory = this.Scope.GetService(typeof(VideoCodecFactory)) as VideoCodecFactory;
     }
     catch (Exception ex)
     {
         log.Warn("No video codec factory available.", ex);
     }
 }
Exemple #4
0
 public override void Start()
 {
     try
     {
         _videoCodecFactory = this.Scope.GetService(typeof(VideoCodecFactory)) as VideoCodecFactory;
     }
     catch (Exception ex)
     {
         log.Warn("No video codec factory available.", ex);
     }
 }
Exemple #5
0
		public void Register()
		{
            //Start services
            FluorineFx.Messaging.Rtmp.IO.IStreamableFileFactory streamableFileFactory = ObjectFactory.CreateInstance(FluorineConfiguration.Instance.FluorineSettings.StreamableFileFactory.Type) as FluorineFx.Messaging.Rtmp.IO.IStreamableFileFactory;
            AddService(typeof(FluorineFx.Messaging.Rtmp.IO.IStreamableFileFactory), streamableFileFactory, false);
            streamableFileFactory.Start(null);
            FluorineFx.Scheduling.SchedulingService schedulingService = new FluorineFx.Scheduling.SchedulingService();
            AddService(typeof(FluorineFx.Scheduling.ISchedulingService), schedulingService, false);
            schedulingService.Start(null);
            FluorineFx.Messaging.Rtmp.Stream.IBWControlService bwControlService = ObjectFactory.CreateInstance(FluorineConfiguration.Instance.FluorineSettings.BWControlService.Type) as FluorineFx.Messaging.Rtmp.Stream.IBWControlService;
            AddService(typeof(FluorineFx.Messaging.Rtmp.Stream.IBWControlService), bwControlService, false);
            bwControlService.Start(null);
            VideoCodecFactory videoCodecFactory = new VideoCodecFactory();
            AddService(typeof(VideoCodecFactory), videoCodecFactory, false);
            Init();
		}
        public override void Start()
        {
            lock (this.SyncRoot)
            {
                IConsumerService consumerManager = this.Scope.GetService(typeof(IConsumerService)) as IConsumerService;
                try
                {
                    //_videoCodecFactory = new VideoCodecFactory();
                    _videoCodecFactory = this.Scope.GetService(typeof(VideoCodecFactory)) as VideoCodecFactory;
                    _checkVideoCodec = true;
                }
                catch (Exception ex)
                {
                    log.Warn("No video codec factory available.", ex);
                }
                _firstPacketTime = _audioTime = _videoTime = _dataTime = -1;
                _connMsgOut = consumerManager.GetConsumerOutput(this);
                _connMsgOut.Subscribe(this, null);
                _recordPipe = new InMemoryPushPushPipe();
#if !(NET_1_1)
                Dictionary<string, object> recordParameterMap = new Dictionary<string, object>();
#else
                Hashtable recordParameterMap = new Hashtable();
#endif
                // Clear record flag
                recordParameterMap.Add("record", null);
                _recordPipe.Subscribe(this as IProvider, recordParameterMap);
                _recording = false;
                _recordingFilename = null;
                this.CodecInfo = new StreamCodecInfo();
                _closed = false;
                _bytesReceived = 0;
                _creationTime = System.Environment.TickCount;
            }
        }