I need to process frames from web camera on Windows 8.1 phones, tablets and desktop. I already have implementation for phones and tablets (=store apps) that uses custom media foundation transform to access the frames. Now I’m working on a desktop version.
MSDN says MediaCapture class is supported on both store apps and desktop apps. The third-party MediaCaptureWPF works OK in place of the missing CaptureElement.
However MediaCapture.AddEffectAsync documentation says “effectActivationID: The class identifier of the activatable runtime class that implements the effect.” And I can’t use a custom WinRT component in a desktop app.
There's also another option to add an effect, MediaCapture.AddVideoEffectAsync, that takes the IVideoEffectDefinition argument instead of the class ID. However that interface is only supported on the phones.
So, my question is. Can I use MediaCapture class + custom MF transform on Windows 8 desktop platform? How?
Or do I need to developer an MF source reader just to support the desktop platform? Of there's better way?
Thanks in advance.
Looks like MediaCapture isn't compatible with custom MFTs when running on desktop.
I ended up implementing media sink instead, based on the code from this article.
Unfortunately, the relevant parts of the media foundation framework are marked “[desktop apps only]”. It looks I will have to support 2 distinct versions of the frame grabber, one for the desktop, another one for the store + phone.