0

I am using MediaCapture API and able to initialize and capture the image in a windows forms application. however I am not able to show the preview as CaptureElement is not available in windows forms. Is there an equivalent control available for forms application which can be used with MediaCapture? If not, is there a workaround I could try? I browsed in different forums and found a opensource webcam application in codeplex. However it doesn't use MediaCapture APIs. So when I tried integrating it with my MediaCapture code, I found that "CapturePhotoToStreamAsync" is not executed and control waits there indefinitely as the camera handle is with the webcam application and NOT with the MediaCapture. Please help me out with viewing camera preview in form desktop application. Thanks in advance!

  • try this: http://www.codeproject.com/Articles/457335/How-to-call-WinRT-APIs-from-NET-desktop-apps – magicandre1981 Feb 27 '15 at 18:26
  • Why do you specifically need to use the Windows Runtime MediaCapture class? Since the CaptureElement isn't supported on the desktop you'll probably need to implement an MFT to intercept and display the video stream if you want a preview. For other webcam options in a .Net desktop app take a look at http://stackoverflow.com/questions/233455/webcam-usage-in-c-sharp – Rob Caplan - MSFT Feb 28 '15 at 20:58
  • I tried for the same purpose. But unfortunately no sucess. – Arun Apr 08 '15 at 11:14
  • possible duplicate of [MediaCapture Windows 8 Desktop Application- Can't get it work](http://stackoverflow.com/questions/31369312/mediacapture-windows-8-desktop-application-cant-get-it-work) – Mike Jul 20 '15 at 01:05

0 Answers0