CVD::ColourspaceBuffer< T, From > Class Template Reference
[Video buffers]

#include <colourspacebuffer.h>

Inheritance diagram for CVD::ColourspaceBuffer< T, From >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ColourspaceBuffer (CVD::VideoBuffer< From > &buf)
virtual bool frame_pending ()
virtual double frame_rate ()
 What is the (expected) frame rate of this video buffer, in frames per second?
virtual CVD::ColourspaceFrame
< T > * 
get_frame ()
 Returns the next frame from the buffer. This function blocks until a frame is ready.
virtual void put_frame (CVD::VideoFrame< T > *f)
virtual void seek_to (double t)
ImageRef size ()
 The size of the VideoFrames returns by this buffer.
virtual RawVideoBuffersource_buffer ()

Private Attributes

ImageRef m_size
CVD::VideoBuffer< From > & m_vidbuf

Detailed Description

template<class T, class From>
class CVD::ColourspaceBuffer< T, From >

A decorator class which wraps a VideoBuffer to perfrom colourspace conversion on the incoming data. In general, the kernel video buffers such as dvbuffer and v4l1buffer give access to what the device can provide natively. However, the native formats may not be what is required. This buffer transparently converts incoming frames to the required type.

Not every possible conversion is available natively through the library, some conversions have to be performed in several steps. For instance, to convert yuv411 to Rgb<float>, the conversion must go via Rgb<byte> since the conversions from yuv411 are limited.

Provides frames of type CVD::ColourspaceFrame.

This class throws only generic VideoBuffer exceptions, but the underlying videobuffer may throw.

Parameters:
From The pixel type of the original VideoBuffer
T The pixel type to convert in to.

Definition at line 50 of file colourspacebuffer.h.


Constructor & Destructor Documentation

template<class T , class From >
CVD::ColourspaceBuffer< T, From >::ColourspaceBuffer ( CVD::VideoBuffer< From > &  buf  )  [inline]

Construct a ColourspaceBuffer by wrapping it around another VideoBuffer

Parameters:
buf The buffer that will provide the raw frames

Definition at line 34 of file colourspacebuffer.h.


Member Function Documentation

template<class T , class From >
virtual bool CVD::ColourspaceBuffer< T, From >::frame_pending (  )  [inline, virtual]

Is there a frame waiting in the buffer? This function does not block. See is_live and is_flushable.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 50 of file colourspacebuffer.h.

template<class T , class From >
virtual double CVD::ColourspaceBuffer< T, From >::frame_rate (  )  [inline, virtual]

What is the (expected) frame rate of this video buffer, in frames per second?

Implements CVD::RawVideoBuffer.

Definition at line 60 of file colourspacebuffer.h.

template<class T , class From >
virtual CVD::ColourspaceFrame<T>* CVD::ColourspaceBuffer< T, From >::get_frame (  )  [inline, virtual]

Returns the next frame from the buffer. This function blocks until a frame is ready.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 65 of file colourspacebuffer.h.

template<class T , class From >
virtual void CVD::ColourspaceBuffer< T, From >::put_frame ( CVD::VideoFrame< T > *  f  )  [inline, virtual]

Tell the buffer that you are finished with this frame. Typically the VideoBuffer then destroys the frame.

Parameters:
f The frame that you are finished with.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 77 of file colourspacebuffer.h.

template<class T , class From >
virtual void CVD::ColourspaceBuffer< T, From >::seek_to ( double   )  [inline, virtual]

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

Parameters:
t The frame time in seconds

Reimplemented from CVD::LocalVideoBuffer< T >.

Definition at line 55 of file colourspacebuffer.h.

template<class T , class From >
ImageRef CVD::ColourspaceBuffer< T, From >::size (  )  [inline, virtual]

The size of the VideoFrames returns by this buffer.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 45 of file colourspacebuffer.h.

template<class T , class From >
virtual RawVideoBuffer* CVD::ColourspaceBuffer< T, From >::source_buffer (  )  [inline, virtual]

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

Reimplemented from CVD::RawVideoBuffer.

Definition at line 39 of file colourspacebuffer.h.


Member Data Documentation

template<class T , class From >
ImageRef CVD::ColourspaceBuffer< T, From >::m_size [private]

Definition at line 90 of file colourspacebuffer.h.

template<class T , class From >
CVD::VideoBuffer<From>& CVD::ColourspaceBuffer< T, From >::m_vidbuf [private]

Definition at line 89 of file colourspacebuffer.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:50 2013