OPAL  Version 3.18.8
OpalPluginFramedAudioTranscoder Class Reference

#include <opalpluginmgr.h>

Inheritance diagram for OpalPluginFramedAudioTranscoder:
Collaboration diagram for OpalPluginFramedAudioTranscoder:

Public Member Functions

 OpalPluginFramedAudioTranscoder (const OpalTranscoderKey &key, const PluginCodec_Definition *codecDefn, bool isEncoder)
 
bool UpdateMediaFormats (const OpalMediaFormat &input, const OpalMediaFormat &output)
 
PBoolean ExecuteCommand (const OpalMediaCommand &command)
 
void GetStatistics (OpalMediaStatistics &statistics) const
 
PBoolean ConvertFrame (const BYTE *input, PINDEX &consumed, BYTE *output, PINDEX &created)
 
virtual PBoolean ConvertSilentFrame (BYTE *buffer, PINDEX &created)
 
virtual bool AcceptComfortNoise () const
 
- Public Member Functions inherited from OpalFramedTranscoder
 OpalFramedTranscoder (const OpalMediaFormat &inputMediaFormat, const OpalMediaFormat &outputMediaFormat)
 
virtual PINDEX GetOptimalDataFrameSize (PBoolean input) const
 
virtual PBoolean Convert (const RTP_DataFrame &input, RTP_DataFrame &output)
 
virtual PBoolean ConvertFrame (const BYTE *input, BYTE *output)
 
- Public Member Functions inherited from OpalTranscoder
 OpalTranscoder (const OpalMediaFormat &inputMediaFormat, const OpalMediaFormat &outputMediaFormat)
 
virtual PBoolean ConvertFrames (const RTP_DataFrame &input, RTP_DataFrameList &output)
 
PINDEX GetMaxOutputSize () const
 
void SetMaxOutputSize (PINDEX size)
 
void SetCommandNotifier (const PNotifier &notifier)
 
const PNotifier & GetCommandNotifier () const
 
void NotifyCommand (const OpalMediaCommand &command) const
 Notify command notifier of command. More...
 
unsigned GetSessionID () const
 Get session ID for the transcoder (from OpalMediaStream) More...
 
void SetSessionID (unsigned id)
 Set session ID for the transcoder (from OpalMediaStream) More...
 
RTP_DataFrame::PayloadTypes GetPayloadType (PBoolean input) const
 
virtual bool AcceptEmptyPayload () const
 
virtual bool AcceptOtherPayloads () const
 
void CopyTimestamp (RTP_DataFrame &dst, const RTP_DataFrame &src, bool inToOut) const
 
- Public Member Functions inherited from OpalMediaFormatPair
 OpalMediaFormatPair (const OpalMediaFormat &inputMediaFormat, const OpalMediaFormat &outputMediaFormat)
 
void PrintOn (ostream &strm) const
 
virtual Comparison Compare (const PObject &obj) const
 
const OpalMediaFormatGetInputFormat () const
 
const OpalMediaFormatGetOutputFormat () const
 
- Public Member Functions inherited from OpalPluginTranscoder
 OpalPluginTranscoder (const PluginCodec_Definition *defn, bool isEnc)
 
 ~OpalPluginTranscoder ()
 
bool UpdateOptions (OpalMediaFormat &fmt)
 
bool ExecuteCommand (const OpalMediaCommand &command)
 
bool Transcode (const void *from, unsigned *fromLen, void *to, unsigned *toLen, unsigned *flags) const
 

Protected Member Functions

virtual bool OnCreated (const OpalMediaFormat &srcFormat, const OpalMediaFormat &destFormat, const BYTE *instance, unsigned instanceLen)
 
- Protected Member Functions inherited from OpalFramedTranscoder
void CalculateSizes ()
 
- Protected Member Functions inherited from OpalTranscoder
 PDECLARE_MUTEX (updateMutex)
 
- Protected Member Functions inherited from OpalPluginTranscoder
bool CreateContext ()
 
bool SetCodecOption (const PString &optionName, const PString &optionValue)
 

Protected Attributes

bool comfortNoise
 
- Protected Attributes inherited from OpalFramedTranscoder
PINDEX inputBytesPerFrame
 
PINDEX outputBytesPerFrame
 
PINDEX maxOutputDataSize
 
enum OpalFramedTranscoder:: { ... }  m_emptyPayloadState
 
RTP_Timestamp m_lastEmptyPayloadTimestamp
 
- Protected Attributes inherited from OpalTranscoder
PINDEX maxOutputSize
 
PNotifier commandNotifier
 
unsigned m_sessionID
 
bool outputIsRTP
 
bool inputIsRTP
 
bool acceptEmptyPayload
 
