This class implements the factory design pattern for creating video targets, for instance for encoding video streams to files.
More...
#include <videotargetfactory.h>
This class implements the factory design pattern for creating video targets, for instance for encoding video streams to files.
The creation functions follow the "Resource
Acquisition Is Initialisation" (RAII) principle.
- See also
- IVideoTarget
§ VideoTargetFactory()
gg::VideoTargetFactory::VideoTargetFactory |
( |
| ) |
|
|
protected |
The constructor should never be publicly called.
- See also
- get_instance
§ ~VideoTargetFactory()
gg::VideoTargetFactory::~VideoTargetFactory |
( |
| ) |
|
|
virtual |
§ create_file_writer()
IVideoTarget * gg::VideoTargetFactory::create_file_writer |
( |
enum Codec |
codec, |
|
|
const std::string |
filename, |
|
|
const float |
frame_rate |
|
) |
| |
Create specified video saving target.
- Parameters
-
codec | |
filename | RAII on this filename if target is created successfully |
frame_rate | the resulting file writer will use this frame rate |
- Returns
- pointer to created video saving target. It is the caller's responsibility to properly garbage-collect this pointer, i.e. its owner is the caller.
- Exceptions
-
VideoTargetError | with a detailed error message if creation of video target with specified type fails for some reason, most notably wrong file extension or invalid frame_rate |
§ DISALLOW_COPY_AND_ASSIGNMENT()
§ get_instance()
Get reference to singleton instance of this class.
- Returns
The documentation for this class was generated from the following files: