#include <dshowcb.h>
Public Member Functions | |
virtual bool | initialize () |
initialized the video source. | |
virtual bool | getFrame (IplImage *dst) |
get the next frame and convert it to the format described in "dst". | |
virtual void | getSize (int &width, int &height) |
return width and height of images coming from the video source. | |
DShowCB () | |
virtual | ~DShowCB () |
virtual void | start () |
Start the video source: getFrame() will provide each time a different image. | |
virtual void | stop () |
Pause the source. | |
virtual bool | isPlaying () |
return false if the source is paused. | |
virtual int | getId () |
This method is usefull only for video files, not grabbing hardware. | |
virtual const char * | getStreamName () const |
Returns a string describing the stream. | |
virtual const char * | getStreamType () const |
Returns a string describing the type of the stream. |
Definition at line 13 of file dshowcb.h.
DShowCB::DShowCB | ( | ) |
Definition at line 114 of file dshowcb.cpp.
DShowCB::~DShowCB | ( | ) | [virtual] |
Definition at line 121 of file dshowcb.cpp.
bool DShowCB::getFrame | ( | IplImage * | dst | ) | [virtual] |
get the next frame and convert it to the format described in "dst".
The image will be deinterlaced, scaled, and color converted to match dst.
dst | the image to copy the frame into. |
Implements VideoSource.
Definition at line 279 of file dshowcb.cpp.
References deinterlaceAndResize(), SampleGrabberCB::event, and SampleGrabberCB::frameWanted.
virtual int DShowCB::getId | ( | ) | [inline, virtual] |
This method is usefull only for video files, not grabbing hardware.
It returns a the number of the last frame provided by getFrame().
Reimplemented from VideoSource.
void DShowCB::getSize | ( | int & | width, | |
int & | height | |||
) | [virtual] |
return width and height of images coming from the video source.
Implements VideoSource.
Definition at line 299 of file dshowcb.cpp.
References SampleGrabberCB::Height, and SampleGrabberCB::Width.
virtual const char* DShowCB::getStreamName | ( | ) | const [inline, virtual] |
Returns a string describing the stream.
If the source comes from a file, the filename is returned.
Implements VideoSource.
virtual const char* DShowCB::getStreamType | ( | ) | const [inline, virtual] |
Returns a string describing the type of the stream.
For example: BmpFile, AviFile, DShowCB...
Implements VideoSource.
bool DShowCB::initialize | ( | ) | [virtual] |
initialized the video source.
Has to be called before any other method.
Implements VideoSource.
Definition at line 128 of file dshowcb.cpp.
References SampleGrabberCB::event, GetInPin(), GetOutPin(), SampleGrabberCB::Height, SampleGrabberCB::image, start(), and SampleGrabberCB::Width.
Referenced by DShowCBFactory::construct().
virtual bool DShowCB::isPlaying | ( | ) | [inline, virtual] |
void DShowCB::start | ( | ) | [virtual] |
Start the video source: getFrame() will provide each time a different image.
After calling initialize(), the video source is playing.
Implements VideoSource.
Definition at line 305 of file dshowcb.cpp.
Referenced by initialize().
void DShowCB::stop | ( | ) | [virtual] |
Pause the source.
The getFrame() method will always provide the current frame.
Implements VideoSource.
Definition at line 311 of file dshowcb.cpp.