ml::VCVideoCaptureInterface Class Reference

Video Capture backend interface. More...

#include <mlVideoCaptureInterface.h>

Inheritance diagram for ml::VCVideoCaptureInterface:

ml::OpenCVVideoCapture ml::QTVideoCapture

List of all members.

Public Member Functions

virtual ~VCVideoCaptureInterface ()
 Macro for declaring methods for the runtime system.
virtual std::string lastErrorString ()
 Get description of last error.
virtual std::string getHumanReadableName ()=0
 Get driver name suitable for display.
virtual std::map< std::string,
std::string > 
inputDevices ()=0
 key: unique identifier that is persistent on one computer across device connections and disconnections (UTF8) val: localized human-readable name for the device (UTF8)
virtual std::string defaultInputDevice ()=0
 Get unique identifier of default video input device (UTF8).
virtual bool isInputDeviceAvailable (const std::string &inputDevice)=0
 Is the video input device with the given unique identifier available? (UTF8).
virtual std::map< std::string,
std::string > 
getVideoFormatsSupport (const std::string &inputDevice)=0
 Get video formats supported by the given device (unique identifier) (UTF8) key: unique identifier of the format (UTF8) val: localized human-readable name of the format (UTF8).
virtual std::string defaultVideoFormat (const std::string &inputDevice)=0
 Get unique identifier of default video format supported by the given device (unique identifier) (UTF8).
virtual std::list
< VCVideoFrameSize
getVideoFrameSizesSupport (const std::string &inputDevice)=0
 Get list of video frame sizes supported by the given device (unique identifier) (UTF8).
virtual bool startCapture (const std::string &inputDevice, const std::string &inputFormat, const VCVideoFrameSize &size=VCVideoFrameSize(), int frameRate=0)=0
 Starts video stream capture using the video input device & format with the given unique identifiers (UTF8).
virtual void stopCapture ()=0
 Stops video stream capture.
virtual bool isCapturing ()=0
 Returns capture run state.
void addVideoFrameNotificationCallback (VCVideoFrameNotificationFunc func, void *data=NULL)
 Add function which is called whenever a new video frame is available. THE FUNCTION IS NOT CALLED ON THE MAIN THREAD!
void removeVideoFrameNotificationCallback (VCVideoFrameNotificationFunc func, void *data=NULL)
 Remove function which is called whenever a new video frame is available.
void fireVideoFrameNotificationCallbacks ()
 Make all registered callbacks fire.
virtual bool getVideoFrameProperties (VCVideoFrameProps &props)=0
 Obtain image properties of current video frame.
virtual bool getVideoFrameAsMLImage (TSubImg< MLuint8 > *)
 Obtain image of current video frame using 8-bit data type.
virtual bool getVideoFrameAsMLImage (TSubImg< MLuint16 > *)
 Obtain image of current video frame using 16-bit data type.
virtual bool getVideoFrameAsMLImage (TSubImg< MLfloat > *)
 Obtain image of current video frame using float data type.

Public Attributes

