PDA

View Full Version : How can I have buffer



webmice
March 14, 2004, 20:35:47
I use your First Step to creat buffer as follow

m_pGrabber->setSinkType( FrameGrabberSink( FrameGrabberSink::tFrameGrabberMode::eSNAP, DShowLib::eY8 ) );

this result is

Compiling...
VisionModuleDoc.cpp
C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\VisionModule\VisionModuleDoc.cpp(195) : error C2065: 'FrameGrabberSink' : undeclared identifier
C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\VisionModule\VisionModuleDoc.cpp(195) : error C2653: 'FrameGrabberSink' : is not a class or namespace name
C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\VisionModule\VisionModuleDoc.cpp(195) : error C2065: 'eSNAP' : undeclared identifier
Error executing cl.exe.

VisionModule.exe - 3 error(s), 0 warning(s)

What I am missing

webmice
March 14, 2004, 20:37:15
How to Set the format???

Stefan Geissler
March 15, 2004, 10:35:08
Hello,

you forgot the namespace:
m_pGrabber->setSinkType( DShowLib::FrameGrabberSink( DShowLib::FrameGrabberSink::tFrameGrabberMode::eSN AP, DShowLib::eY8 ) );

Stefan Geissler
March 15, 2004, 10:36:12
Did you mean the video format (RGB24 640*480) or the sink type? You have set the sink type.

webmice
March 16, 2004, 16:26:10
I copy your code of buffer sample in xxxDOC.cpp

{
// Set the image buffer format to eY8. eY8 means monochrome, 8 bits
//(1 byte) per pixel.
m_pGrabber->setSinkType( DShowLib::FrameGrabberSink( DShowLib::FrameGrabberSink::tFrameGrabberMode::eSN AP, DShowLib::eY8 ) );
// Calculate the number of bytes required for one image buffer using the
// width and height of the current video format and the color depth of
// the sink type.
int size_buffer = m_pGrabber->getAcqSizeMaxX()
* m_pGrabber->getAcqSizeMaxY() * 1; //1 byte per pixel.

BYTE* pBuf[5];
// Create a new membuffer collection that uses our own image buffers.
DShowLib::Grabber::tMemBufferCollectionPtr pMemBufferCollection =
m_pGrabber->newMemBufferCollection( size_buffer, pBuf, 5 );
// Make the collection the active one.
m_pGrabber->setActiveMemBufferCollection( pMemBufferCollection );
// Stop the live video.
m_pGrabber->stopLive();

// Close the device.
// m_pGrabber->closeDev();

// Save the five capured images in the membuffer collection to separate files.
pMemBufferCollection->save( "file*.bmp" );

// Free the five image buffers in the membuffer collection.
for( int j = 0; j < 5; ++j )
{
delete pBuf[j];
}


The Error Message as follow

Loaded symbols for 'C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\ClassLib\debug\VisionModule.exe'
Loaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\ClassLib\debug\TIS_UDSHL05.dll', no matching symbolic information found.
Loaded 'C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\ClassLib\debug\TIS_DShowLib05.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\quartz.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\winmm.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\olepro32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MSVCP60D.DLL'
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\mfc42loc.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\clbcatq.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comres.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ovlip.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcr70.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\mediasamplegrabber.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\devenum.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\setupapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msdmo.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\SHLWAPI.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ksproxy.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ksuser.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kswdmcap.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\mfc42.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\MSIMTF.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\qcap.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvfw32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\dvobsub.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\vobsub.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\mfc42u.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\atl.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wininet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\secur32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wsock32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\IAT_YUV.ax', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
The thread 0x5D0 has exited with code 0 (0x0).
The thread 0x594 has exited with code -1073741819 (0xC0000005).
The thread 0x184 has exited with code -1073741819 (0xC0000005).
The thread 0x538 has exited with code -1073741819 (0xC0000005).
The thread 0x80 has exited with code -1073741819 (0xC0000005).
The thread 0x6B4 has exited with code -1073741819 (0xC0000005).
The program 'C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 1.41\ClassLib\Debug\VisionModule.exe' has exited with code -1073741819 (0xC0000005).

I do something Wrong ????

Stefan Geissler
March 17, 2004, 07:38:45
Webmice,

i do not know, what is around in you xxDoc.cpp, so i am not able to see what is wrong. Also i can not found an error message, so i guess, it is am access violation.

I you want to, you could send you project as zipped file to support at imagingcontrol dot com, so i can have a look on it and try to compile it. Some words about what the project should do would be a great help for me.