BufferedImageMultiVideoSource Class Reference

#include <BufferedImageMultiVideoSource.hh>

Inheritance diagram for BufferedImageMultiVideoSource:

Inheritance graph
[legend]
Collaboration diagram for BufferedImageMultiVideoSource:

Collaboration graph
[legend]
List of all members.

Detailed Description

It uses a multi-stream behaviour to store many image streams.

Definition at line 42 of file BufferedImageMultiVideoSource.hh.

Public Member Functions

 BufferedImageMultiVideoSource (unsigned int streams_num, on_parsable_image_cb *f, void *parsable_image_callback_data, BaseInputVideo *input_single_video)
 Constructor.
virtual ~BufferedImageMultiVideoSource ()
bool init_device ()
bool is_multi_stream ()
virtual IplImage * get_next_frame ()
 Function that grabs the "next" frame in a stream, a file or a webcam.
IplImage * get_next_frame_by_stream_id (int stream_id)

Static Public Member Functions

static void add_image_by_stream_id (IplImage *image, int stream_id, char *__unused__, void *callback_data)
 Static function.

Private Attributes

on_parsable_image_cbf_parsable_cb
 Function pointer to the parsing method. It can be for example a function of the OmniStuff library.
vector< list< IplImage * > * > * _streams_vector
 A list of IplImage pointers.
unsigned int _streams_num
 Total number of stream the class will manage.
BaseInputVideo_input_single_video
 Instance of a BaseInputVideo concrete class.
bool _initialized
 Specify whether the class is initialized or not.
void * _parsable_image_callback_data
 The host "this" pointer class which will maintain the conjunction between the streamer library and the image parser one. See BaseInputVideo for schemas.


Constructor & Destructor Documentation

BufferedImageMultiVideoSource::BufferedImageMultiVideoSource ( unsigned int  streams_num,
on_parsable_image_cb f,
void *  parsable_image_callback_data,
BaseInputVideo input_single_video 
)

Parameters:
streams_num Number of streams this class will manage. They'll range from 0 to stream_num-1.
f Callback function for parsing purposes.
parsable_image_callback_data User data to pass to the callback function
input_single_video Instance of a SingleVideoSource class. It can be a FileSingleVideoSource, a HardwareSingleVideoSource and so on...
See also:
BaseInputVideo

Definition at line 24 of file BufferedImageMultiVideoSource.cpp.

References _initialized, _input_single_video, _streams_vector, DEBUG_PRINT, BaseInputVideo::init_device(), and NULL.

Here is the call graph for this function:

BufferedImageMultiVideoSource::~BufferedImageMultiVideoSource (  )  [virtual]

Definition at line 42 of file BufferedImageMultiVideoSource.cpp.

References _initialized, _streams_vector, and NULL.


Member Function Documentation

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

Will add a parsed image to the specified stream.

Warning:
The class will *not* take an internal copy of image in the _streams_vector list, but only it's pointer. !*DO NOT FREE*! the image when you call this function.

Reimplemented from BaseInputVideo.

Definition at line 87 of file BufferedImageMultiVideoSource.cpp.

References _initialized, _streams_vector, init_device(), and NULL.

Referenced by StreamerCtrlThread::initializeOmniStuff().

Here is the call graph for this function:

Here is the caller graph for this function:

IplImage * BufferedImageMultiVideoSource::get_next_frame (  )  [virtual]

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

Implements BaseInputVideo.

Definition at line 180 of file BufferedImageMultiVideoSource.cpp.

References _streams_num, get_next_frame_by_stream_id(), and NULL.

Here is the call graph for this function:

IplImage * BufferedImageMultiVideoSource::get_next_frame_by_stream_id ( int  stream_id  )  [virtual]

Note:
The returned IplImage* must be freed by the caller.

The returned image will be removed from the list.

Implements BaseInputVideo.

Definition at line 108 of file BufferedImageMultiVideoSource.cpp.

References _initialized, _input_single_video, _parsable_image_callback_data, _streams_vector, DEBUG_PRINT, f_parsable_cb, BaseInputVideo::get_next_frame(), init_device(), and NULL.

Referenced by get_next_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

bool BufferedImageMultiVideoSource::init_device (  )  [virtual]

See also:
BaseInputVideo::init_device

Implements BaseInputVideo.

Definition at line 67 of file BufferedImageMultiVideoSource.cpp.

References _initialized, _streams_num, _streams_vector, and NULL.

Referenced by add_image_by_stream_id(), and get_next_frame_by_stream_id().

Here is the caller graph for this function:

bool BufferedImageMultiVideoSource::is_multi_stream (  )  [virtual]

See also:
BaseInputVideo::is_multi_stream

Implements BaseInputVideo.

Definition at line 175 of file BufferedImageMultiVideoSource.cpp.


Member Data Documentation

bool BufferedImageMultiVideoSource::_initialized [private]

Definition at line 111 of file BufferedImageMultiVideoSource.hh.

Referenced by add_image_by_stream_id(), BufferedImageMultiVideoSource(), get_next_frame_by_stream_id(), init_device(), and ~BufferedImageMultiVideoSource().

BaseInputVideo* BufferedImageMultiVideoSource::_input_single_video [private]

Definition at line 108 of file BufferedImageMultiVideoSource.hh.

Referenced by BufferedImageMultiVideoSource(), and get_next_frame_by_stream_id().

void* BufferedImageMultiVideoSource::_parsable_image_callback_data [private]

Definition at line 118 of file BufferedImageMultiVideoSource.hh.

Referenced by get_next_frame_by_stream_id().

unsigned int BufferedImageMultiVideoSource::_streams_num [private]

Definition at line 105 of file BufferedImageMultiVideoSource.hh.

Referenced by get_next_frame(), and init_device().

vector< list<IplImage*>* >* BufferedImageMultiVideoSource::_streams_vector [private]

Definition at line 102 of file BufferedImageMultiVideoSource.hh.

Referenced by add_image_by_stream_id(), BufferedImageMultiVideoSource(), get_next_frame_by_stream_id(), init_device(), and ~BufferedImageMultiVideoSource().

on_parsable_image_cb* BufferedImageMultiVideoSource::f_parsable_cb [private]

Definition at line 97 of file BufferedImageMultiVideoSource.hh.

Referenced by get_next_frame_by_stream_id().


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