#include <videosource.h>
Public Member Functions | |
virtual bool | initialize ()=0 |
initialized the video source. | |
virtual bool | getFrame (IplImage *dst)=0 |
get the next frame and convert it to the format described in "dst". | |
virtual void | getSize (int &width, int &height)=0 |
return width and height of images coming from the video source. | |
virtual | ~VideoSource () |
virtual void | start ()=0 |
Start the video source: getFrame() will provide each time a different image. | |
virtual void | stop ()=0 |
Pause the source. | |
virtual void | restart () |
Restart the video. On live media, just "start" it. | |
virtual bool | isPlaying ()=0 |
return false if the source is paused. | |
virtual int | getId () |
This method is usefull only for video files, not grabbing hardware. | |
virtual int | getChannels () |
Get the number of channels the video source provides. | |
virtual void | postProcess (FptFrame *) |
Allow the video source to have access to tracked data. | |
virtual const char * | getStreamName () const =0 |
Returns a string describing the stream. | |
virtual const char * | getStreamType () const =0 |
Returns a string describing the type of the stream. | |
virtual void * | getInternalPointer () |
This class represent a video source, providing a sequence of images. In order to use a VideoSource object, initialize() has to be call and has to return true.
To construct a VideoSource object, it is a good idea to use the VideoSourceFactory class.
Definition at line 49 of file videosource.h.
virtual VideoSource::~VideoSource | ( | ) | [inline, virtual] |
Definition at line 70 of file videosource.h.
virtual int VideoSource::getChannels | ( | ) | [inline, virtual] |
Get the number of channels the video source provides.
Reimplemented in DC1394.
Definition at line 97 of file videosource.h.
virtual bool VideoSource::getFrame | ( | IplImage * | dst | ) | [pure 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. |
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
Referenced by vobj_tracker_view::timerEvent(), VSView::timerEvent(), vobj_tracker_view::vobj_tracker_view(), and VSView::VSView().
virtual int VideoSource::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 in BmpVideoSource, DShowCB, DShowFile, MPlayerVideoSource, and OpenCVVideoSource.
Definition at line 92 of file videosource.h.
Referenced by vobj_tracker_view::timerEvent(), and VSView::timerEvent().
virtual void* VideoSource::getInternalPointer | ( | ) | [inline, virtual] |
virtual void VideoSource::getSize | ( | int & | width, | |
int & | height | |||
) | [pure virtual] |
return width and height of images coming from the video source.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
Referenced by vobj_tracker_view::timerEvent(), VSView::timerEvent(), vobj_tracker_view::vobj_tracker_view(), and VSView::VSView().
virtual const char* VideoSource::getStreamName | ( | ) | const [pure virtual] |
Returns a string describing the stream.
If the source comes from a file, the filename is returned.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
virtual const char* VideoSource::getStreamType | ( | ) | const [pure virtual] |
Returns a string describing the type of the stream.
For example: BmpFile, AviFile, DShowCB...
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
virtual bool VideoSource::initialize | ( | ) | [pure virtual] |
initialized the video source.
Has to be called before any other method.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
virtual bool VideoSource::isPlaying | ( | ) | [pure virtual] |
return false if the source is paused.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
Referenced by vobj_tracker_view::keyPressEvent(), and VSView::keyPressEvent().
virtual void VideoSource::postProcess | ( | FptFrame * | ) | [inline, virtual] |
Allow the video source to have access to tracked data.
Usefull for networked applications.
Definition at line 101 of file videosource.h.
virtual void VideoSource::restart | ( | ) | [inline, virtual] |
Restart the video. On live media, just "start" it.
Definition at line 82 of file videosource.h.
References start().
virtual void VideoSource::start | ( | ) | [pure virtual] |
Start the video source: getFrame() will provide each time a different image.
After calling initialize(), the video source is playing.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
Referenced by vobj_tracker_view::keyPressEvent(), VSView::keyPressEvent(), restart(), vobj_tracker_view::vobj_tracker_view(), and VSView::VSView().
virtual void VideoSource::stop | ( | ) | [pure virtual] |
Pause the source.
The getFrame() method will always provide the current frame.
Implemented in BmpVideoSource, DC1394, DShowCB, DShowFile, FlyCaptureVideoSource, MPlayerVideoSource, and OpenCVVideoSource.
Referenced by vobj_tracker_view::keyPressEvent(), and VSView::keyPressEvent().