private async void StartVideoStream(String camera, String codec, String videoSize, UInt32 frameRate, UInt32 bitRate, Boolean usePreviewStream)
        {
            try
            {
                _videoSource = new MSWinRTVideo.SwapChainPanelSource();
                _videoSource.Start(VideoSwapChainPanel);
                _previewSource = new MSWinRTVideo.SwapChainPanelSource();
                _previewSource.Start(PreviewSwapChainPanel);
                var vcc        = VoipCallCoordinator.GetDefault();
                var entryPoint = typeof(PhoneCallTask).FullName;
                var status     = await vcc.ReserveCallResourcesAsync(entryPoint);

                var capabilities = VoipPhoneCallMedia.Audio | VoipPhoneCallMedia.Video;
                call = vcc.RequestNewOutgoingCall("FooContext", "FooContact", "MS2Tester", capabilities);
                call.NotifyCallActive();
                OperationResult result = await MS2TesterHelper.StartVideoStream(VideoSwapChainPanel.Name, PreviewSwapChainPanel.Name, camera, codec, videoSize, frameRate, bitRate, usePreviewStream);

                if (result == OperationResult.Succeeded)
                {
                    Debug.WriteLine("StartVideoStream: success");
                }
                else
                {
                    Debug.WriteLine("StartVideoStream: failure");
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(String.Format("StartVideoStream: Exception {0}", e.Message));
            }
        }
Esempio n. 2
0
        private void StartVideoStream()
        {
            try {
                _videoSource = new MSWinRTVideo.SwapChainPanelSource();
                _videoSource.Start(VideoSwapChainPanel);
                _previewSource = new MSWinRTVideo.SwapChainPanelSource();
                _previewSource.Start(PreviewSwapChainPanel);

                LinphoneManager.Instance.Core.NativeVideoWindowId   = VideoSwapChainPanel.Name;
                LinphoneManager.Instance.Core.NativePreviewWindowId = PreviewSwapChainPanel.Name;
            } catch (Exception e) {
                Debug.WriteLine(String.Format("StartVideoStream: Exception {0}", e.Message));
            }
        }