HardwareSingleVideoSource Class Reference

#include <HardwareSingleVideoSource.hh>

Inheritance diagram for HardwareSingleVideoSource:

Inheritance graph
[legend]
Collaboration diagram for HardwareSingleVideoSource:

Collaboration graph
[legend]
List of all members.

Detailed Description

It uses a single-stream behaviour to retrieve one stream of IplImage(s) from an hardware device, a webcam or a framegrabber.

Definition at line 35 of file HardwareSingleVideoSource.hh.

Public Member Functions

 HardwareSingleVideoSource (int camera_num)
 Constructor.
virtual ~HardwareSingleVideoSource ()
bool init_device ()
 Init device. It can be a webcam, a framegrabber or simpler a buffered class.
bool is_multi_stream ()
 Determine if the derived class is of type multi-stream or single-stream.
IplImage * get_next_frame ()
 Get the next image in the stream.
virtual IplImage * get_next_frame_by_stream_id (int stream_id)
 Redefined virtual function for multi video source.
virtual void add_image_by_stream_id (IplImage *image, int stream_id, char *__unused__, void *callback_data)
 Redefined virtual function for multi video source.

Private Attributes

bool _initialized
 Specify whether the class is initialized or not.
int _camera_num
 Camera number mapped on system.
CvCapture * _cam_input
 OpenCV capture structure.


Constructor & Destructor Documentation

HardwareSingleVideoSource::HardwareSingleVideoSource ( int  camera_num  ) 

Parameters:
camera_num Identify the camera between other grabbing inputs devices.

Definition at line 23 of file HardwareSingleVideoSource.cpp.

References _initialized.

HardwareSingleVideoSource::~HardwareSingleVideoSource (  )  [virtual]

Definition at line 29 of file HardwareSingleVideoSource.cpp.

References _cam_input, _initialized, and NULL.


Member Function Documentation

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

We don't need them here

Reimplemented from BaseInputVideo.

Definition at line 84 of file HardwareSingleVideoSource.cpp.

IplImage * HardwareSingleVideoSource::get_next_frame (  )  [virtual]

Depends on OpenCV grabbing context.

Returns:
The next image in the stream.
Note:
The returned IplImage* must be freed by the caller.

Implements BaseInputVideo.

Definition at line 53 of file HardwareSingleVideoSource.cpp.

References _cam_input, _initialized, DEBUG_PRINT, init_device(), and NULL.

Here is the call graph for this function:

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

We don't need them here

Implements BaseInputVideo.

Definition at line 79 of file HardwareSingleVideoSource.cpp.

References NULL.

bool HardwareSingleVideoSource::init_device (  )  [virtual]

Implements BaseInputVideo.

Definition at line 38 of file HardwareSingleVideoSource.cpp.

References _cam_input, _camera_num, _initialized, DEBUG_PRINT, and NULL.

Referenced by get_next_frame().

Here is the caller graph for this function:

bool HardwareSingleVideoSource::is_multi_stream (  )  [virtual]

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

Implements BaseInputVideo.

Definition at line 89 of file HardwareSingleVideoSource.cpp.


Member Data Documentation

CvCapture* HardwareSingleVideoSource::_cam_input [private]

Definition at line 71 of file HardwareSingleVideoSource.hh.

Referenced by get_next_frame(), init_device(), and ~HardwareSingleVideoSource().

int HardwareSingleVideoSource::_camera_num [private]

Definition at line 68 of file HardwareSingleVideoSource.hh.

Referenced by init_device().

bool HardwareSingleVideoSource::_initialized [private]

Definition at line 65 of file HardwareSingleVideoSource.hh.

Referenced by get_next_frame(), HardwareSingleVideoSource(), init_device(), and ~HardwareSingleVideoSource().


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