how to compile VideoInput inside OF

Now i’m trying to compile videoinput lib inside Of to see if there are any possibility to modify properties or something to use my video grabber capture device Euresys picolo pro2.

any way … following steps… in 4… I can’t found atlbase.h include… (theo’s code is VideoInput.cpp .h?) 4,5,6 steps modifies the same code?

  1. comment these includes from the theo’s code (both places):
    //#include “atlbase.h”
    //#include “dxutil.h”
  2. asm -> in flipRGB, replace with regular c++
  3. replace all occurances of SAFE_RELEASE
    if ( (pControl) ) { (pControl)->Release(); (pControl) = 0; }

pd: I’m using videoinput 1.99 , OF0.4 and Dev c++.

Really thanks at all.
By ^^

what compiler are you in ?


oh - those instructions are old - videoInput 0.199 is totally in love with DevCPP.
so you shouldn’t need to modify anything.

I am pretty sure you can just remove the videoInput.a from your openFrameworks project and then add the 0.199 videoInput.ccp and .h.

if you get stuck make sure your compile, include and linking settings aren’t missing anything that the devcpp project that comes in the 0.199 download has.



zack - dev

Theo - I’ve tried…Following something similar Vcc2005 SETUP INSTRUCTIONS AND QUIRKS … to my dev ++ and at the moment i have some errors like

388 \0.04_devcpp\libs\DShow\Include\wxutil.h \_asm' undeclared (first use this function) 388 \0.04\_devcpp\libs\DShow\Include\wxutil.h expected;’ before ‘{’ token

something more errors but I can’t understanding… like

6 …/…/libs/DShow/Include/streams.h:145, from …/…/libs/openFrameworks/video/videoInput.cpp
6 …/…/libs/openFrameworks/video/videoInput.cpp

17 0.04_devcpp\libs\DShow\Include\refclock.h integer constant is too large for “long” type
line says:(const LONGLONG MAX_TIME = 0x7FFFFFFFFFFFFFFF; /* Maximum LONGLONG value */)

My Steps:

1- I’ve deleted videoInput lib and .h folders and reference
2- added DIR INCLUDE: …/…/libs/DShow/lib , …/…/libs/DShow/Include
3- added linker libs :

quartz lib is necessary? or only to VC2005.

5- Recompile all project.
6- Changed line operator=(LONG); to: COARefTime& operator=(LONG);

Could be a problem of my order of included Directories?

Thanks a lot!

can you zip up everything (libs, apps, etc) in one package so we can try / take a look?


took a look, you need to include and link against the devpack direct show libraries, not the visual studio ones that theo has included in the videoinput folder. they are *very* different, and wont work at all with devcpp (I’ve spent hours understanding this, painfully).
hope that helps!

THANKS! It works! :slight_smile:

I’ve used dev directshow directory from basseclasses and I’ve commented urlmon in dxtrans.h.

Finally I’ve compiled videoInput.cpp and .h.

Now I will try to access videoInput options to see, what’s happens with my Euresys frame grabber. At now, if I changes in framegrabber.cpp->initgrabber (bool bOk = VI.setupDevice(device, width, height)) to (bool bOk = VI.setupDevice(device)) at execute program then, there are Exec error … I’m thinking that there aren’t good communication with frame grabber directshow filter.

by ^^

weird - I posted a reply but it didn’t show up - anyway yeah the directx includes are just for CW and VS. Glad you got it working. Let me know what you find out!