|
bool | saveImage (const Frame &frame, const std::string &filename) override |
| Saves a given frame as file.
|
|
Encoders | frameEncoders () const override |
| Returns a list of possible frame encoders for this recorder.
|
|
bool | lockBufferToFill (Frame &recorderFrame, const bool respectFrameFrequency=true) override |
| Locks the most recent frame and returns it so that the image data can be written to this frame.
|
|
void | unlockBufferToFill () override |
| Unlocks the filled buffer.
|
|
bool | start () override |
| Saves an image the next time a requested framebuffer is filled with valid image data.
|
|
bool | stop () override |
| Stops the recorder, this functions is unused for image recorders.
|
|
bool | isRecording () const override |
| Returns whether this recorder will save an image the next time a framebuffer is requested.
|
|
const FrameType & | frameType () const |
| Returns the actual frame type of this recorder.
|
|
double | frameFrequency () const |
| Returns the frame frequency of this recorder in Hz.
|
|
const std::string & | frameEncoder () const |
| Returns the name of the encoder used to encoder the frames.
|
|
virtual bool | frameEncoderHasConfiguration () |
| Returns whether the selected frame encoder has a configuration possibility.
|
|
virtual bool | setPreferredFrameType (const FrameType &type) |
| Sets the preferred frame type of this recorder.
|
|
virtual bool | setFrameFrequency (const double frequency) |
| Sets the frame frequency of this recorder.
|
|
virtual bool | setFrameEncoder (const std::string &encoder) |
| Sets the frame encoder used to encode the frames.
|
|
virtual bool | frameEncoderConfiguration (long long data) |
| Starts the frame encoder configuration possibility.
|
|
Type | type () const |
| Returns the type of this recorder.
|
|
const std::string & | filename () const |
| Returns the filename of this recorder.
|
|
bool | filenameSuffixed () const |
| Returns whether the filename of this recorder will be suffixed with date and time.
|
|
virtual bool | setFilename (const std::string &filename) |
| Sets the filename of this recorder.
|
|
virtual bool | setFilenameSuffixed (const bool suffixed) |
| Sets whether the filename will be suffixed with date and time.
|
|
|
enum | Type {
RECORDER = 0
, FRAME_RECORDER = 1
, SOUND_RECORDER = 2
, EXPLICIT_RECORDER = 4
,
IMPLICIT_RECORDER = 8
, FILE_RECORDER = 16 | EXPLICIT_RECORDER
, BUFFER_RECORDER = 32 | EXPLICIT_RECORDER
, STREAMING_RECORDER = 64 | IMPLICIT_RECORDER
,
MOVIE_RECORDER = 128 | FRAME_RECORDER | FILE_RECORDER
, FRAME_STREAMING_RECORDER = 256 | FRAME_RECORDER | STREAMING_RECORDER
, IMAGE_RECORDER = 512 | FRAME_RECORDER | FILE_RECORDER
, BUFFER_IMAGE_RECORDER = 1024 | FRAME_RECORDER | BUFFER_RECORDER
,
IMAGE_SEQUENCE_RECORDER = 2048 | FRAME_RECORDER | FILE_RECORDER
, FRAME_MEMORY_RECORDER = 4096 | FRAME_RECORDER
} |
| Definition of different recorder types. More...
|
|
typedef std::vector< std::string > | Encoders |
| Definition of a vector holding encoder names.
|
|
static FrameType::PixelFormat | translatePixelFormat (const WICPixelFormatGUID &format, FrameType::PixelOrigin *pixelOrigin=nullptr) |
| Translates a pixel format from Windows Imaging Component to a framework pixel format.
|
|
static WICPixelFormatGUID | matchingPixelFormat (const FrameType::PixelFormat format, FrameType::PixelFormat &adjustedFormat, const std::vector< GUID > &supportedPixelFormats=std::vector< GUID >()) |
| Determines the best matching Windows Imaging Component pixel format for a given Ocean pixel format.
|
|
static bool | hasAlphaChannel (IWICImagingFactory *imagingFactory, IWICBitmapDecoder *bitmapDecoder, IWICBitmapFrameDecode *frameDecode) |
| Returns whether a Windows Imaging Component pixel format has an alpha channel.
|
|
static GUID | findContainerFormat (const std::string &fileExtension) |
| Finds the corresponding container format for a specified file extension.
|
|
static std::string | translateContainerFormat (const GUID &containerFormat) |
| Translates a container format to the corresponding file extension.
|
|
static Frame | loadFrameFromBitmapDecoder (IWICImagingFactory *imagingFactory, IWICBitmapDecoder *bitmapDecoder) |
| Loads a frame from a bitmap decoder object.
|
|
static bool | writeFrameToBitmapDecoder (IWICImagingFactory *imagingFactory, IWICBitmapEncoder *bitmapEncoder, const Frame &frame, const bool allowConversion=true, bool *hasBeenConverted=nullptr) |
| Writes a frame to a bitmap encoder object.
|
|
static std::string | addOptionalSuffixToFilename (const std::string &filename, const bool addSuffix) |
| Determines the filename to be used for the next file.
|
|
static std::string | addOptionalSuffixToFilename (const std::string &filename, const unsigned int index, const bool addSuffix) |
| Determines the filename to be used for the next file.
|
|
This class implements an image recorder for WIC.
This recorder can be used to save images to files.