pIntelMediaSDKH264Encoder.CoCreateInstance Fails Everytime

pIntelMediaSDKH264Encoder.CoCreateInstance Fails Everytime

Hi everyone,

I'm working with the h.264 encoder within c++ using beta 4. I can get the filters to work perfect in graphedit but whenever I try to create the instance of the filter in code it fails. My platform is 64 bit and I'm using the following CLSID:

// {71183C45-F4FA-4B10-9E04-F9040CB19139}
DEFINE_GUID(CLSID_IntelMediaSDKH264Encoder,
0x71183C45, 0xF4FA, 0x4B10, 0x9E, 0x04, 0xF9, 0x04, 0x0C, 0xB1, 0x91, 0x39); //h264_enc_filter.dll

But it always fails. What can cause this? There were no previous versions on the machine as it it a clean install of Window 7 Pro. Any thoughts?

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Martin,

Is the name correct? I just checked beta 4 its CLSID_H264EncFilter - defined in mfx_filter_externals.h. Does this work?

HRESULT res = CoCreateInstance(CLSID_H264EncFilter, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)pMSDKH264Encoder);

Thanks

-Eric

Did not work but just a thought... isn't that an internal name that defines the GUID? Could I not name that definition whatever I wanted providing the GUID is accurate. This is off topic but it got me thinking.

//add Intel Media SDK H.264 Encoder
CComPtr pIntelMediaSDKH264Encoder;
hr = pIntelMediaSDKH264Encoder.CoCreateInstance(CLSID_H264EncFilter);
CHECK_HR(hr, "Can't create Intel Media SDK H.264 Encoder");
hr = pGraph->AddFilter(pIntelMediaSDKH264Encoder, L"Intel Media SDK H.264 Encoder");
CHECK_HR(hr, "Can't add Intel Media SDK H.264 Encoder to graph");

Always spits out Can't create Intel Media SDK H.264 Encoder. I've never had an issue creating a filter before... any thing else I should look at? I moved the Intel MP4 Muxer in front of the Encoder and it won't create the muxer either. Also one more thing to note is that hr returns "Class not registered". Hmm?

Quick edit... wanted to say that OLE/COM does not have Intel components at all.

Hi,

You mentioned that your platform is 64-bit and that things work in graphedit. Assuming your graphedit application is 32-bit application (which uses 32-bit filter), I wonder if your code is a 32-bit or 64-bit application. Its possbile that the 64-bit filter is not registered. (Or vice-versa).

-Tony

I've been using the 64 bit Graphedit. I tried with the 32 bit installer as well but no luck.

After multiple restarts and uninstalls and reinstalls... the 32 bit one finally works. Issue resolved!

Great News. I was trying to make it fail on my side, but it worked every time. What do you think the problem was?

Eric

I appologize for the extremely late reply. I believe it was just a mistake when installing the wrong graphics drivers before. I'm able to get it to work 100% everytime on every machine now.

Cheers.

Leave a Comment

Please sign in to add a comment. Not a member? Join today