MediaCapture Windows 8 Desktop Application- Can't get it work

前端 未结 2 1678
终归单人心
终归单人心 2021-01-26 06:21

I\'m trying to implement an image capture via this API, and I need to implement in via desktop application.

The problem is that when I save the image into a file (with <

2条回答
  •  情深已故
    2021-01-26 06:51

    Getting MediaCapture to preview the camera video in Desktop apps is not trivial. I wasn't sure all the pieces were there so I put together some code on GitHub to try it out and it seems to work ok.

    https://github.com/mmaitre314/MediaCaptureWPF

    One caveat: building the MediaCapture/WPF interop required some native code (C++/CLI), so the app needs to be built as either x86 or x64, but not AnyCPU.

提交回复
热议问题