|
This is my first code using DirestShow and could use some help with this linker issue.
The “problem “ is that the second usage of CoCreateInstance with CLSID parameter of CLSID_VideoMixingRenderer fails to link.
Here is “standard” linker error:
VMR_Capture.obj : error LNK2001: unresolved external symbol _CLSID_VideoMixingRenderer
Debug/OpenCamera.exe : fatal error LNK1120: 1 unresolved externals
I have included Microsoft SDKs\Windows\v7.1\Include\uuids.h and both of these CLSID are defined there.
Here is the failing code snippet
….
hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
IID_IGraphBuilder, (void **)&m_pGB); // links fine
if(SUCCEEDED(hr))
{
hr = InitializeWindowlessVMR(hWnd);
…..
hr = CoCreateInstance(CLSID_VideoMixingRenderer, NULL,
CLSCTX_INPROC, IID_IBaseFilter, (void**)&pVmr);
// fails to link
I would appreciate any help/ suggestions on how to troubleshoot this.
Thanks for your time.
Vaclav
|
|
|
|
|
From the error message above it appears that this CLSID is not defined properly in the header. Check back and see what value it generates.
Use the best guess
|
|
|
|
|
Richard,
thanks for your advise.
I have replaced ( in uuids.h) failing CLSID with working one , same linker error.
Since I do not know squat about this I guess I need to find out what it should be to make this troubleshooting more effective.
// VMR GUIDS
// -------------------------------------------------------------------------
#pragma message ("CLSID_VideoMixingRenderer")
// {B87BEB7B-8D29-423f-AE4D-6582C10175AC}
OUR_GUID_ENTRY(CLSID_VideoMixingRenderer,
//0xB87BEB7B, 0x8D29, 0x423f, 0xAE, 0x4D, 0x65, 0x82, 0xC1, 0x01, 0x75, 0xAC)
0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
Addendum
Just changed the CLSID to CLSID_VideoRendererDefault and getting same linker error.
|
|
|
|
|
I think you need to include the Strmiids.lib library as described on this MSDN page[^].
Use the best guess
|
|
|
|
|
The library is inluded. That is why I am lost since one of the CLSID works and the other does not.
Maybe I should look for #ifdefs in the uudis.h, but the compiler "reported" the #pragma message I stuck in front of the "bad" CLSID.
Go figure.
|
|
|
|
|
Vaclav_Sal wrote: one of the CLSID works and the other does not. Then the chances are that there is another missing library. Unfortunately I have no experience of this package and only found the answer by searching through the documentation. I am afraid you will have to do the same.
Use the best guess
|
|
|
|
|
It seems that I need correct Strmiids.lib version.
I have changed the path to the latest Strmiids.lib
Mine is in C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
Now I am getting this error:
strmiids.lib(strmiids.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe.
Do I have to rebuild the Strmiids.lib
using my VC6.0 from scratch?
It would make it easier to step thru if I have a "source" anyway.
|
|
|
|
|
I am afraid I have some bad news for you. Windows SDK 7.1 is not compatible with VC6. Please see the reply to this question: http://social.msdn.microsoft.com/Forums/en/windowssecurity/thread/18990fc3-94c4-41da-bedc-40b9237b8ba0[^]
I can understand if you are trying to stay with VC6 for financial reasons, but I have to echo the last line of the response "You should really think about upgrading to a more recent version of the IDE."
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Don't worry, I will not give you a whole lecture about upgrading, just suggest it. I am using VS2010 and I don't have problems with Windows SDK 7.1, I think .
From what I have heard, VS2010 is slower than VS2012, so you might be even more disappointed should you switch to that.
I recalled reading a post a few weeks ago in the Lounge by Marc Clifton where he said VS2008 was the last usable IDE put out by Microsoft. I hunted the post down for you in case you are interested: I would have to say...[^]
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Soren,
I truly appreciate you sparing me from lecturing how cool MS stuff is.
I was once interviewed by MS “experts” only to find out that the development “teams” do not maintain any records from one release to another – in their own words “ we do it from scratch because we have new “teams”. I was actually glad they did not hire me.
I also believe the other reason their stuff so boated and full of holes need fixing is they are actually hardware company – pushing for more memory, larger HDD and even “developed” CD because loading OS using couple of dozen floppies was ridiculous.
I wish I could figure out why the VFW is so flaky and skip the Direct whatever for now.
If the DirectShow sample posted ( written with VC6.0) here worked for me I suspect I would find out that it also have problems to display the captured video.
Actually that is the root of my current linker problem – the CVMRCaputre class posted here does not link either, I get same linker undefined symbol. Unfortunately the author is no longer active – so I got double trouble.
Makes one wonder why so many authors of video capture programs posted here disappear from the scene fast. I guess the only stalwart is CxImage stuff.
Sorry for the rant, going on my morning walk now.
Cheers and have great day.
Vaclav
|
|
|
|
|
Unless I can find a source code ( just dreaming) for this stinking stream id library to build my own - what are my alternative(s) to do RELIABLE video capture besides ( expletive deleted ) DirectShow?
I really do not want to switch to Linux and start over.
No more cheers from me on this one.
Vaclav
|
|
|
|