libcvd
Public Member Functions | List of all members
CVD::LocalVideoBuffer< T > Class Template Referenceabstract

Base class for a VideoBuffer which manages its own memory for each VideoFrame that it provides. More...

#include <localvideobuffer.h>

Inheritance diagram for CVD::LocalVideoBuffer< T >:
Inheritance graph
[legend]
Collaboration diagram for CVD::LocalVideoBuffer< T >:
Collaboration graph
[legend]

Public Member Functions

 LocalVideoBuffer (typename VideoBufferType::Type t)
 
virtual ImageRef size ()=0
 The size of the VideoFrames returned by this buffer.
 
virtual LocalVideoFrame< T > * get_frame ()=0
 Returns the next frame from the buffer. This function blocks until a frame is ready.
 
virtual void put_frame (VideoFrame< T > *f)=0
 Tell the buffer that you are finished with this frame. More...
 
virtual bool frame_pending ()=0
 Is there a frame waiting in the buffer? This function does not block. More...
 
virtual void seek_to (double)
 Go to a particular point in the video buffer (only implemented in buffers of recorded video) More...
 
- Public Member Functions inherited from CVD::VideoBuffer< T >
 VideoBuffer (VideoBufferType::Type _type)
 Construct the buffer with the known semantics.
 
virtual 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...
 
VideoBufferType::Type type ()
 Returns the type of the video stream. More...
 
- Public Member Functions inherited from CVD::RawVideoBuffer
virtual RawVideoBuffersource_buffer ()
 Which video grabber provides the source images for this video grabber. More...
 
RawVideoBufferroot_buffer ()
 Follow the chain of video grabbers back as far as at will go. More...
 
virtual double frame_rate ()=0
 What is the (expected) frame rate of this video buffer, in frames per second?
 

Detailed Description

template<class T>
class CVD::LocalVideoBuffer< T >

Base class for a VideoBuffer which manages its own memory for each VideoFrame that it provides.

(In contrast to most buffers, where the memory is managed by the video hardware.)

Parameters
TThe pixel type of the video frames

Member Function Documentation

◆ frame_pending()

template<class T>
virtual bool CVD::LocalVideoBuffer< T >::frame_pending ( )
pure virtual

Is there a frame waiting in the buffer? This function does not block.

See is_live and is_flushable.

Implements CVD::RawVideoBuffer.

Implemented in CVD::VideoFileBuffer< T >, CVD::DiskBuffer2< T >, CVD::ServerPushJpegBuffer< C >, CVD::ColourspaceBuffer< T, From >, and CVD::VideoReaderFileBuffer.

◆ put_frame()

template<class T>
virtual void CVD::LocalVideoBuffer< T >::put_frame ( VideoFrame< T > *  f)
pure virtual

Tell the buffer that you are finished with this frame.

Typically the VideoBuffer then destroys the frame.

Parameters
fThe frame that you are finished with.

Implements CVD::VideoBuffer< T >.

Implemented in CVD::VideoFileBuffer< T >, CVD::DiskBuffer2< T >, CVD::ServerPushJpegBuffer< C >, and CVD::ColourspaceBuffer< T, From >.

◆ seek_to()

template<class T>
virtual void CVD::LocalVideoBuffer< T >::seek_to ( double  )
inlinevirtual

Go to a particular point in the video buffer (only implemented in buffers of recorded video)

Parameters
tThe frame time in seconds

Reimplemented from CVD::RawVideoBuffer.

Reimplemented in CVD::VideoFileBuffer< T >, CVD::DiskBuffer2< T >, CVD::ServerPushJpegBuffer< C >, CVD::ColourspaceBuffer< T, From >, and CVD::VideoReaderFileBuffer.


The documentation for this class was generated from the following file: