The embedded camera has two output pins, capture and preview pins. The
preview pin is used to stream video for the user to view the scene before
taking a picture and the capture pin is used to capture and save the current
frame to memory as a jpeg file. The input pin of the ISampleGrabber is
connected to the capture pin of the camera, while the output pin of the
ISampleGrabber is connected to a null renderer. We implement the
SampleGrabberCallback Class that consist of BufferCB function used to save
the current frame to memory when the use clicks on the recommended button.
The problem we facing is that our camera currently only captures two
pictures and then it stops taking pictures even though the preview continues
to function.
We have been able to debug the code to find that the program hangs within
the CBaseOutputPin::Deliver(IMediaSample * pSample) function at line return
m_pInputPin->Receive(pSample); Unfortunately, we do not have access to the
Receive(IMediaSample *pSample) function implemented for the SampleGrabber
filter.
Please if you have any suggestion on how to resolve the issue that leads to
the hanging of the program, this will be greatly appreciated.
Cheers.