OPAL  Version 3.10.4
OpalRecordManager Class Reference

#include <recording.h>

Data Structures

struct  Options

Public Types

enum  VideoMode {
  eSideBySideLetterbox, eSideBySideScaled, eStackedPillarbox, eStackedScaled,
  eSeparateStreams, NumVideoMixingModes
}
typedef PFactory
< OpalRecordManager,
PCaselessString > 
Factory

Public Member Functions

virtual ~OpalRecordManager ()
bool Open (const PFilePath &fn)
bool Open (const PFilePath &fn, bool mono)
bool Open (const PFilePath &fn, const Options &options)
virtual bool IsOpen () const =0
virtual bool Close ()=0
virtual bool OpenStream (const PString &strmId, const OpalMediaFormat &format)=0
virtual bool CloseStream (const PString &strmId)=0
virtual bool WriteAudio (const PString &strmId, const RTP_DataFrame &rtp)=0
virtual bool WriteVideo (const PString &strmId, const RTP_DataFrame &rtp)=0
const OptionsGetOptions () const
void SetOptions (const Options &options)

Protected Member Functions

virtual bool OpenFile (const PFilePath &fn)=0

Protected Attributes

Options m_options

Detailed Description

This is an abstract class for recording OPAL calls. A factory is used to created concrete classes based on the file extension supported by the individual record manager.


Member Typedef Documentation

typedef PFactory<OpalRecordManager, PCaselessString> OpalRecordManager::Factory

Member Enumeration Documentation

Enumerator:
eSideBySideLetterbox 

Two images side by side with black bars top and bottom. It is expected that the input frames and output are all the same aspect ratio, e.g. 4:3. Works well if inputs are QCIF and output is CIF for example.

eSideBySideScaled 

Two images side by side, scaled to fit halves of output frame. It is expected that the output frame be double the width of the input data to maintain aspect ratio. e.g. for CIF inputs, output would be 704x288.

eStackedPillarbox 

Two images, one on top of the other with black bars down the sides. It is expected that the input frames and output are all the same aspect ratio, e.g. 4:3. Works well if inputs are QCIF and output is CIF for example.

eStackedScaled 

Two images, one on top of the other, scaled to fit halves of output frame. It is expected that the output frame be double the height of the input data to maintain aspect ratio. e.g. for CIF inputs, output would be 352x576.

eSeparateStreams 

Unsupported.

NumVideoMixingModes 

Constructor & Destructor Documentation

virtual OpalRecordManager::~OpalRecordManager ( ) [inline, virtual]

Member Function Documentation

virtual bool OpalRecordManager::Close ( ) [pure virtual]

Close the recording file. Note this may block until various sub-threads are termianted so care may be needed to avoid deadlocks.

virtual bool OpalRecordManager::CloseStream ( const PString &  strmId) [pure virtual]

Close the media stream based on the identifier provided.

Parameters:
strmIdIdentifier for media stream.
const Options& OpalRecordManager::GetOptions ( ) const [inline]

Get the options for this recording.

References m_options.

virtual bool OpalRecordManager::IsOpen ( ) const [pure virtual]

Indicate if the recording file is open.

bool OpalRecordManager::Open ( const PFilePath &  fn) [inline]

Open the recording file.

References OpenFile().

Referenced by Open().

bool OpalRecordManager::Open ( const PFilePath &  fn,
bool  mono 
) [inline]

Open the recoding file indicating audio mode.

References m_options, OpalRecordManager::Options::m_stereo, and OpenFile().

bool OpalRecordManager::Open ( const PFilePath &  fn,
const Options options 
) [inline]

Open the recording file indicating the options to be used.

References m_options, and Open().

virtual bool OpalRecordManager::OpenFile ( const PFilePath &  fn) [protected, pure virtual]

Referenced by Open().

virtual bool OpalRecordManager::OpenStream ( const PString &  strmId,
const OpalMediaFormat format 
) [pure virtual]

Open an individual media stream using the provided identifier and format.

Parameters:
strmIdIdentifier for media stream.
formatMedia format for new stream
void OpalRecordManager::SetOptions ( const Options options) [inline]

Set the options for this recording.

References m_options.

virtual bool OpalRecordManager::WriteAudio ( const PString &  strmId,
const RTP_DataFrame rtp 
) [pure virtual]

Write audio to the recording file.

Parameters:
strmIdIdentifier for media stream.
rtpRTP data containing PCM-16 data
virtual bool OpalRecordManager::WriteVideo ( const PString &  strmId,
const RTP_DataFrame rtp 
) [pure virtual]

Write video to the recording file.

Parameters:
strmIdIdentifier for media stream.
rtpRTP data containing a YUV420P frame

Field Documentation


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