1 #ifndef __SAMPLEGRABERCALLBACK_HH__
2 #define __SAMPLEGRABERCALLBACK_HH__
3 #include <BIAS_DeclSpec.hh>
16 #ifdef BIAS_HAVE_DSHOW
17 :
public ISampleGrabberCB
28 void SampleTriggerArm();
31 void SampleTriggerWait();
35 bool SampleTriggered();
37 void SetTargetBuffer(
unsigned char *TargetBuffer,
unsigned int size,
38 unsigned width,
unsigned height);
42 { CallbackFunction_ =
function; }
45 {
return (CallbackFunction_!=0); }
47 #ifdef BIAS_HAVE_DSHOW
48 STDMETHODIMP SampleCB(
double SampleTime, IMediaSample *pSample);
49 STDMETHODIMP BufferCB(
double SampleTime, BYTE *pBuffer,
long BufferLen);
50 STDMETHODIMP QueryInterface(REFIID riid,
void ** ppv);
STDMETHODIMP_(ULONG) AddRef()
unsigned char * TargetBuffer_
STDMETHODIMP_(ULONG) Release()
bool HasCallbackFunction() const
sample grabber callback class for grabbing single frames only
void SetCallbackFunction(SampleGrabberCBF function)
use NULL to disable usage of CB function
SampleGrabberCBF CallbackFunction_
void(* SampleGrabberCBF)(double time_sec)