Ocean
Ocean::Media::FileRecorder Class Reference

This class is the base class for all file recorders. More...

Inheritance diagram for Ocean::Media::FileRecorder:

Public Member Functions

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...
 
- Public Member Functions inherited from Ocean::Media::ExplicitRecorder
virtual bool start ()=0
 Sets the recorder. More...
 
virtual bool stop ()=0
 Stops the recorder. 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...
 

Static Public Member Functions

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...
 

Protected Member Functions

 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 Member Functions inherited from Ocean::Media::Recorder
 Recorder ()
 Creates a new recorder. More...
 
virtual ~Recorder ()
 Destructs a recorder. More...
 

Protected Attributes

std::string recorderFilename
 Filename of this recorder. More...
 
bool recorderFilenameSuffixed
 Flag determining whether the filename will be suffixed with date and time. 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...
 

Detailed Description

This class is the base class for all file recorders.

Constructor & Destructor Documentation

◆ FileRecorder()

Ocean::Media::FileRecorder::FileRecorder ( )
protected

Creates a new file recorder.

◆ ~FileRecorder()

Ocean::Media::FileRecorder::~FileRecorder ( )
overrideprotected

Destructs a file recorder.

Member Function Documentation

◆ addOptionalSuffixToFilename() [1/2]

static std::string Ocean::Media::FileRecorder::addOptionalSuffixToFilename ( const std::string &  filename,
const bool  addSuffix 
)
static

Determines the filename to be used for the next file.

Parameters
filenameInitial name of the file, must be valid
addSuffixTrue, to add a date/time-based suffix to the filename
Returns
The filename to be used

◆ addOptionalSuffixToFilename() [2/2]

static std::string Ocean::Media::FileRecorder::addOptionalSuffixToFilename ( const std::string &  filename,
const unsigned int  index,
const bool  addSuffix 
)
static

Determines the filename to be used for the next file.

Parameters
filenameInitial name of the file, must be valid
indexThe index of the file, with range [0, infinity)
addSuffixTrue, to add a date/time-based suffix to the filename
Returns
The filename to be used

◆ filename()

const std::string & Ocean::Media::FileRecorder::filename ( ) const
inline

Returns the filename of this recorder.

Returns
Recorder filename
See also
setFilename().

◆ filenameSuffixed()

bool Ocean::Media::FileRecorder::filenameSuffixed ( ) const
inline

Returns whether the filename of this recorder will be suffixed with date and time.

The default value is True.

Returns
True, if so
See also
setFilenameSuffixed().

◆ setFilename()

virtual bool Ocean::Media::FileRecorder::setFilename ( const std::string &  filename)
virtual

Sets the filename of this recorder.

Parameters
filenameFilename to set
Returns
True, if succeeded
See also
filename().

Reimplemented in Ocean::Media::MediaFoundation::MFMovieRecorder, Ocean::Media::DirectShow::DSFileRecorder, Ocean::Media::AVFoundation::AVFMovieRecorder, and Ocean::Media::Android::AMovieRecorder.

◆ setFilenameSuffixed()

virtual bool Ocean::Media::FileRecorder::setFilenameSuffixed ( const bool  suffixed)
virtual

Sets whether the filename will be suffixed with date and time.

Parameters
suffixedDetermines whether the filename will be suffixed
Returns
True, if succeeded
See also
filenameSuffixed().

Field Documentation

◆ recorderFilename

std::string Ocean::Media::FileRecorder::recorderFilename
protected

Filename of this recorder.

◆ recorderFilenameSuffixed

bool Ocean::Media::FileRecorder::recorderFilenameSuffixed
protected

Flag determining whether the filename will be suffixed with date and time.


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