Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::CSeqFileWriter Class Reference

Detailed Description

Provides methods for writing frames into a sequence in a rays file.

Inherits Rx::LFR::CPimpl< CSeqFileWriter_Impl, Interfaces::ESeqFileWriter::ID >.

Public Member Functions

 CSeqFileWriter ()
 Default constructor. More...
 
 CSeqFileWriter (CSeqFileWriter &&xSeqFileWriter)
 Move constructor. More...
 
 ~CSeqFileWriter ()
 Destructor. Closes the opened file. More...
 
unsigned Close ()
 Closes the opened sequence file and stops the background buffer thread. More...
 
unsigned GetDoubleShotMode () const
 Gets the double shot mode that has been passed in StartWriting. More...
 
uint64_t GetFileSize () const
 Gets the current file size in bytes. More...
 
unsigned GetFrameCount () const
 Gets the current number of frames in the opened sequence. More...
 
const CRxImageFormatGetFrameFormat () const
 Gets the frame format that has been passed in StartWriting. More...
 
unsigned GetFrameSize () const
 Gets the size of a frame in bytes. More...
 
CSeqFileWriter_Impl & GetImpl ()
 Gets the non constant implementation. More...
 
const CSeqFileWriter_Impl & GetImpl () const
 Gets the constant implementation. More...
 
void * GetInterface (Interfaces::ESeqFileWriter::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const void * GetInterface (Interfaces::ESeqFileWriter::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
TInterface * GetInterface (Interfaces::ESeqFileWriter::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const TInterface * GetInterface (Interfaces::ESeqFileWriter::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
unsigned GetUsedFrameBufferCount ()
 Gets the current number of used buffer slots. More...
 
bool HasInterface (Interfaces::ESeqFileWriter::ID eInterface)
 Queries if this object has the given interface. More...
 
bool IsOpen () const
 Queries if a file has been opened. More...
 
bool IsWriting () const
 Queries if StartWriting has been called. More...
 
void Open (const CRxString &sxFilename, unsigned uFrameBufferCount=2)
 Opens the given ray sequence for writing. More...
 
CSeqFileWriteroperator= (CSeqFileWriter &&xSeqFileWriter)
 Move assignment operator. More...
 
void StartWriting (const CRxImageFormat &xFrameFormat, const CCalibration &xCalib, CRxMetaData &xMeta, unsigned uDoubleShotMode)
 Starts the write process. This starts the background buffer thread. More...
 
void WriteFrame (const CRxImage &xFrame)
 Writes the given frame at the current frame index. More...
 

Constructor & Destructor Documentation

Rx::LFR::CSeqFileWriter::CSeqFileWriter ( )

Default constructor.

Rx::LFR::CSeqFileWriter::CSeqFileWriter ( CSeqFileWriter &&  xSeqFileWriter)

Move constructor.

Parameters
xSeqFileWriter[in,out]The sequence file writer instance.
Rx::LFR::CSeqFileWriter::~CSeqFileWriter ( )

Destructor. Closes the opened file.

Member Function Documentation

unsigned Rx::LFR::CSeqFileWriter::Close ( )

Closes the opened sequence file and stops the background buffer thread.

Returns
The number of frames written.
unsigned Rx::LFR::CSeqFileWriter::GetDoubleShotMode ( ) const

Gets the double shot mode that has been passed in StartWriting.

Returns
The double shot mode.
uint64_t Rx::LFR::CSeqFileWriter::GetFileSize ( ) const

Gets the current file size in bytes.

Returns
The file size.
unsigned Rx::LFR::CSeqFileWriter::GetFrameCount ( ) const

Gets the current number of frames in the opened sequence.

Returns
The frame count.
const CRxImageFormat& Rx::LFR::CSeqFileWriter::GetFrameFormat ( ) const

Gets the frame format that has been passed in StartWriting.

Returns
The frame format.
unsigned Rx::LFR::CSeqFileWriter::GetFrameSize ( ) const

Gets the size of a frame in bytes.

Returns
The frame size.
CSeqFileWriter_Impl & Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetImpl ( )
inlineinherited

Gets the non constant implementation.

Returns
The implementation.
const CSeqFileWriter_Impl & Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetImpl ( ) const
inlineinherited

Gets the constant implementation.

Returns
The implementation.
void* Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetInterface ( Interfaces::ESeqFileWriter::ID  eInterface)
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
const void* Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetInterface ( Interfaces::ESeqFileWriter::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
TInterface* Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetInterface ( Interfaces::ESeqFileWriter::ID  eInterface)
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterfaceThe interface type.
Parameters
eInterfaceThe interface.
Returns
Null if it fails, else the interface.
const TInterface* Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::GetInterface ( Interfaces::ESeqFileWriter::ID  eInterface) const
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterfaceThe interface type.
Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
unsigned Rx::LFR::CSeqFileWriter::GetUsedFrameBufferCount ( )

Gets the current number of used buffer slots.

Returns
The used frame buffer count.
bool Rx::LFR::CPimpl< CSeqFileWriter_Impl , Interfaces::ESeqFileWriter::ID >::HasInterface ( Interfaces::ESeqFileWriter::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterfaceThe interface to query.
Returns
True if this class has the given interface, false if not.
bool Rx::LFR::CSeqFileWriter::IsOpen ( ) const

Queries if a file has been opened.

Returns
True if open, false if not.
bool Rx::LFR::CSeqFileWriter::IsWriting ( ) const

Queries if StartWriting has been called.

Returns
True if writing, false if not.
void Rx::LFR::CSeqFileWriter::Open ( const CRxString sxFilename,
unsigned  uFrameBufferCount = 2 
)

Opens the given ray sequence for writing.

Requires an authenticated dongle (Rx::LFR::CLightFieldRuntime::Authenticate) with the Rx::Dongle::ERuntimeFeature::Save feature.

Parameters
sxFilenameThe file name.
uFrameBufferCount(Optional) Number of frames to buffer. Must NOT be zero.
CSeqFileWriter& Rx::LFR::CSeqFileWriter::operator= ( CSeqFileWriter &&  xSeqFileWriter)

Move assignment operator.

Parameters
xSeqFileWriter[in,out]The sequence file writer instance.
Returns
The instance.
void Rx::LFR::CSeqFileWriter::StartWriting ( const CRxImageFormat xFrameFormat,
const CCalibration xCalib,
CRxMetaData xMeta,
unsigned  uDoubleShotMode 
)

Starts the write process. This starts the background buffer thread.

Parameters
xFrameFormatThe frame format.
xCalibThe calibration.
xMeta[in,out] The meta data.
uDoubleShotModeThe double shot mode.
void Rx::LFR::CSeqFileWriter::WriteFrame ( const CRxImage xFrame)

Writes the given frame at the current frame index.

Parameters
xFrameThe frame.