Ocean
|
This class is the base class for all frame recorders. More...
Public Member Functions | |
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... | |
virtual bool | lockBufferToFill (Frame &recorderFrame, const bool respectFrameFrequency=true)=0 |
Locks the most recent frame and returns it so that the image data can be written to this frame. More... | |
virtual void | unlockBufferToFill ()=0 |
Unlocks the filled buffer. More... | |
Public Member Functions inherited from Ocean::Media::Recorder | |
virtual bool | isRecording () const =0 |
Returns whether this recorder is currently recording. More... | |
Type | type () const |
Returns the type of this recorder. More... | |
Protected Member Functions | |
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 Attributes | |
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... | |
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... | |
This class is the base class for all frame recorders.
|
protected |
Creats a new frame recorder.
|
overrideprotected |
Destructs a frame recorder.
|
inline |
Returns the name of the encoder used to encoder the frames.
|
virtual |
Starts the frame encoder configuration possibility.
data | Possible configuration data like gui handles. |
Reimplemented in Ocean::Media::DirectShow::DSFrameRecorder.
|
virtual |
Returns whether the selected frame encoder has a configuration possibility.
Reimplemented in Ocean::Media::DirectShow::DSFrameRecorder.
|
virtual |
Returns a list of possible frame encoders for this recorder.
Reimplemented in Ocean::Media::WIC::WICImageRecorder, Ocean::Media::WIC::WICBufferImageRecorder, Ocean::Media::OpenImageLibraries::OILImageSequenceRecorder, Ocean::Media::OpenImageLibraries::OILImageRecorder, Ocean::Media::OpenImageLibraries::OILBufferImageRecorder, Ocean::Media::MediaFoundation::MFMovieRecorder, Ocean::Media::ImageIO::IIOImageRecorder, Ocean::Media::ImageIO::IIOBufferImageRecorder, Ocean::Media::DirectShow::DSFrameRecorder, Ocean::Media::AVFoundation::AVFMovieRecorder, and Ocean::Media::Android::AMovieRecorder.
|
inline |
Returns the frame frequency of this recorder in Hz.
|
inline |
Returns the actual frame type of this recorder.
The actual frame type may be different from the preferred (requested) frametype.
|
pure virtual |
Locks the most recent frame and returns it so that the image data can be written to this frame.
Beware: Call unlockBufferToFill() once the image data is written to the frame.
recorderFrame | The resulting frame in which the image data can be copied, the frame type of this frame must not be changed |
respectFrameFrequency | Flag determining that a buffer will be returned if it is time for a new frame only |
Implemented in Ocean::Media::WIC::WICImageRecorder, Ocean::Media::WIC::WICBufferImageRecorder, Ocean::Media::OpenImageLibraries::OILImageSequenceRecorder, Ocean::Media::OpenImageLibraries::OILImageRecorder, Ocean::Media::OpenImageLibraries::OILBufferImageRecorder, Ocean::Media::MediaFoundation::MFMovieRecorder, Ocean::Media::ImageRecorder, Ocean::Media::ImageIO::IIOImageRecorder, Ocean::Media::ImageIO::IIOBufferImageRecorder, Ocean::Media::DirectShow::DSFrameRecorder, Ocean::Media::BufferImageRecorder, Ocean::Media::AVFoundation::AVFMovieRecorder, and Ocean::Media::Android::AMovieRecorder.
|
virtual |
Sets the frame encoder used to encode the frames.
encoder | Name of the encoder to use |
Reimplemented in Ocean::Media::DirectShow::DSFrameRecorder.
|
virtual |
Sets the frame frequency of this recorder.
frequency | Frame frequency in Hz |
Reimplemented in Ocean::Media::DirectShow::DSFrameRecorder.
|
virtual |
Sets the preferred frame type of this recorder.
The recorder may not support the specific pixel format, therefore check the actual pixel format of the recorder.
type | The preferred frame type to record |
Reimplemented in Ocean::Media::MediaFoundation::MFMovieRecorder, Ocean::Media::DirectShow::DSFrameRecorder, and Ocean::Media::Android::AMovieRecorder.
|
pure virtual |
Unlocks the filled buffer.
Beware: The buffer has to be locked by FrameRecorder::lockBufferToFill() before.
Implemented in Ocean::Media::WIC::WICImageRecorder, Ocean::Media::WIC::WICBufferImageRecorder, Ocean::Media::OpenImageLibraries::OILImageSequenceRecorder, Ocean::Media::OpenImageLibraries::OILImageRecorder, Ocean::Media::OpenImageLibraries::OILBufferImageRecorder, Ocean::Media::MediaFoundation::MFMovieRecorder, Ocean::Media::ImageRecorder, Ocean::Media::ImageIO::IIOImageRecorder, Ocean::Media::ImageIO::IIOBufferImageRecorder, Ocean::Media::DirectShow::DSFrameRecorder, Ocean::Media::BufferImageRecorder, Ocean::Media::AVFoundation::AVFMovieRecorder, and Ocean::Media::Android::AMovieRecorder.
|
protected |
Name of the frame encoder used to encode the frames.
|
protected |
Frame frequency used by the recorder.
|
protected |
Type of the frame to record.