bblxd
November 7, 2010, 08:32:40
I want to use MemBufferCollection to get an image data buffer ptr. But I get an exception error when I
call grabber1.startlive(). How can i set it, or is there another way to get the image data ptr.
BTW, The video formart I set is "BY8 (1024x768)".
The main code is as below:
FrameTypeInfo frameType(eBY8,1024,768,1024*768);
m_pSink1=FrameHandlerSink::create(frameType,1);
m_pSink1->setSnapMode(ture);
Grabber grabber1.setSinkType(m_pSink1);
BYTE* pBuf1[1];
pBuf1[0]=new BYTE[1024*768];
SIZE dim;
dim.cx=1024;
dim.cy=768;
pCollection1=MemBufferCollection::create(frameType ,1,pBuf1);
m_pSink1->setMemBufferCollection(pCollection1);
call grabber1.startlive(). How can i set it, or is there another way to get the image data ptr.
BTW, The video formart I set is "BY8 (1024x768)".
The main code is as below:
FrameTypeInfo frameType(eBY8,1024,768,1024*768);
m_pSink1=FrameHandlerSink::create(frameType,1);
m_pSink1->setSnapMode(ture);
Grabber grabber1.setSinkType(m_pSink1);
BYTE* pBuf1[1];
pBuf1[0]=new BYTE[1024*768];
SIZE dim;
dim.cx=1024;
dim.cy=768;
pCollection1=MemBufferCollection::create(frameType ,1,pBuf1);
m_pSink1->setMemBufferCollection(pCollection1);