bool acceptOtherPayloads
 
unsigned m_inClockRate
 
unsigned m_outClockRate
 
RTP_DataFrame::PayloadTypes m_lastPayloadType
 
unsigned m_consecutivePayloadTypeMismatches
 
- Protected Attributes inherited from OpalMediaFormatPair
OpalMediaFormat inputMediaFormat
 
OpalMediaFormat outputMediaFormat
 
- Protected Attributes inherited from OpalPluginTranscoder
const PluginCodec_DefinitioncodecDef
 
bool isEncoder
 
void * context
 
unsigned m_maxPayloadSize
 
OpalPluginControl setCodecOptionsControl
 
OpalPluginControl getActiveOptionsControl
 
OpalPluginControl freeOptionsControl
 
OpalPluginControl getOutputDataSizeControl
 
OpalPluginControl getCodecStatistics
 

Additional Inherited Members

- Static Public Member Functions inherited from OpalTranscoder
static OpalTranscoderCreate (const OpalMediaFormat &srcFormat, const OpalMediaFormat &dstFormat, const BYTE *instance=NULL, unsigned instanceLen=0)
 
static bool SelectFormats (const OpalMediaType &mediaType, const OpalMediaFormatList &srcFormats, const OpalMediaFormatList &dstFormats, const OpalMediaFormatList &masterFormats, OpalMediaFormat &srcFormat, OpalMediaFormat &dstFormat)
 
static bool FindIntermediateFormat (const OpalMediaFormat &srcFormat, const OpalMediaFormat &dstFormat, OpalMediaFormat &intermediateFormat)
 
static OpalMediaFormatList GetDestinationFormats (const OpalMediaFormat &srcFormat)
 
static OpalMediaFormatList GetSourceFormats (const OpalMediaFormat &dstFormat)
 
static OpalMediaFormatList GetPossibleFormats (const OpalMediaFormatList &formats)
 
- Protected Types inherited from OpalFramedTranscoder
enum  { AwaitingFirstNonEmptyPayload, AwaitingEmptyPayload, DelayedDecodeEmptyPayload }
 

Constructor & Destructor Documentation

OpalPluginFramedAudioTranscoder::OpalPluginFramedAudioTranscoder ( const OpalTranscoderKey key,
const PluginCodec_Definition codecDefn,
bool  isEncoder 
)

Member Function Documentation

virtual bool OpalPluginFramedAudioTranscoder::AcceptComfortNoise ( ) const
inlinevirtual

Reimplemented from OpalTranscoder.

References comfortNoise.

PBoolean OpalPluginFramedAudioTranscoder::ConvertFrame ( const BYTE *  input,
PINDEX &  consumed,
BYTE *  output,
PINDEX &  created 
)
virtual

Reimplemented from OpalFramedTranscoder.

virtual PBoolean OpalPluginFramedAudioTranscoder::ConvertSilentFrame ( BYTE *  buffer,
PINDEX &  created 
)
virtual

Reimplemented from OpalFramedTranscoder.

PBoolean OpalPluginFramedAudioTranscoder::ExecuteCommand ( const OpalMediaCommand command)
virtual

Execute the command specified to the transcoder. The commands are highly context sensitive, for example OpalVideoUpdatePicture would only apply to a video transcoder.

The default behaviour simply returns false.

Returns
true if command is handled.

Reimplemented from OpalTranscoder.

void OpalPluginFramedAudioTranscoder::GetStatistics ( OpalMediaStatistics statistics) const
virtual

Reimplemented from OpalTranscoder.

virtual bool OpalPluginFramedAudioTranscoder::OnCreated ( const OpalMediaFormat srcFormat,
const OpalMediaFormat destFormat,
const BYTE *  instance,
unsigned  instanceLen 
)
protectedvirtual

Initialise the just created transcoder

Reimplemented from OpalTranscoder.

bool OpalPluginFramedAudioTranscoder::UpdateMediaFormats ( const OpalMediaFormat inputMediaFormat,
const OpalMediaFormat outputMediaFormat 
)
virtual

Update the input and output media formats. This can be used to adjust the parameters of a codec at run time. Note you cannot change the basic media format, eg change GSM0610 to G.711, only options for that format, eg 6k3 mode to 5k3 mode in G.723.1. If the formats are different then a OpalMediaFormat::Merge() is performed.

If a format is empty (invalid) it is ignored and does not update the internal variable. In this way only the input or output side can be updated.

The default behaviour updates the inputMediaFormat and outputMediaFormat member variables.

Reimplemented from OpalFramedTranscoder.

Field Documentation

bool OpalPluginFramedAudioTranscoder::comfortNoise
protected

Referenced by AcceptComfortNoise().


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