Base class for objects which provide a typed video stream. More...
|VideoBuffer (VideoBufferType::Type _type)|
|virtual VideoFrame< T > *||get_frame ()=0|
|virtual void||put_frame (VideoFrame< T > *f)=0|
|virtual void||flush ()|
Base class for objects which provide a typed video stream.
A video stream is a sequence of video frames (derived from VideoFrame).
|T||The pixel type of the video frames|
|virtual void CVD::VideoBuffer< T >::put_frame||(||VideoFrame< T > *||f||)||
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.|
Implemented in CVD::ColourspaceBuffer< T, From >, CVD::DeinterlaceBuffer< T >, CVD::DiskBuffer2< T >, CVD::LocalVideoBuffer< T >, CVD::ReadAheadVideoBuffer< T >, CVD::ServerPushJpegBuffer< C >, CVD::VideoBufferWithData< T, D >, CVD::VideoFileBuffer< T >, CVD::O2Buffer, CVD::DVBuffer2< T >, CVD::DVBuffer3< pixel_T >, CVD::V4L1Buffer< T >, CVD::V4L2BufferT< T >, CVD::V4LBuffer< T >, and CVD::LocalVideoBuffer< C >.
|virtual void CVD::VideoBuffer< T >::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.
On a non-flushable buffer, this does nothing.
Reimplemented in CVD::VideoBufferWithData< T, D >.
Returns the type of the video stream.
A video with live semantics has frames fed at some externally controlled rate, such as from a video camera.
A stream with live semantics also may be flushable, in that all current frames can be removed from the stream while frame_pending() is 1, and then the next get_frame() will sleep until a frame arrives. This ensures that the latency is low by discarding any old frames. Buffers flushable in this manner have a type of VideoBuffer::Type::Flushable.
Otherwise, streams have a type VideoBuffer::Type::NotLive, and frame_pending is always 1
This should be in the base class
Referenced by CVD::VideoBuffer< Rgb8 >::flush().