CVD 0.8
|
Base class which provides untyped access to video grabber objects. More...
#include <videobuffer.h>
Public Member Functions | |
virtual RawVideoBuffer * | source_buffer () |
RawVideoBuffer * | root_buffer () |
virtual ImageRef | size ()=0 |
virtual bool | frame_pending ()=0 |
virtual double | frame_rate ()=0 |
virtual void | seek_to (double) |
virtual void | flush ()=0 |
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.
Definition at line 58 of file videobuffer.h.
virtual RawVideoBuffer* CVD::RawVideoBuffer::source_buffer | ( | ) | [inline, virtual] |
Which video grabber provides the source images for this video grabber.
Reimplemented in CVD::ColourspaceBuffer< T, From >, and CVD::VideoBufferWithData< T, D >.
Definition at line 64 of file videobuffer.h.
Referenced by 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.
Definition at line 71 of file videobuffer.h.
References source_buffer().
virtual bool CVD::RawVideoBuffer::frame_pending | ( | ) | [pure virtual] |
Is there a frame waiting in the buffer? This function does not block.
See is_live and is_flushable.
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::DV3::RawDVBuffer3, CVD::DVBuffer3< pixel_T >, CVD::V4L1Buffer< T >, CVD::V4LBuffer< T >, and CVD::LocalVideoBuffer< C >.
Referenced by CVD::VideoBuffer< Rgb8 >::flush(), and CVD::ColourspaceBuffer< T, From >::frame_pending().
virtual void CVD::RawVideoBuffer::seek_to | ( | double | ) | [inline, virtual] |
Go to a particular point in the video buffer (only implemented in buffers of recorded video)
t | The frame time in seconds |
Reimplemented 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::DVBuffer2< T >, CVD::DVBuffer3< pixel_T >, and CVD::LocalVideoBuffer< C >.
Definition at line 93 of file videobuffer.h.
Referenced by CVD::ColourspaceBuffer< T, From >::seek_to().
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::VideoBufferWithData< T, D >, CVD::VideoBuffer< C >, CVD::VideoBuffer< From >, CVD::VideoBuffer< pixel_T >, and CVD::VideoBuffer< Rgb8 >.