PDA

View Full Version : Grabber::setVideoFormat



PAP
March 27, 2011, 14:55:55
Hi,
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)");

grabber.setFPS(60.00024);

pSink = FrameHandlerSink::create(eRGB32, 1);
grabber.setSinkType(pSink);



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,
PAP.

Stefan Geissler
March 28, 2011, 17:46:36
Hello,

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?

PAP
March 29, 2011, 15: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, 15:46:15
Do you call DShowLib::InitLibrary somewhere in your thread?

PAP
March 29, 2011, 15:51:25
Yes, I do ...

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