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:
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?
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);
//add Intel Media SDK H.264 Encoder
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.
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).