I am currently designing an app with the Metro app framework which includes a live video chat feature. I am using the GrayscaleTransform MFT included in the MediaCapture sample (at this point simply copy-and-pasted from the sample).
However, when I try to add the grayscale effect to the camera’s image stream, I get a “class not registered” fatal error. I understand this is because I must ‘activate and register’ the media extension, but I do not know how. How do I register the media extension?
All help is greatly appreciated and I always accept an answer!
UPDATE: My GrayScale IDL file is shown below:
import "Windows.Media.idl";
#include <sdkddkver.h>
namespace GrayscaleTransform
{
[version(NTDDI_WIN8), activatable(NTDDI_WIN8)]
runtimeclass GrayscaleEffect
{
[default] interface Windows.Media.IMediaExtension;
}
}
The media extension is specified as an
<Extension>(or extensibility point) in the package manifest’s Extensions section, but you need to insert it manually (i.e. open the appxmanifest as code instead of double-clicking.)Using the GrayscaleTransform example, in the Media extensions sample, open the MediaExtensions project’s package.appxmanifest (as code) and look for this in the
<Extensions>section:There’s a bit more general info on extensions in App contracts and extensions.