View Full Version : Grabber::setVideoFormat

March 27, 2011, 13:55:55
I have problem with "setVideoFormat" method. I can not set video format with using this method. When I use this method, VS C++ 2008 notifies error (in attachment). openDev and setFPS work fine. I have following function:

Grabber grabber;
tFrameHandlerSinkPtr pSink;
MemBufferCollection::tMemBufferPtr pBuffer;

IplImage * mInicializaceKamery(void)

grabber.openDev("DFx 21BUC03");
grabber.setVideoFormat("RGB32 (744x480)");


pSink = FrameHandlerSink::create(eRGB32, 1);

if( !grabber.prepareLive( false ) )
printf("Error: mInicializaceKamery/pGrabber->prepareLive\n");
return NULL;

FrameTypeInfo info;
if( !pSink->getOutputFrameType( info ))
printf("Error: mInicializaceKamery/pSink->getOutputFrameType\n");
return NULL;

IplImage * test = cvCreateImage( cvSize(info.dim.cx,info.dim.cy), IPL_DEPTH_8U , 4 );
return test;

So where is problem? And the difference between my code and this example: http://www.imagingcontrol.com/en_US/support/documentation/class/meth_descGrabber_prepareLive.htm. Thank you so much.

Best regards,

Stefan Geissler
March 28, 2011, 16:46:36

I checked your sequence using IC Imaging Control 3.1. There was no problem in release or debug version.
Which driver version do you use? Which IC Imaging Control version do you use?

March 29, 2011, 14:07:29
I have IC Imaging Control 3.1 and verison TIS_UDSHL08_vc9.dll and TIS_DShowLib08.dll is 3. 1. 0. 576.

Stefan Geissler
March 29, 2011, 14:46:15
Do you call DShowLib::InitLibrary somewhere in your thread?

March 29, 2011, 14:51:25
Yes, I do ...

Stefan Geissler
March 29, 2011, 15:19:12
Did you do this in the same thread? I can not see the call in your sample.