libcvd
Public Member Functions | List of all members
CVD::RawVideoBuffer Class Referenceabstract

Base class which provides untyped access to video grabber objects. More...

#include <videobuffer.h>

Inheritance diagram for CVD::RawVideoBuffer:
Inheritance graph
[legend]

Public Member Functions

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 ImageRef size ()=0
 The size of the VideoFrames returned by this buffer.
 
virtual bool frame_pending ()=0
 Is there a frame waiting in the buffer? This function does not block. More...
 
virtual double frame_rate ()=0
 What is the (expected) frame rate of this video buffer, in frames per second?
 
virtual void seek_to (double)
 Go to a particular point in the video buffer (only implemented in buffers of recorded video) More...
 
virtual void flush ()=0
 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...
 

Detailed Description

Base class which provides untyped access to video grabber objects.

This provides all of the functionality for which the type does not need to be known (eg size, etc).

This allows one to follow chains of video buffers which change types (for instance code>ColourspaceBuffer<Rgb<byte>, byte>) and get to the underlying video grabber. This provides access to the grabber specific controls.

See progs/video_play_source.cc for a very basic example.

Member Function Documentation

◆ flush()

virtual void CVD::RawVideoBuffer::flush ( )
pure 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.

Implemented in CVD::VideoBuffer< T >, CVD::VideoBuffer< C >, CVD::VideoBuffer< Rgba< std::uint8_t > >, CVD::VideoBuffer< From >, CVD::VideoBuffer< pixel_T >, and CVD::VideoBufferWithData< T, D >.

◆ frame_pending()

virtual bool CVD::RawVideoBuffer::frame_pending ( )
pure virtual

◆ root_buffer()

RawVideoBuffer* CVD::RawVideoBuffer::root_buffer ( )
inline

Follow the chain of video grabbers back as far as at will go.

This will usually yield the video grabber dealing with the hardware.

◆ seek_to()

virtual void CVD::RawVideoBuffer::seek_to ( double  )
inlinevirtual

◆ source_buffer()

virtual RawVideoBuffer* CVD::RawVideoBuffer::source_buffer ( )
inlinevirtual

Which video grabber provides the source images for this video grabber.

Reimplemented in CVD::DeinterlaceBuffer< T >, CVD::SkipBuffer< T >, CVD::ColourspaceBuffer< T, From >, and CVD::VideoBufferWithData< T, D >.


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