Image Component Library (ICL)
|
Xine-based Video Grabber (grabs most common image formats) More...
#include <VideoGrabber.h>
Public Member Functions | |
VideoGrabber (const std::string &fileName) throw (utils::FileNotFoundException,utils::InvalidFileException) | |
Create video grabber with given video-file name. | |
~VideoGrabber () | |
Destructor. | |
virtual const core::ImgBase * | acquireImage () |
grab function | |
void | pause () |
direct access to pause video playback (grab will block then) | |
void | unpause () |
direct access to unpause video playback | |
void | restart () |
direct access to restart video playback from the first frame | |
void | processPropertyChange (const utils::Configurable::Property &prop) |
callback for changed configurable properties | |
Protected Attributes | |
XineHandle * | m_xine |
internal data belonging to the xine library | |
Data * | m_data |
internal data | |
Params * | m_params |
property values |
Xine-based Video Grabber (grabs most common image formats)
The VideoGrabber implementation differs somehow from other Grabber implementations, as video playback is heavily constrained by the current video framerate. The VideoGrabber's property interface provides functions to set up the grabbers video playback speed. Internally video frames are obtained successively (using xine's 'experimental feature: framegrab_video_port').
Currently, drop-frames are not allowed/possible, so if the grabber is too slow to reach the desired Video-framerate, playback speed is decreased implicitly
The video grabber does not really work very stable. In particular when linked against the default xine build shipped with ubuntu, you will most likely get some seg-faults due to a known xine bug. Video streams that have a stream-size whose width is not a multiple of 8, will not be displayed correctly due to some undocumented data allignment issues. Some formats just cause seg-faults within 3rd party libs. seeking using setProperty("stream-pos") does not work robustly, however it does work in the icl-video-player application
Please note, that the OpenCVVideoGrabber might be an alternative for you
icl::io::VideoGrabber::VideoGrabber | ( | const std::string & | fileName | ) | throw (utils::FileNotFoundException,utils::InvalidFileException) |
Create video grabber with given video-file name.
Destructor.
virtual const core::ImgBase* icl::io::VideoGrabber::acquireImage | ( | ) | [virtual] |
grab function
Reimplemented from icl::io::Grabber.
void icl::io::VideoGrabber::pause | ( | ) |
direct access to pause video playback (grab will block then)
void icl::io::VideoGrabber::processPropertyChange | ( | const utils::Configurable::Property & | prop | ) |
callback for changed configurable properties
Reimplemented from icl::io::Grabber.
void icl::io::VideoGrabber::restart | ( | ) |
direct access to restart video playback from the first frame
void icl::io::VideoGrabber::unpause | ( | ) |
direct access to unpause video playback
Data* icl::io::VideoGrabber::m_data [protected] |
internal data
Params* icl::io::VideoGrabber::m_params [protected] |
property values
XineHandle* icl::io::VideoGrabber::m_xine [protected] |
internal data belonging to the xine library