CVD::ReadAheadVideoBuffer< T > Class Template Reference
[Video buffers]

#include <readaheadvideobuffer.h>

Inheritance diagram for CVD::ReadAheadVideoBuffer< T >:

CVD::VideoBuffer< T > CVD::Runnable

List of all members.


Detailed Description

template<class T>
class CVD::ReadAheadVideoBuffer< T >

Decorator video buffer that preloads frames asynchronously in a separate thread.

Parameters:
T The pixel type of the video frames
vb The video buffer to wrap/preload
maxReadAhead The maximum number of frames to read ahead asynchronously; the underlying VideoBuffer must support this many concurrently existing VideoFrame's

Definition at line 70 of file readaheadvideobuffer.h.


Public Member Functions

virtual ~ReadAheadVideoBuffer ()
 ReadAheadVideoBuffer (VideoBuffer< T > &vb, size_t maxReadAhead=10)
void run ()
ImageRef size ()
VideoFrame< T > * get_frame ()
void put_frame (VideoFrame< T > *f)
bool frame_pending ()
double frame_rate ()
void seek_to (double t)

Member Function Documentation

template<class T>
void CVD::ReadAheadVideoBuffer< T >::run (  )  [inline, virtual]

Perform the function of this object.

Implements CVD::Runnable.

Definition at line 102 of file readaheadvideobuffer.h.

References CVD::Thread::shouldStop(), CVD::EventObject::trigger(), and CVD::EventObject::wait().

template<class T>
ImageRef CVD::ReadAheadVideoBuffer< T >::size (  )  [inline, virtual]

The size of the VideoFrames returned by this buffer.

Implements CVD::VideoBuffer< T >.

Definition at line 128 of file readaheadvideobuffer.h.

template<class T>
VideoFrame<T>* CVD::ReadAheadVideoBuffer< T >::get_frame (  )  [inline, virtual]

Returns the next frame from the buffer. This function blocks until a frame is ready.

Implements CVD::VideoBuffer< T >.

Definition at line 130 of file readaheadvideobuffer.h.

References CVD::EventObject::trigger(), and CVD::EventObject::wait().

template<class T>
void CVD::ReadAheadVideoBuffer< T >::put_frame ( VideoFrame< T > *  f  )  [inline, virtual]

Tell the buffer that you are finished with this frame.

Typically the VideoBuffer then destroys the frame.

Parameters:
f The frame that you are finished with.

Implements CVD::VideoBuffer< T >.

Definition at line 142 of file readaheadvideobuffer.h.

template<class T>
bool CVD::ReadAheadVideoBuffer< T >::frame_pending (  )  [inline, virtual]

Is there a frame waiting in the buffer? This function does not block.

Implements CVD::VideoBuffer< T >.

Definition at line 144 of file readaheadvideobuffer.h.

template<class T>
double CVD::ReadAheadVideoBuffer< T >::frame_rate (  )  [inline, virtual]

What is the (expected) frame rate of this video buffer, in frames per second?

Implements CVD::VideoBuffer< T >.

Definition at line 148 of file readaheadvideobuffer.h.

template<class T>
void CVD::ReadAheadVideoBuffer< T >::seek_to ( double  t  )  [inline, virtual]

Go to a particular point in the video buffer (only implemented in buffers of recorded video).

Parameters:
t The frame time in seconds

Reimplemented from CVD::VideoBuffer< T >.

Definition at line 151 of file readaheadvideobuffer.h.

References CVD::EventObject::triggerAll().


The documentation for this class was generated from the following file:
Generated on Wed Feb 18 10:23:07 2009 for CVD by  doxygen 1.5.3