#include <videobufferwithdata.h>
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 RawVideoBuffer * | source_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 |
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.
T | The pixel type of the video frames |
Definition at line 36 of file videobufferwithdata.h.
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.
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.
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.
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.
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.
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.
f | The frame that you are finished with. |
Implements CVD::VideoBuffer< T >.
Definition at line 58 of file videobufferwithdata.h.
double CVD::VideoBufferWithData< T, D >::seek_to | ( | ) | [inline] |
Definition at line 78 of file videobufferwithdata.h.
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.
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.
std::auto_ptr<VideoBuffer<T> > CVD::VideoBufferWithData< T, D >::buf [private] |
Definition at line 85 of file videobufferwithdata.h.
std::auto_ptr<D> CVD::VideoBufferWithData< T, D >::extra_data |
Definition at line 87 of file videobufferwithdata.h.