PDA

View Full Version : Dynamic setting using setSnapMode



vdaanen
August 7, 2007, 10:13:08
Hi,

I just wonder if setSnapMode can be used to dynamically change the snap mode without calling startLive after a call to setSnapMode ?

I think it can be used to do so but I encountered an 'instability' and this is the only use I can not confimr reading the help of IC-3.0

V

Sascha Schmidt
August 7, 2007, 12:19:51
Hallo V,

to change the snapmode dynamically you have to call first .stopLive().
After setting up the snapmode, you have to call .startLive().


m_cGrabber.stopLive();

// Create the frame handler sink
smart_ptr<FrameHandlerSink> pSink = FrameHandlerSink::create( eRGB24, 5 );
// Apply the sink to the grabber.
m_cGrabber.setSinkType( pSink );

// Disable/enable snap mode.
pSink->setSnapMode( mode );


m_cGrabber.startLive();

// Later ...
m_cGrabber.stopLive();
pSink->setSnapMode( mode );
m_cGrabber.startLive();