CVD::VideoBufferWithData< T, D > Class Template Reference
[Video buffers]

#include <videobufferwithdata.h>

Inheritance diagram for CVD::VideoBufferWithData< T, D >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void flush ()
bool frame_pending ()
double frame_rate ()
 What is the (expected) frame rate of this video buffer, in frames per second?
VideoFrame< T > * get_frame ()
 Returns the next frame from the buffer. This function blocks until a frame is ready.
void put_frame (VideoFrame< T > *f)
double seek_to ()
ImageRef size ()
 The size of the VideoFrames returned by this buffer.
virtual RawVideoBuffersource_buffer ()
 VideoBufferWithData (std::auto_ptr< VideoBuffer< T > > &buf_, std::auto_ptr< D > &d)

Public Attributes

std::auto_ptr< D > extra_data

Private Attributes

std::auto_ptr< VideoBuffer< T > > buf

Detailed Description

template<class T, class D>
class CVD::VideoBufferWithData< T, D >

Certain video buffers, especially the decorator classes, and buffers such as ServerPushJpegBuffer have additional data with the same lifetime as the buffer. This is a tool to allow management of this data. This class manages a video buffer and some data concurrently.

Parameters:
T The pixel type of the video frames

Definition at line 36 of file videobufferwithdata.h.


Constructor & Destructor Documentation

template<class T, class D>
CVD::VideoBufferWithData< T, D >::VideoBufferWithData ( std::auto_ptr< VideoBuffer< T > > &  buf_,
std::auto_ptr< D > &  d 
) [inline]

Definition at line 39 of file videobufferwithdata.h.


Member Function Documentation

template<class T, class D>
void CVD::VideoBufferWithData< T, D >::flush (  )  [inline, virtual]

Flush all old frames out of the video buffer, on a flushable buffer, causing the next get_frame() to sleep until a frame arrives. On a non-flushable buffer, this does nothing.

Reimplemented from CVD::VideoBuffer< T >.

Definition at line 68 of file videobufferwithdata.h.

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

Is there a frame waiting in the buffer? This function does not block. See is_live and is_flushable.

Implements CVD::RawVideoBuffer.

Definition at line 63 of file videobufferwithdata.h.

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

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

Implements CVD::RawVideoBuffer.

Definition at line 73 of file videobufferwithdata.h.

template<class T, class D>
VideoFrame<T>* CVD::VideoBufferWithData< T, D >::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 53 of file videobufferwithdata.h.

template<class T, class D>
void CVD::VideoBufferWithData< T, D >::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 58 of file videobufferwithdata.h.

template<class T, class D>
double CVD::VideoBufferWithData< T, D >::seek_to (  )  [inline]

Definition at line 78 of file videobufferwithdata.h.

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

The size of the VideoFrames returned by this buffer.

Implements CVD::RawVideoBuffer.

Definition at line 43 of file videobufferwithdata.h.

template<class T, class D>
virtual RawVideoBuffer* CVD::VideoBufferWithData< T, D >::source_buffer (  )  [inline, virtual]

Which video grabber provides the source images for this video grabber.

Reimplemented from CVD::RawVideoBuffer.

Definition at line 48 of file videobufferwithdata.h.


Member Data Documentation

template<class T, class D>
std::auto_ptr<VideoBuffer<T> > CVD::VideoBufferWithData< T, D >::buf [private]

Definition at line 85 of file videobufferwithdata.h.

template<class T, class D>
std::auto_ptr<D> CVD::VideoBufferWithData< T, D >::extra_data

Definition at line 87 of file videobufferwithdata.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libcvd
Author(s): Edward Rosten, Paul Smith, Tom Drummond, Gerhard Reitmayr, Ethan Eade, Timothy Gan, Chris Kemp, Georg Klein
autogenerated on Fri Jan 11 09:13:53 2013