CVD::VideoBuffer< T > Class Template Reference
[Video buffers]

#include <videobuffer.h>

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

List of all members.

Public Member Functions

virtual void flush ()
virtual VideoFrame< 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
VideoBufferType::Type type ()
 VideoBuffer (VideoBufferType::Type _type)
 Construct the buffer with the known semantics.
virtual ~VideoBuffer ()

Private Attributes

VideoBufferType::Type m_type

Detailed Description

template<class T>
class CVD::VideoBuffer< T >

Base class for objects which provide a typed video stream. A video stream is a sequence of video frames (derived from VideoFrame).

Parameters:
T The pixel type of the video frames

Definition at line 110 of file videobuffer.h.


Constructor & Destructor Documentation

template<class T>
CVD::VideoBuffer< T >::VideoBuffer ( VideoBufferType::Type  _type  )  [inline]

Construct the buffer with the known semantics.

Definition at line 114 of file videobuffer.h.

template<class T>
virtual CVD::VideoBuffer< T >::~VideoBuffer (  )  [inline, virtual]

Definition at line 118 of file videobuffer.h.


Member Function Documentation

template<class T>
virtual void CVD::VideoBuffer< T >::flush (  )  [inline, 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.

Implements CVD::RawVideoBuffer.

Reimplemented in CVD::VideoBufferWithData< T, D >.

Definition at line 128 of file videobuffer.h.

template<class T>
virtual VideoFrame<T>* CVD::VideoBuffer< T >::get_frame (  )  [pure virtual]
template<class T>
virtual void CVD::VideoBuffer< T >::put_frame ( VideoFrame< T > *  f  )  [pure virtual]
template<class T>
VideoBufferType::Type CVD::VideoBuffer< T >::type (  )  [inline]

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.

Some live streams are not flushable because it is not possible to determine the state of frame_pending(). These have the type VideoBuffer::Type::Live, and frame_pending() is always 1.

Otherwise, streams have a type VideoBuffer::Type::NotLive, and frame_pending is always 1

This should be in the base class

Definition at line 156 of file videobuffer.h.


Member Data Documentation

template<class T>
VideoBufferType::Type CVD::VideoBuffer< T >::m_type [private]

Definition at line 162 of file videobuffer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libcvd
Author(s): Edward Rosten, Paul Smith, Tom Drummond, Gerhard Reitmayr, Ethan Eade, Timothy Gan, Chris Kemp, Georg Klein
autogenerated on Fri Jan 11 09:13:53 2013