Ejemplo n.º 1
0
 private void InitVideoCapture(MediaFrameSourceGroup group)
 {
     defaultMediaCapturer?.Dispose();
     defaultMediaCapturer = new GeneralMediaCapturer(group, StreamingCaptureMode.Video);
     defaultMediaCapturer.OnVideoFrameArrived += VideoFrameArrivedEvent;
     base.SetExternalVideoSource(true, false);
 }
Ejemplo n.º 2
0
 private void InitVideoCapture(DeviceInformation device)
 {
     defaultMediaCapturer?.Dispose();
     defaultMediaCapturer = new GeneralMediaCapturer(device, StreamingCaptureMode.Video);
     defaultMediaCapturer.OnVideoFrameArrived += VideoFrameArrivedEvent;
     base.SetExternalVideoSource(true, false);
 }
        private async static Task <AbMediaContent> getMediaResult(IMediaCapturer mediaCapturer, IDisappearedListener disappearedListener, Page page, Page parentPage)
        {
            EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);

            page.Disappearing += (e, v) =>
            {
                waitHandle.Set();
            };

            await parentPage.Navigation.PushAsync(page);

            await Task.Run(() => waitHandle.WaitOne());

            //disappearedListener.onDisappear();
            return(mediaCapturer.capturedMedia);
        }