private void InitVideoCapture(MediaFrameSourceGroup group) { defaultMediaCapturer?.Dispose(); defaultMediaCapturer = new GeneralMediaCapturer(group, StreamingCaptureMode.Video); defaultMediaCapturer.OnVideoFrameArrived += VideoFrameArrivedEvent; base.SetExternalVideoSource(true, false); }
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); }