Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3058 Discussions

pIntelMediaSDKH264Encoder.CoCreateInstance Fails Everytime

IDZ_A_Intel
Employee
623 Views
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?
0 Kudos
7 Replies
Eric_S_Intel
Employee
623 Views

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

0 Kudos
IDZ_A_Intel
Employee
623 Views
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.
0 Kudos
Anthony_P_Intel
Employee
623 Views
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
0 Kudos
IDZ_A_Intel
Employee
623 Views
I've been using the 64 bit Graphedit. I tried with the 32 bit installer as well but no luck.
0 Kudos
IDZ_A_Intel
Employee
623 Views
After multiple restarts and uninstalls and reinstalls... the 32 bit one finally works. Issue resolved!
0 Kudos
Eric_S_Intel
Employee
623 Views
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
0 Kudos
IDZ_A_Intel
Employee
623 Views
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.
0 Kudos
Reply