There are plenty of developers that are frustrated by the fact that the MediaCapture class is available to use in WPF, however, the CaptureElement used to preview the video recording is not.
I understand this limitation, however, I want to use the MediaCapture class to record video.. and I'd like to find a way to provide a preview in WPF if it's possible.
After a lot of digging online, I ran across the CapturedFrame class. It appears that the CapturedFrame is an abstraction that represents a single frame of video recorded from the MediaCapture object.
CapturedFrame MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/windows.media.capture.capturedframe.aspx
The CapturedFrame class has a property SoftwareBitmap ..
My question:
Can anyone provide some code or a link which may demonstrate how you could perhaps record a video to a file from MediaCapture.. while processing each frame to some how grab the Bitamp to show the bitmap in WPF with an image control?
I understand that this is not the most effective way to handle the problem, however, if it's possible and it does work, this should be a viable work around for all of us WPF desktop devs that can't use the CaptureElement.
I would like to say that I am aware of WPFMediaKit and other open source projects, however, if this is possible, it's the way that I wish to proceed.
Thanks in advance to any replies.