1 #ifndef CVD_VIDEOBUFFERWITHDATA_H 2 #define CVD_VIDEOBUFFERWITHDATA_H 4 #include <cvd/videobuffer.h> 16 template <
class T,
class D>
22 , buf(std::move(buf_))
39 return buf->get_frame();
49 return buf->frame_pending();
59 return buf->frame_rate();
64 return buf->seek_to(time);
68 std::unique_ptr<VideoBuffer<T>> buf;
71 std::unique_ptr<D> extra_data;
bool frame_pending()
Is there a frame waiting in the buffer? This function does not block.
Definition: videobufferwithdata.h:47
Base class which provides untyped access to video grabber objects.
Definition: videobuffer.h:39
All classes and functions are within the CVD namespace.
Definition: argb.h:6
Base class for objects which provide a typed video stream.
Definition: videobuffer.h:88
ImageRef size()
The size of the VideoFrames returned by this buffer.
Definition: videobufferwithdata.h:27
virtual RawVideoBuffer * source_buffer()
Which video grabber provides the source images for this video grabber.
Definition: videobufferwithdata.h:32
void seek_to(double time)
Go to a particular point in the video buffer (only implemented in buffers of recorded video) ...
Definition: videobufferwithdata.h:62
Definition: image_ref.h:29
double frame_rate()
What is the (expected) frame rate of this video buffer, in frames per second?
Definition: videobufferwithdata.h:57
A frame from a VideoBuffer.
Definition: videoframe.h:35
void flush()
Flush all old frames out of the video buffer, on a flushable buffer, causing the next get_frame() to ...
Definition: videobufferwithdata.h:52
VideoFrame< T > * get_frame()
Returns the next frame from the buffer. This function blocks until a frame is ready.
Definition: videobufferwithdata.h:37
Certain video buffers, especially the decorator classes, and buffers such as ServerPushJpegBuffer hav...
Definition: videobufferwithdata.h:17
void put_frame(VideoFrame< T > *f)
Tell the buffer that you are finished with this frame.
Definition: videobufferwithdata.h:42