libcvd
|
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::unique_ptr< VideoBuffer< T >> &buf_, std::unique_ptr< D > &d) | |
ImageRef | size () |
The size of the VideoFrames returned by this buffer. | |
virtual RawVideoBuffer * | source_buffer () |
Which video grabber provides the source images for this video grabber. More... | |
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) |
Tell the buffer that you are finished with this frame. More... | |
bool | frame_pending () |
Is there a frame waiting in the buffer? This function does not block. More... | |
void | flush () |
Flush all old frames out of the video buffer, on a flushable buffer, causing the next get_frame() to sleep until a frame arrives. More... | |
double | frame_rate () |
What is the (expected) frame rate of this video buffer, in frames per second? | |
void | seek_to (double time) |
Go to a particular point in the video buffer (only implemented in buffers of recorded video) More... | |
![]() | |
VideoBuffer (VideoBufferType::Type _type) | |
Construct the buffer with the known semantics. | |
VideoBufferType::Type | type () |
Returns the type of the video stream. More... | |
![]() | |
RawVideoBuffer * | root_buffer () |
Follow the chain of video grabbers back as far as at will go. More... | |
Public Attributes | |
std::unique_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 |
|
inlinevirtual |
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 >.
|
inlinevirtual |
Is there a frame waiting in the buffer? This function does not block.
See is_live and is_flushable.
Implements CVD::RawVideoBuffer.
|
inlinevirtual |
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 >.
|
inlinevirtual |
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.
|
inlinevirtual |
Which video grabber provides the source images for this video grabber.
Reimplemented from CVD::RawVideoBuffer.