async void MainPage_Loaded(object sender, RoutedEventArgs e) { mediaCapture = new MediaCapture(); await mediaCapture.InitializeAsync(); CaptureElement.Source = mediaCapture; await mediaCapture.StartPreviewAsync(); urhoApp = UrhoSurface.Run<UrhoApp>(); urhoApp.CaptureVideo(CaptureFrameAsync); }
async void MainPage_Loaded(object sender, RoutedEventArgs e) { mediaCapture = new MediaCapture(); await mediaCapture.InitializeAsync(); CaptureElement.Source = mediaCapture; await mediaCapture.StartPreviewAsync(); urhoApp = UrhoSurface.Run <UrhoApp>(); urhoApp.CaptureVideo(CaptureFrameAsync); }
void UrhoAppStarted() { urhoApp = Urho.Application.Current as UrhoApp; var camera = Camera.Open(); camera.SetPreviewCallback(this); var parameters = camera.GetParameters(); parameters.SetPreviewSize(320, 240);//TODO: check if this size is supported camera.SetParameters(parameters); camera.StartPreview(); //camera.StartFaceDetection(); urhoApp.CaptureVideo(OnFrameRequested); }
void UrhoAppStarted() { urhoApp = Urho.Application.Current as UrhoApp; var camera = Camera.Open(); camera.SetPreviewCallback(this); var parameters = camera.GetParameters(); parameters.SetPreviewSize(320, 240); //TODO: check if this size is supported camera.SetParameters(parameters); camera.StartPreview(); //camera.StartFaceDetection(); urhoApp.CaptureVideo(OnFrameRequested); }
void UrhoAppStarted() { urhoApp = Urho.Application.Current as UrhoApp; //var camera = Camera.Open(); camera.PreviewFrameAvailable += OnPreviewFrame; //camera.StartBackgroundThread(); //camera.OpenCamera(new Size(320, 240)); //camera.SetPreviewCallback(this); //var parameters = camera.GetParameters(); //parameters.SetPreviewSize(320, 240);//TODO: check if this size is supported //camera.SetParameters(parameters); //camera.StartPreview(); //camera.StartFaceDetection(); urhoApp.CaptureVideo(OnFrameRequested); }