Ocean
|
This class is the base class for all image recorders. More...
Public Member Functions | |
virtual bool | saveImage (const Frame &frame, const std::string &filename)=0 |
Saves a given frame as file explicity. More... | |
bool | start () override |
Saves an image the next time a requested framebuffer is filled with valid image data. More... | |
bool | stop () override |
Stops the recorder, this functions is unused for image recorders. More... | |
bool | isRecording () const override |
Returns whether this recorder will save an image the next time a framebuffer is requested. More... | |
bool | lockBufferToFill (Frame &recorderFrame, const bool respectFrameFrequency=true) override |
Returns a pointer to a framebuffer to be filled if a image save task has been requested before. More... | |
void | unlockBufferToFill () override |
Unlocks the filled buffer. More... | |
Public Member Functions inherited from Ocean::Media::FrameRecorder | |
const FrameType & | frameType () const |
Returns the actual frame type of this recorder. More... | |
double | frameFrequency () const |
Returns the frame frequency of this recorder in Hz. More... | |
const std::string & | frameEncoder () const |
Returns the name of the encoder used to encoder the frames. More... | |
virtual Encoders | frameEncoders () const |
Returns a list of possible frame encoders for this recorder. More... | |
virtual bool | frameEncoderHasConfiguration () |
Returns whether the selected frame encoder has a configuration possibility. More... | |
virtual bool | setPreferredFrameType (const FrameType &type) |
Sets the preferred frame type of this recorder. More... | |
virtual bool | setFrameFrequency (const double frequency) |
Sets the frame frequency of this recorder. More... | |
virtual bool | setFrameEncoder (const std::string &encoder) |
Sets the frame encoder used to encode the frames. More... | |
virtual bool | frameEncoderConfiguration (long long data) |
Starts the frame encoder configuration possibility. More... | |
Public Member Functions inherited from Ocean::Media::Recorder | |
Type | type () const |
Returns the type of this recorder. More... | |
Public Member Functions inherited from Ocean::Media::FileRecorder | |
const std::string & | filename () const |
Returns the filename of this recorder. More... | |
bool | filenameSuffixed () const |
Returns whether the filename of this recorder will be suffixed with date and time. More... | |
virtual bool | setFilename (const std::string &filename) |
Sets the filename of this recorder. More... | |
virtual bool | setFilenameSuffixed (const bool suffixed) |
Sets whether the filename will be suffixed with date and time. More... | |
Protected Member Functions | |
ImageRecorder () | |
Creates a new image recorder object. More... | |
~ImageRecorder () override | |
Destructs an image recorder object. More... | |
Protected Member Functions inherited from Ocean::Media::FrameRecorder | |
FrameRecorder () | |
Creats a new frame recorder. More... | |
~FrameRecorder () override | |
Destructs a frame recorder. More... | |
Protected Member Functions inherited from Ocean::Media::Recorder | |
Recorder () | |
Creates a new recorder. More... | |
virtual | ~Recorder () |
Destructs a recorder. More... | |
Protected Member Functions inherited from Ocean::Media::FileRecorder | |
FileRecorder () | |
Creates a new file recorder. More... | |
~FileRecorder () override | |
Destructs a file recorder. More... | |
Protected Member Functions inherited from Ocean::Media::ExplicitRecorder | |
ExplicitRecorder () | |
Creates a new explicit recorder. More... | |
~ExplicitRecorder () override | |
Destructs a explicit recorder. More... | |
Protected Attributes | |
bool | recorderSaveImage |
State determining whether the file recorder is asked to save a new image. More... | |
Protected Attributes inherited from Ocean::Media::FrameRecorder | |
FrameType | recorderFrameType |
Type of the frame to record. More... | |
double | recorderFrameFrequency |
Frame frequency used by the recorder. More... | |
std::string | recorderFrameEncoder |
Name of the frame encoder used to encode the frames. More... | |
Protected Attributes inherited from Ocean::Media::Recorder | |
Type | recorderType |
Type of this recorder. More... | |
Lock | recorderLock |
Lock of this recorder. More... | |
Protected Attributes inherited from Ocean::Media::FileRecorder | |
std::string | recorderFilename |
Filename of this recorder. More... | |
bool | recorderFilenameSuffixed |
Flag determining whether the filename will be suffixed with date and time. More... | |
Additional Inherited Members | |
Public Types inherited from Ocean::Media::Recorder | |
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. More... | |
Static Public Member Functions inherited from Ocean::Media::FileRecorder | |
static std::string | addOptionalSuffixToFilename (const std::string &filename, const bool addSuffix) |
Determines the filename to be used for the next file. More... | |
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. More... | |
This class is the base class for all image recorders.
An image recorder can save simple image files.
The recorder supports two different save modes: An explicit mode and an implicit one.
The explicit mode takes a frame and a filename and saves the image directly.
Use the saveImage() function for the explicit mode.
The implicit mode provides an internal buffer to be filled. After the internal buffer is filled the image file is saved.
Use the lockBufferToFill() and unlockBufferToFill() functions for the implicit mode.
|
protected |
Creates a new image recorder object.
|
overrideprotected |
Destructs an image recorder object.
|
overridevirtual |
Returns whether this recorder will save an image the next time a framebuffer is requested.
Implements Ocean::Media::Recorder.
|
overridevirtual |
Returns a pointer to a framebuffer to be filled if a image save task has been requested before.
Implements Ocean::Media::FrameRecorder.
Reimplemented in Ocean::Media::WIC::WICImageRecorder, and Ocean::Media::OpenImageLibraries::OILImageRecorder.
|
pure virtual |
Saves a given frame as file explicity.
frame | The frame to be saved |
filename | Name of the resulting image file |
Implemented in Ocean::Media::WIC::WICImageRecorder, Ocean::Media::OpenImageLibraries::OILImageRecorder, and Ocean::Media::ImageIO::IIOImageRecorder.
|
overridevirtual |
Saves an image the next time a requested framebuffer is filled with valid image data.
Implements Ocean::Media::ExplicitRecorder.
|
overridevirtual |
Stops the recorder, this functions is unused for image recorders.
Implements Ocean::Media::ExplicitRecorder.
|
overridevirtual |
Unlocks the filled buffer.
Implements Ocean::Media::FrameRecorder.
Reimplemented in Ocean::Media::WIC::WICImageRecorder, and Ocean::Media::OpenImageLibraries::OILImageRecorder.
|
protected |
State determining whether the file recorder is asked to save a new image.