当前位置: 首页>>代码示例>>C#>>正文


C# IPipe.Subscribe方法代码示例

本文整理汇总了C#中IPipe.Subscribe方法的典型用法代码示例。如果您正苦于以下问题:C# IPipe.Subscribe方法的具体用法?C# IPipe.Subscribe怎么用?C# IPipe.Subscribe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPipe的用法示例。


在下文中一共展示了IPipe.Subscribe方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

        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;
            }
        }
开发者ID:ByteSempai,项目名称:Ubiquitous,代码行数:35,代码来源:ClientBroadcastStream.cs

示例2: Start

        /// <summary>
        /// Starts the server-side stream.
        /// </summary>
        public override void Start()
        {
            if (_state != State.UNINIT)
                throw new NotSupportedException("State " + _state + " not valid to start");
            if (_items.Count == 0)
                throw new NotSupportedException("At least one item should be specified to start");
            if (_publishedName == null)
                throw new NotSupportedException("A published name is needed to start");
            // publish this server-side stream

            IProviderService providerService = this.Scope.GetService(typeof(IProviderService)) as IProviderService;
            providerService.RegisterBroadcastStream(this.Scope, _publishedName, this);
            _recordPipe = new InMemoryPushPushPipe();
#if !(NET_1_1)
            Dictionary<string, object> recordParamMap = new Dictionary<string, object>();
#else
            Hashtable recordParamMap = new Hashtable();
#endif
            recordParamMap.Add("record", null);
            _recordPipe.Subscribe((IProvider)this, recordParamMap);
            _recordingFilename = null;
            _schedulingService = this.Scope.GetService(typeof(ISchedulingService)) as ISchedulingService;
            _state = State.STOPPED;
            _currentItemIndex = -1;
            NextItem();
        }
开发者ID:Nicholi,项目名称:fluorinefx-mod,代码行数:29,代码来源:ServerStream.cs


注:本文中的IPipe.Subscribe方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。