Пример #1
1
        /// <summary>
        /// Stop rendering video.
        /// Note, this method may be called multiple times in a row.
        /// </summary>
        public void Stop()
        {
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                if (!this.isRendering)
                    return; // Nothing more to be done

                Debug.WriteLine("[VoIP Background Process] Video rendering stopped.");
                mediaStreamSource.Shutdown();
                mediaStreamSource.Dispose();
                mediaStreamSource = null;
                mediaStreamer.Dispose();
                mediaStreamer = null;

                this.isRendering = false;
            });
        }
Пример #2
0
        private void StartMediaStreamer()
        {
            if (mediaStreamer == null)
            {
                mediaStreamer = MediaStreamerFactory.CreateMediaStreamer(123);
            }

            // Using default resolution of 640x480
            mediaStreamSource = new VideoMediaStreamSource(null, 640, 480);
            mediaStreamer.SetSource(mediaStreamSource);
        }
Пример #3
0
        private void StartMediaStreamer()
        {
            if (mediaStreamer == null)
            {
                mediaStreamer = MediaStreamerFactory.CreateMediaStreamer(123);
            }

            // Using default resolution of 640x480
            mediaStreamSource = new VideoMediaStreamSource(null, 640, 480);
            mediaStreamer.SetSource(mediaStreamSource);
        }