예제 #1
0
        private void start()
        {
            _video                        = new CCTVVideo(_info, _videoID);
            _video.Bandwidth              = _bandwidth;
            _video.VideoConnectedEvent   += _video_VideoConnectedEvent;
            _video.VideoDisconnetedEvent += _video_VideoDisconnetedEvent;
            _video.VideoFrameEvent       += _video_VideoFrameEvent;
            _video.Start();

            tsslStatus.Text = "状态:正在连接视频服务";
        }
예제 #2
0
 private void stop()
 {
     if (_video != null)
     {
         _video.Stop();
     }
     _video = null;
     if (_display != null)
     {
         _display.Clear();
     }
 }
예제 #3
0
        internal CCTV1VideoSource(CCTVDefaultInfoSync clientHub, CCTVInfo info, string videoId, string url)
        {
            _clientHub = clientHub;
            VideoId    = videoId;
            Url        = url;

            ulong id     = 0;
            int   stream = 1;

            if (getCctv1UrlInfo(Url, out id, out stream))
            {
                //_flashback = VideoFlashbackManager.Instance.GetChannel(videoId);

                _video = new CCTVVideo(info, id, getStreamBandwidth(stream));
                _video.VideoStreamEvent  += video_VideoStreamEvent;
                _video.FFMPEGFormatEvent += video_FFMPEGFormatEvent;
                _video.FFMPEGFrameEvent  += _video_FFMPEGFrameEvent;
                _video.UniviewDataEvent  += _video_UniviewDataEvent;
                _video.VideoLevelEvent   += video_VideoLevelEvent;
            }
        }