I'm trying to use this MFT to decode MJPEG frames. I have a working sample that uses the synchronous decoder from Microsoft which goes thru a software path, and I'm trying to convert that code to use the Intel decoder which presumably uses the GPU to decode frames.
My code activates the Intel MFT, then unlocks the Async MFT. I notice two problems:
1) My original code calls SetInputType on the MFT. Now, that call returns E_FAIL.
mfVideoFormat.dwSize = sizeof(mfVideoFormat);
mfVideoFormat.guidFormat = MFVideoFormat_MJPG;
mfVideoFormat.videoInfo.dwWidth = m_imageWidth;
mfVideoFormat.videoInfo.dwHeight = m_imageHeight;
hr = MFCreateVideoMediaType(&mfVideoFormat, &pVideoMediaTypeInput);
hr = mjpegMFT->SetInputType( 0, pVideoMediaTypeInput, 0 ); // XXX this call fails with E_FAIL
2) If I comment this out, and then query for the IMFMediaEventGenerator, and call BeginGetEvent, my invoke method is never called by the MFT.
Are there any samples showing how to decode an image using an asynchronous + hardware MFT?