Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Media Foundation H264 encoder - IMFTransform::SetOutputType() return MF_E_ATTRIBUTENOTFOUND (0xC00D36E6L)

$
0
0

I want to use Media Foundation H264 encoder to encode some Sample. But I'm failed while I call IMFTransform::SetOutputType() method and get MF_E_ATTRIBUTENOTFOUNDerror code.

The step I use the H264 encoder are below:

1. Use MFTEnumEx() function to enum MFT_CATEGORY_VIDEO_ENCODERwith MajorType is MFMediaType_Video, SubType is MFVideoFormat_H264, after this done, I get anIMFActivate interface

2. Use the member method of IMFActivate::ActivateObject() with RIID - IID_IMFTransformto get an IMFTransform interface

3. Use MFCreateMediaType() function to create a IMFMediaTypeinterface.

4. Use IMFTransform::GetOutputAvailableType() member function and passed an interface I get in step 3 to get one available IMediaType.

5. Use IMFMediaType::SetUINT32() member method to set MF_MT_AVG_BITRATEon IMediaType interface I get in previous step (500kbps)

6. Use MFSetAttributeSize() function to set MF_MT_FRAME_SIZEon IMediaType interface I get in previous step (320 * 240)

7. Use MFSetAttributeRatio() function to set MF_MT_FRAME_RATEon IMediaType interface I get in previous step (30, 1)

8. Use IMFTransform::SetOutputType() to set the MediaType with theIMediaType interface I get in previous step with outputStream 0 and dwFlag 0. I get the MF_E_ATTRIBUTENOTFOUNDerror code after this member method is done.

Could anyone please give me some hint about what's wrong with my steps?

Thanks a lot.


Viewing all articles
Browse latest Browse all 1079

Trending Articles