Praetorian
2010-05-20 13:20:01 UTC
Greetings
I'm writing application under WinCE 6.0 that should work with a video
camera. And I need not just to display video but also access each frame
raster buffer (i.e. pixel-per-pixel RGB data).
From my BSP developer I have a camera driver supporting DirectShow. Via
this driver camera really works and its video preview comes to the screen
quite correct.
But now I need to access the frame raster - how to do this via DirectShow?
When faced the same problem under Win32, I was using ISampleGrabberCB
interface, defining a class with BufferCB() callback function that is called
each new frame with a parameter of the raster pointer. Just like in Microsoft
"StillCap" example.
But under WinCE there is no ISampleGrabberCB. How should I access the raster
now?
It's a pity that there is no "StillCap" example for WinCE...
P.S. Along with BSP i have some capture framework (CCaptureFramework and
ICameraGrabber) prepared by Texas Instruments and based on some Microsoft
sources .I do not know exactly from which package are these came, but maybe
it's familiar to the people who was working in the field. I was trying to use
CCaptureFramework::InsertGrabberFilter(), but it fails. Digging deeper, it
fails after the following series of calls:
CoCreateInstance( CLSID_CameraGrabber, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, (void**) &pGrabber ); // Successful
m_pGraph->AddFilter(pGrabber, DiagnosticsData[FilterIndex][FILTER_NAME]); //
Successful
m_pCaptureGraphBuilder->FindPin(pFilterBase, pindir, pCategory, pType,
FALSE, index, &pPinUpstreamOut); // Successful
pPinUpstreamOut->ConnectedTo(&pPinDownstreamIn); // Failed
The build-in logger of the capture framework comments situation as "The
requested pin was found, but not connected to anything."
I have very limited experience of using DirectShow and no experience at all
of using it under WinCE. Maybe this capture framework is based on some more
or less standard code that familiar to experienced people? Could they assume
how to make this grabber working?
I'm writing application under WinCE 6.0 that should work with a video
camera. And I need not just to display video but also access each frame
raster buffer (i.e. pixel-per-pixel RGB data).
From my BSP developer I have a camera driver supporting DirectShow. Via
this driver camera really works and its video preview comes to the screen
quite correct.
But now I need to access the frame raster - how to do this via DirectShow?
When faced the same problem under Win32, I was using ISampleGrabberCB
interface, defining a class with BufferCB() callback function that is called
each new frame with a parameter of the raster pointer. Just like in Microsoft
"StillCap" example.
But under WinCE there is no ISampleGrabberCB. How should I access the raster
now?
It's a pity that there is no "StillCap" example for WinCE...
P.S. Along with BSP i have some capture framework (CCaptureFramework and
ICameraGrabber) prepared by Texas Instruments and based on some Microsoft
sources .I do not know exactly from which package are these came, but maybe
it's familiar to the people who was working in the field. I was trying to use
CCaptureFramework::InsertGrabberFilter(), but it fails. Digging deeper, it
fails after the following series of calls:
CoCreateInstance( CLSID_CameraGrabber, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, (void**) &pGrabber ); // Successful
m_pGraph->AddFilter(pGrabber, DiagnosticsData[FilterIndex][FILTER_NAME]); //
Successful
m_pCaptureGraphBuilder->FindPin(pFilterBase, pindir, pCategory, pType,
FALSE, index, &pPinUpstreamOut); // Successful
pPinUpstreamOut->ConnectedTo(&pPinDownstreamIn); // Failed
The build-in logger of the capture framework comments situation as "The
requested pin was found, but not connected to anything."
I have very limited experience of using DirectShow and no experience at all
of using it under WinCE. Maybe this capture framework is based on some more
or less standard code that familiar to experienced people? Could they assume
how to make this grabber working?