libcvd
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CVD::VideoFrame< T > Class Template Reference

A frame from a VideoBuffer. More...

#include <videoframe.h>

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

Public Member Functions

 VideoFrame (double t, T *data, const ImageRef &size, VideoFrameFlags::FieldType f=VideoFrameFlags::Unknown)
 (Used internally) Construct a VideoFrame around a block of memory. More...
 
 VideoFrame (double t, const BasicImage< T > &im, VideoFrameFlags::FieldType f=VideoFrameFlags::Unknown)
 (Used internally) Construct a VideoFrame from a BasicImage More...
 
double timestamp () const
 What is the time (since boot) of this frame?
 
VideoFrameFlags::FieldType field () const
 
- Public Member Functions inherited from CVD::BasicImage< T >
virtual ~BasicImage ()
 The image data is not destroyed when a BasicImage is destroyed.
 
ConstPointerType data () const
 Returns the raw image data.
 
PointerType data ()
 Returns the raw image data.
 
void copy_from (const BasicImage< T > &other)
 
ImageRef size () const
 What is the size of this image?
 
void zero ()
 Set image data to all zero bytes. More...
 
void fill (const T d)
 Set all the pixels in the image to a value. More...
 
 BasicImage (const BasicImage &copyof)=default
 Copy constructor. More...
 
BasicImageoperator= (const BasicImage &copyof)=default
 Assignment operator. More...
 
- Public Member Functions inherited from CVD::Internal::ImageData< T >
 ImageData (const ImageData &)=default
 
 ImageData (void *data, size_t len, ImageRef sz)
 
 ImageData (void *data, ImageRef sz)
 
ImageDataoperator= (const ImageData &)=default
 
size_t datalength () const
 What is the row stride of the image?
 

Protected Member Functions

virtual ~VideoFrame ()
 We don't usually delete video frames. Some special destruction is usually needed.
 

Protected Attributes

VideoFrameFlags::FieldType my_field
 
double my_timestamp
 Type of field in this frame. More...
 
- Protected Attributes inherited from CVD::Internal::ImageData< T >
void * my_data
 
ImageRef my_size
 
size_t data_length
 

Additional Inherited Members

- Protected Types inherited from CVD::Internal::ImageData< T >
using PointerType = void *
 
using ConstPointerType = const void *
 

Detailed Description

template<class T>
class CVD::VideoFrame< T >

A frame from a VideoBuffer.

Parameters
TThe pixel type of the video frames

Constructor & Destructor Documentation

◆ VideoFrame() [1/2]

template<class T>
CVD::VideoFrame< T >::VideoFrame ( double  t,
T *  data,
const ImageRef size,
VideoFrameFlags::FieldType  f = VideoFrameFlags::Unknown 
)
inline

(Used internally) Construct a VideoFrame around a block of memory.

The memory is not managed by the VideoFrame so must me managed seperately

Parameters
tThe time (in seconds) of this frame
dataThe image data for this frame
sizeThe size of this video frame

◆ VideoFrame() [2/2]

template<class T>
CVD::VideoFrame< T >::VideoFrame ( double  t,
const BasicImage< T > &  im,
VideoFrameFlags::FieldType  f = VideoFrameFlags::Unknown 
)
inline

(Used internally) Construct a VideoFrame from a BasicImage

Parameters
tThe time (in seconds) of this frame
imThe image data for this frame. BasicImages do not manage their own memory, so this must be managed externally

Member Data Documentation

◆ my_timestamp

template<class T>
double CVD::VideoFrame< T >::my_timestamp
protected

Type of field in this frame.

No of seconds since boot of this frame


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