CVD 0.8
|
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>
Public Member Functions | |
VideoBufferWithData (std::auto_ptr< VideoBuffer< T > > &buf_, std::auto_ptr< D > &d) | |
ImageRef | size () |
virtual RawVideoBuffer * | source_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 |
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.
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.
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.
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.
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.
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)
t | The frame time in seconds |
Reimplemented from CVD::RawVideoBuffer.
Definition at line 78 of file videobufferwithdata.h.