GIFT-Grab  1708
Copyright (c) 2015-7, University College London (UCL)
gg::IVideoTarget Class Referenceabstract

This abstract class provides the API to be implemented by classes that provide functionality to save streamed video e.g. to files. More...

#include <ivideotarget.h>

Inheritance diagram for gg::IVideoTarget:
gg::IObserver

Public Member Functions

virtual ~IVideoTarget ()
 Destructor, doing nothing. More...
 
virtual void append (const VideoFrame &frame)=0
 Append frame to output. More...
 
void update (VideoFrame &frame) override
 
- Public Member Functions inherited from gg::IObserver
virtual ~IObserver ()
 

Protected Member Functions

 IVideoTarget ()
 Default constructor that should never be called publicly. More...
 
virtual void init (const std::string filepath, const float framerate)=0
 Initialise a file writer. More...
 
virtual void finalise ()=0
 Finalise writer, e.g. close file. More...
 
virtual void check_filetype_support (const std::string filepath, const std::string filetype)
 Directly throw a VideoTargetError if specified filepath is not of required filetype. More...
 
 DISALLOW_COPY_AND_ASSIGNMENT (IVideoTarget)
 

Detailed Description

This abstract class provides the API to be implemented by classes that provide functionality to save streamed video e.g. to files.

Constructor & Destructor Documentation

§ IVideoTarget()

gg::IVideoTarget::IVideoTarget ( )
inlineprotected

Default constructor that should never be called publicly.

§ ~IVideoTarget()

virtual gg::IVideoTarget::~IVideoTarget ( )
inlinevirtual

Destructor, doing nothing.

Member Function Documentation

§ append()

virtual void gg::IVideoTarget::append ( const VideoFrame frame)
pure virtual

Append frame to output.

Parameters
framethe caller is responsible for making sure the colour space of frame matches that of this object
Exceptions
VideoTargetErrorwith a detailed error message if frame cannot be appended to output for some reason, including a mismatch between the colour space of frame and that of this object expects

§ check_filetype_support()

virtual void gg::IVideoTarget::check_filetype_support ( const std::string  filepath,
const std::string  filetype 
)
inlineprotectedvirtual

Directly throw a VideoTargetError if specified filepath is not of required filetype.

Parameters
filepath
filetype
Exceptions
VideoTargetErrorwith a detailed message if specified filepath is not of required filetype

§ DISALLOW_COPY_AND_ASSIGNMENT()

gg::IVideoTarget::DISALLOW_COPY_AND_ASSIGNMENT ( IVideoTarget  )
protected

§ finalise()

virtual void gg::IVideoTarget::finalise ( )
protectedpure virtual

Finalise writer, e.g. close file.

Exceptions
VideoTargetErrorif writer cannot be finalised, e.g. for IO reasons

§ init()

virtual void gg::IVideoTarget::init ( const std::string  filepath,
const float  framerate 
)
protectedpure virtual

Initialise a file writer.

Parameters
filepath
frameratehow many frames per second
Exceptions
VideoTargetErrorif writer cannot be initialised, e.g. for IO reasons

§ update()

void gg::IVideoTarget::update ( VideoFrame frame)
inlineoverridevirtual
Parameters
frame

Implements gg::IObserver.


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