I'm trying to use the InterVideo Audio Decoder filter in my application. It loads fine in GraphEdit and I can also manually create an object using ComView.

When I try it in code

invoke CoCreateInstance, addr CLSID_InterVideoAudioDecoder, 0, CLSCTX_INPROC_SERVER, addr IID_IBaseFilter, addr InterVideoAudioDecoder

the application immediately exits with no error codes or anything. Other filters can be created and used just fine. Anyone know what could be going on?

Intervideo Audio Filter @ http://www.feliratok.hu/Apps/Filter/ivids20.zip
Posted on 2003-02-12 15:18:32 by grv575
maybe you need to use a factory? :| Is this the licensing thing I heard about?
Posted on 2003-02-12 15:55:45 by Hiroshimator

your test "app" is a bit tiny. Possibly the control requires a message loop to work. It's just a guess.

Posted on 2003-02-12 17:17:37 by japheth
My guess is your not doing anything with it...

Your creating an instance of the class and getting the IBaseFilter interface... thats nice. What do you want to do with it??

I downloaded the needed iviaudio.ax from the net (didnt have it one my cpu) and tested your code (after i modified it to release the interface your getting):
eax = 00000000, Initialize (D:\masm32\_ACTIVE\Iv\iv.asm, 44)

eax = 00000000, Create Instance (D:\masm32\_ACTIVE\Iv\iv.asm, 46)
pInterface = 00650084, Inteface (D:\masm32\_ACTIVE\Iv\iv.asm, 47)
eax = 00000000, Released (D:\masm32\_ACTIVE\Iv\iv.asm, 53)
eax = 0051000C, Uninitialize (D:\masm32\_ACTIVE\Iv\iv.asm, 57)

The interface is gotten no problem...

So i did a little more diggin around on this IBaseFilter inteface and dug up a tutorial about filter graphs etc. etc. sounds a bit like what your upto. http://www.flipcode.com/tutorials/tut_dshow03.shtml

As well.. i tried to run this from com view and there was no type lib nor was there any dispatchable interfaces in this class id, so i dont know you were getting things to happen with this tool...

Posted on 2003-02-12 17:18:42 by NaN
Cool thx nan. At least I know that it's working on a different installation. Might have messed up my directshow configuratation somehow. I did manage to get an error code... CLASS_E_CLASSNOTAVAILABLE 0x80040111. Even though the activex control is registered and has a class id. Oh well, I'll try it out on a clean installation. Good directshow tut btw.
Posted on 2003-02-12 22:54:15 by grv575
After NaN's post (indicating that this prog works) I made another test ,deleted the "int 3" and put in a MessageBox. That worked, too. But if I execute the code from within a debugger, it terminates as before. So possibly there is some "anti-debugging" code implemented.


I've ... the code and can confirm my suspicion.
Posted on 2003-02-13 04:19:53 by japheth
Well it's SUPPOSED to run normally outside of a debugger. But in fact it does exit out with a process exit code of 0x2 (Whatever that means for CoCreateInstance) on the CoCreateInstance call. So in essence I have no idea what's failing :\

Tried various versions of the codec but still same thing. The odd thing is that it does work in GraphEdit and I don't see too many other combos of parameters for the CoCreateInstance call.
Posted on 2003-02-14 14:03:51 by grv575

this source displayed "worked", so I assume it didnt call ExitProcess within CoCreateInstance

invoke CoInitialize, NULL
invoke CoCreateInstance, addr CLSID_InterVideoAudioDecoder, 0, CLSCTX_INPROC_SERVER, addr IID_IBaseFilter, addr pInterVideoAudioDecoder
.if (eax == S_OK)
invoke MessageBox, 0, CStr("worked"), 0, MB_OK
invoke vf(pInterVideoAudioDecoder, IUnknown, Release)
invoke MessageBox, 0, CStr("didn't work"), 0, MB_OK
invoke CoUninitialize
invoke ExitProcess, 0

end start

Posted on 2003-02-15 04:27:34 by japheth
There seems to be some protection built into the commerial audio decoding codecs...
both intervideo and ligos crash at some point in the program. I've resorted to two seperate filter graphs (one for audio & the other for video) to avoid using either of the above codecs which seems to work.
Posted on 2003-02-18 00:01:12 by grv575