public VC_EXTENDER: virtual unsigned int define2DGLTextureFromVideoFrame() { std::cout << "define2DGLTextureFromVideoFrame() has not been implemented for this driver." << std::endl
 return

Protected Member Functions

 VCVideoCaptureInterface ()
 C-tor.

Protected Attributes

std::list< std::pair
< VCVideoFrameNotificationFunc,
void * > > 
_frameNotificationFcts
std::string _errorString


Detailed Description

Video Capture backend interface.

Definition at line 71 of file mlVideoCaptureInterface.h.


Constructor & Destructor Documentation

virtual ml::VCVideoCaptureInterface::~VCVideoCaptureInterface (  )  [inline, virtual]

Macro for declaring methods for the runtime system.

D-tor

Definition at line 79 of file mlVideoCaptureInterface.h.

ml::VCVideoCaptureInterface::VCVideoCaptureInterface (  )  [inline, protected]

C-tor.

Definition at line 148 of file mlVideoCaptureInterface.h.


Member Function Documentation

void ml::VCVideoCaptureInterface::addVideoFrameNotificationCallback ( VCVideoFrameNotificationFunc  func,
void *  data = NULL 
)

Add function which is called whenever a new video frame is available. THE FUNCTION IS NOT CALLED ON THE MAIN THREAD!

virtual std::string ml::VCVideoCaptureInterface::defaultInputDevice (  )  [pure virtual]

Get unique identifier of default video input device (UTF8).

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual std::string ml::VCVideoCaptureInterface::defaultVideoFormat ( const std::string &  inputDevice  )  [pure virtual]

Get unique identifier of default video format supported by the given device (unique identifier) (UTF8).

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

void ml::VCVideoCaptureInterface::fireVideoFrameNotificationCallbacks (  ) 

Make all registered callbacks fire.

virtual std::string ml::VCVideoCaptureInterface::getHumanReadableName (  )  [pure virtual]

Get driver name suitable for display.

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual std::map<std::string, std::string> ml::VCVideoCaptureInterface::getVideoFormatsSupport ( const std::string &  inputDevice  )  [pure virtual]

Get video formats supported by the given device (unique identifier) (UTF8) key: unique identifier of the format (UTF8) val: localized human-readable name of the format (UTF8).

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual bool ml::VCVideoCaptureInterface::getVideoFrameAsMLImage ( TSubImg< MLfloat > *   )  [inline, virtual]

Obtain image of current video frame using float data type.

Definition at line 133 of file mlVideoCaptureInterface.h.

virtual bool ml::VCVideoCaptureInterface::getVideoFrameAsMLImage ( TSubImg< MLuint16 > *   )  [inline, virtual]

Obtain image of current video frame using 16-bit data type.

Definition at line 131 of file mlVideoCaptureInterface.h.

virtual bool ml::VCVideoCaptureInterface::getVideoFrameAsMLImage ( TSubImg< MLuint8 > *   )  [inline, virtual]

Obtain image of current video frame using 8-bit data type.

Reimplemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

Definition at line 129 of file mlVideoCaptureInterface.h.

virtual bool ml::VCVideoCaptureInterface::getVideoFrameProperties ( VCVideoFrameProps props  )  [pure virtual]

Obtain image properties of current video frame.

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual std::list<VCVideoFrameSize> ml::VCVideoCaptureInterface::getVideoFrameSizesSupport ( const std::string &  inputDevice  )  [pure virtual]

Get list of video frame sizes supported by the given device (unique identifier) (UTF8).

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual std::map<std::string, std::string> ml::VCVideoCaptureInterface::inputDevices (  )  [pure virtual]

key: unique identifier that is persistent on one computer across device connections and disconnections (UTF8) val: localized human-readable name for the device (UTF8)

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual bool ml::VCVideoCaptureInterface::isCapturing (  )  [pure virtual]

Returns capture run state.

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual bool ml::VCVideoCaptureInterface::isInputDeviceAvailable ( const std::string &  inputDevice  )  [pure virtual]

Is the video input device with the given unique identifier available? (UTF8).

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual std::string ml::VCVideoCaptureInterface::lastErrorString (  )  [inline, virtual]

Get description of last error.

Definition at line 82 of file mlVideoCaptureInterface.h.

void ml::VCVideoCaptureInterface::removeVideoFrameNotificationCallback ( VCVideoFrameNotificationFunc  func,
void *  data = NULL 
)

Remove function which is called whenever a new video frame is available.

virtual bool ml::VCVideoCaptureInterface::startCapture ( const std::string &  inputDevice,
const std::string &  inputFormat,
const VCVideoFrameSize size = VCVideoFrameSize(),
int  frameRate = 0 
) [pure virtual]

Starts video stream capture using the video input device & format with the given unique identifiers (UTF8).

If no video frame size and/or frame rate are provided, use the native resolution and/or frame rate of the video camera

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.

virtual void ml::VCVideoCaptureInterface::stopCapture (  )  [pure virtual]

Stops video stream capture.

Implemented in ml::QTVideoCapture, and ml::OpenCVVideoCapture.


Member Data Documentation

Definition at line 152 of file mlVideoCaptureInterface.h.

Definition at line 150 of file mlVideoCaptureInterface.h.

Definition at line 143 of file mlVideoCaptureInterface.h.

Reimplemented in ml::QTVideoCapture.

Definition at line 143 of file mlVideoCaptureInterface.h.


The documentation for this class was generated from the following file:

Generated on Sat Sep 3 18:39:51 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8