CVD 0.8
Public Member Functions | Public Attributes
CVD::VideoBufferWithData< T, D > Class Template Reference

Certain video buffers, especially the decorator classes, and buffers such as ServerPushJpegBuffer have additional data with the same lifetime as the buffer. More...

#include <videobufferwithdata.h>

Inheritance diagram for CVD::VideoBufferWithData< T, D >:
CVD::VideoBuffer< T > CVD::RawVideoBuffer

List of all members.

Public Member Functions

 VideoBufferWithData (std::auto_ptr< VideoBuffer< T > > &buf_, std::auto_ptr< D > &d)
ImageRef size ()
virtual RawVideoBuffersource_buffer ()
VideoFrame< T > * get_frame ()
void put_frame (VideoFrame< T > *f)
bool frame_pending ()
void flush ()
double frame_rate ()
void seek_to (double time)

Public Attributes

std::auto_ptr< D > extra_data

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:
TThe pixel type of the video frames

Definition at line 36 of file videobufferwithdata.h.


Member Function Documentation

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.

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:
fThe frame that you are finished with.

Implements CVD::VideoBuffer< T >.

Definition at line 58 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>
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>
void CVD::VideoBufferWithData< T, D >::seek_to ( double  ) [inline, virtual]

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

Parameters:
tThe frame time in seconds

Reimplemented from CVD::RawVideoBuffer.

Definition at line 78 of file videobufferwithdata.h.


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