BaseInputVideo Class Reference

#include <BaseInputVideo.hh>

Inheritance diagram for BaseInputVideo:

Inheritance graph
[legend]
List of all members.

Detailed Description

It will be the base class [interface] for retrieving IplImages from a phisical device or [in our case] from a face tracking buffer [e.g multi faces detected]

Definition at line 32 of file BaseInputVideo.hh.

Public Member Functions

 BaseInputVideo ()
virtual ~BaseInputVideo ()
virtual bool init_device ()=0
 Init device. It can be a webcam, a framegrabber or simpler a buffered class.
virtual bool is_multi_stream ()=0
 Determine if the derived class is of type multi-stream or single-stream.
virtual IplImage * get_next_frame ()=0
 Function that grabs the "next" frame in a stream, a file or a webcam.
virtual IplImage * get_next_frame_by_stream_id (int stream_id)=0
 Retrieves an IplImage from a chosen stream.

Static Public Member Functions

static void add_image_by_stream_id (IplImage *image, int stream_id, char *__unused__, void *callback_data)
 Adds an image to a chosen stream.

Protected Types

typedef void( on_parsable_image_cb )(IplImage *image, void *this_klass_callback_data, void *callback_data)
 Callback typedef.


Member Typedef Documentation

BaseInputVideo::on_parsable_image_cb [protected]

Parameters:
image Image grabbed hardware source
this_klass_callback_data A BaseInputVideo's subclass "this" pointer.
callback_data Usually an instance to "this" so that the source object can be reached from outside, and for example, call add_image_by_stream_id ().

Definition at line 122 of file BaseInputVideo.hh.


Constructor & Destructor Documentation

BaseInputVideo::BaseInputVideo (  ) 

Definition at line 22 of file BaseInputVideo.cpp.

BaseInputVideo::~BaseInputVideo (  )  [virtual]

Definition at line 27 of file BaseInputVideo.cpp.


Member Function Documentation

static void BaseInputVideo::add_image_by_stream_id ( IplImage *  image,
int  stream_id,
char *  __unused__,
void *  callback_data 
) [static]

Parameters:
image The IplImage we want to add to the stream.
stream_id The stream number we want to add the image to. There can be multiple streams.
__unused__ Unused param. Can be NULL. It's let here for compatibility with OmniStuff callbacks.
callback_data Class pointer to be able to access to its members.
Note:
We'll *not* take an internal copy of image in our list, but only it's pointer. So don't free the image when you call this function. If we have num streams, stream_id will range from 0 to num-1.

Reimplemented in BufferedImageMultiVideoSource, FileSingleVideoSource, and HardwareSingleVideoSource.

virtual IplImage* BaseInputVideo::get_next_frame (  )  [pure virtual]

Returns:
the IplImage grabbed from the stream.
Note:
the returned IplImage* must be freed by the caller

Implemented in BufferedImageMultiVideoSource, FileSingleVideoSource, and HardwareSingleVideoSource.

Referenced by BufferedImageMultiVideoSource::get_next_frame_by_stream_id(), MJPEGVideoSource::startCapture(), and H263plusVideoSource::startCapture().

Here is the caller graph for this function:

virtual IplImage* BaseInputVideo::get_next_frame_by_stream_id ( int  stream_id  )  [pure virtual]

Parameters:
stream_id The number of the stream we want to get the image from.
Returns:
The next IplImage, if available, of the specified stream_id.
Note:
the returned IplImage* must be freed by the caller

Implemented in BufferedImageMultiVideoSource, FileSingleVideoSource, and HardwareSingleVideoSource.

Referenced by MJPEGVideoSource::startCapture(), and H263plusVideoSource::startCapture().

Here is the caller graph for this function:

virtual bool BaseInputVideo::init_device (  )  [pure virtual]

Implemented in BufferedImageMultiVideoSource, FileSingleVideoSource, and HardwareSingleVideoSource.

Referenced by BufferedImageMultiVideoSource::BufferedImageMultiVideoSource(), H263plusVideoSource::H263plusVideoSource(), and MJPEGVideoSource::MJPEGVideoSource().

Here is the caller graph for this function:

virtual bool BaseInputVideo::is_multi_stream (  )  [pure virtual]

Returns:
true if the class is multistream, false if it's singlestream.

Implemented in BufferedImageMultiVideoSource, FileSingleVideoSource, and HardwareSingleVideoSource.

Referenced by H263plusVideoSource::deliverFrame(), MJPEGVideoSource::startCapture(), and H263plusVideoSource::startCapture().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Tue Dec 26 10:35:26 2006 for Omnimeeting by  doxygen 1.4.7