opalpluginmgr.h
Go to the documentation of this file.
/*
* opalpluginmgr.h
*
* OPAL codec plugins handler
*
* OPAL Library
*
* Copyright (C) 2005-2006 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Post Increment
*
* Contributor(s): ______________________________________.
*
* $Revision: 28134 $
* $Author: rjongbloed $
* $Date: 2012-08-01 19:48:35 -0500 (Wed, 01 Aug 2012) $
*/
#ifndef OPAL_CODEC_OPALPLUGINMGR_H
#define OPAL_CODEC_OPALPLUGINMGR_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <ptlib/object.h>
#include <opal/buildopts.h>
#include <ptlib/pluginmgr.h>
#include <ptlib/pfactory.h>
#include <codec/opalplugin.h>
#include <opal/mediafmt.h>
#include <opal/transcoders.h>
#if OPAL_H323
#include <h323/h323caps.h>
#endif
#if OPAL_VIDEO
#include <codec/vidcodec.h>
#endif
class H323Capability;
class H323StaticPluginCodec
{
public:
virtual ~H323StaticPluginCodec() { }
virtual PluginCodec_GetAPIVersionFunction Get_GetAPIFn() = 0;
virtual PluginCodec_GetCodecFunction Get_GetCodecFn() = 0;
};
typedef PFactory<H323StaticPluginCodec> H323StaticPluginCodecFactory;
class OpalPluginCodecManager;
PFACTORY_LOAD(OpalPluginCodecManager);
class OpalPluginCodecHandler : public PObject
{
PCLASSINFO(OpalPluginCodecHandler, PObject);
public:
OpalPluginCodecHandler();
static int GetChannelCount(const PluginCodec_Definition * codeDefn);
virtual OpalMediaFormatInternal * OnCreateAudioFormat(OpalPluginCodecManager & mgr,
const PluginCodec_Definition * codecDefn,
const char * fmtName,
const char * rtpEncodingName,
unsigned frameTime,
unsigned timeUnits,
time_t timeStamp);
#if OPAL_VIDEO
virtual OpalMediaFormatInternal * OnCreateVideoFormat(OpalPluginCodecManager & mgr,
const PluginCodec_Definition * codecDefn,
const char * fmtName,
const char * rtpEncodingName,
time_t timeStamp);
virtual void RegisterVideoTranscoder(const PString & src, const PString & dst, const PluginCodec_Definition * codec, bool v);
#endif
#if OPAL_T38_CAPABILITY
virtual OpalMediaFormatInternal * OnCreateFaxFormat(OpalPluginCodecManager & mgr,
const PluginCodec_Definition * codecDefn,
const char * fmtName,
const char * rtpEncodingName,
unsigned frameTime,
unsigned timeUnits,
time_t timeStamp);
#endif
};
class OpalPluginCodecManager : public PPluginModuleManager
{
PCLASSINFO(OpalPluginCodecManager, PPluginModuleManager);
public:
OpalPluginCodecManager(PPluginManager * pluginMgr = NULL);
~OpalPluginCodecManager();
PFACTORY_GET_SINGLETON(PFactory<PPluginModuleManager>, OpalPluginCodecManager);
void RegisterStaticCodec(const H323StaticPluginCodecFactory::Key_T & name,
PluginCodec_GetAPIVersionFunction getApiVerFn,
PluginCodec_GetCodecFunction getCodecFn);
void OnLoadPlugin(PDynaLink & dll, INT code);
virtual void OnShutdown();
#if OPAL_H323
H323Capability * CreateCapability(
const PString & _mediaFormat,
const PString & _baseName,
unsigned maxFramesPerPacket,
unsigned recommendedFramesPerPacket,
unsigned _pluginSubType);
#endif
protected:
// Note the below MUST NOT be an OpalMediaFormatList
PList<OpalMediaFormat> mediaFormatsOnHeap;
void RegisterCodecPlugins (unsigned int count, const PluginCodec_Definition * codecList, OpalPluginCodecHandler * handler);
void UnregisterCodecPlugins(unsigned int count, const PluginCodec_Definition * codecList, OpalPluginCodecHandler * handler);
bool AddMediaFormat(OpalPluginCodecHandler * handler, const PTime & timeNow, const PluginCodec_Definition * codecDefn, const char * fmtName);
#if OPAL_H323
void RegisterCapability(const PluginCodec_Definition * codecDefn);
#endif
};
class OpalPluginControl
{
public:
OpalPluginControl(const PluginCodec_Definition * def, const char * name);
bool Exists() const
{
return controlDef != NULL;
}
int Call(void * parm, unsigned * parmLen, void * context = NULL) const
{
return controlDef != NULL ? (*controlDef->control)(codecDef, context, fnName, parm, parmLen) : -1;
}
int Call(void * parm, unsigned parmLen, void * context = NULL) const
{
return Call(parm, &parmLen, context);
}
const char * GetName() const { return fnName; }
protected:
const PluginCodec_Definition * codecDef;
const char * fnName;
const PluginCodec_ControlDefn * controlDef;
};
class OpalPluginMediaFormatInternal
{
public:
OpalPluginMediaFormatInternal(const PluginCodec_Definition * defn);
bool AdjustOptions(OpalMediaFormatInternal & fmt, OpalPluginControl & control) const;
void PopulateOptions(OpalMediaFormatInternal & format);
void SetOldStyleOption(OpalMediaFormatInternal & format, const PString & _key, const PString & _val, const PString & type);
bool IsValidForProtocol(const PString & _protocol) const;
const PluginCodec_Definition * codecDef;
OpalPluginControl getOptionsControl;
OpalPluginControl freeOptionsControl;
OpalPluginControl validForProtocolControl;
OpalPluginControl toNormalisedControl;
OpalPluginControl toCustomisedControl;
};
class OpalPluginMediaFormat : public OpalMediaFormat
{
public:
OpalPluginMediaFormat(OpalMediaFormatInternal * info)
: OpalMediaFormat(info)
{
}
OpalPluginMediaFormatInternal * GetInfo() const { return dynamic_cast<OpalPluginMediaFormatInternal *>(m_info); }
};
class OpalPluginTranscoder
{
public:
OpalPluginTranscoder(const PluginCodec_Definition * defn, bool isEnc);
~OpalPluginTranscoder();
bool UpdateOptions(const OpalMediaFormat & fmt);
bool ExecuteCommand(const OpalMediaCommand & command);
bool Transcode(const void * from, unsigned * fromLen, void * to, unsigned * toLen, unsigned * flags) const
{
return codecDef != NULL && codecDef->codecFunction != NULL &&
(codecDef->codecFunction)(codecDef, context, from, fromLen, to, toLen, flags) != 0;
}
protected:
const PluginCodec_Definition * codecDef;
bool isEncoder;
void * context;
OpalPluginControl setCodecOptions;
OpalPluginControl getOutputDataSizeControl;
};
class OpalPluginAudioFormatInternal : public OpalAudioFormatInternal, public OpalPluginMediaFormatInternal
{
public:
friend class OpalPluginCodecManager;
OpalPluginAudioFormatInternal(
const PluginCodec_Definition * codecDefn,
const char * fmtName,
const char * rtpEncodingName,
unsigned frameTime,
unsigned timeUnits,
time_t timeStamp
);
virtual PObject * Clone() const;
virtual bool IsValidForProtocol(const PString & protocol) const;
virtual bool ToNormalisedOptions();
virtual bool ToCustomisedOptions();
};
class OpalPluginFramedAudioTranscoder : public OpalFramedTranscoder, public OpalPluginTranscoder
{
PCLASSINFO(OpalPluginFramedAudioTranscoder, OpalFramedTranscoder);
public:
OpalPluginFramedAudioTranscoder(const PluginCodec_Definition * codecDefn, bool isEncoder);
bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
PBoolean ExecuteCommand(const OpalMediaCommand & command);
PBoolean ConvertFrame(const BYTE * input, PINDEX & consumed, BYTE * output, PINDEX & created);
virtual PBoolean ConvertSilentFrame(BYTE * buffer);
virtual bool AcceptComfortNoise() const { return comfortNoise; }
protected:
bool comfortNoise;
};
class OpalPluginStreamedAudioTranscoder : public OpalStreamedTranscoder, public OpalPluginTranscoder
{
PCLASSINFO(OpalPluginStreamedAudioTranscoder, OpalStreamedTranscoder);
public:
OpalPluginStreamedAudioTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
PBoolean ExecuteCommand(const OpalMediaCommand & command);
virtual bool AcceptComfortNoise() const { return comfortNoise; }
virtual int ConvertOne(int from) const;
protected:
bool comfortNoise;
};
#if OPAL_VIDEO
class OpalPluginVideoFormatInternal : public OpalVideoFormatInternal, public OpalPluginMediaFormatInternal
{
public:
OpalPluginVideoFormatInternal(
const PluginCodec_Definition * codec,
const char * fmtName,
const char * rtpEncodingName,
time_t timeStamp
);
virtual PObject * Clone() const;
virtual bool IsValidForProtocol(const PString & protocol) const;
virtual bool ToNormalisedOptions();
virtual bool ToCustomisedOptions();
};
class OpalPluginVideoTranscoder : public OpalVideoTranscoder, public OpalPluginTranscoder
{
PCLASSINFO(OpalPluginVideoTranscoder, OpalVideoTranscoder);
public:
OpalPluginVideoTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
~OpalPluginVideoTranscoder();
PBoolean ConvertFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
PBoolean ExecuteCommand(const OpalMediaCommand & command);
protected:
bool EncodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
bool DecodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
bool DecodeFrame(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
RTP_DataFrame * m_bufferRTP;
DWORD m_lastSequenceNumber;
DWORD m_lastDecodedTimestamp; // For missing marker bit detection
DWORD m_lastMarkerTimestamp; // For continuous marker bit detection
bool m_badMarkers;
PSimpleTimer m_videoPictureLossTimer;
#if PTRACING
unsigned m_consecutiveIntraFrames;
#endif
};
#endif
#if OPAL_FAX
class OpalPluginFaxFormatInternal : public OpalMediaFormatInternal, public OpalPluginMediaFormatInternal
{
public:
OpalPluginFaxFormatInternal(
const PluginCodec_Definition * codec,
const char * fmtName,
const char * rtpEncodingName,
unsigned frameTime,
unsigned /*timeUnits*/,
time_t timeStamp
);
virtual PObject * Clone() const;
virtual bool IsValidForProtocol(const PString & protocol) const;
};
#endif // OPAL_FAX
//
// this is the base class for codecs accessible via the abstract factory functions
//
class OpalFactoryCodec : public PObject {
PCLASSINFO(OpalFactoryCodec, PObject)
public:
virtual const struct PluginCodec_Definition * GetDefinition()
{ return NULL; }
virtual PString GetInputFormat() const = 0;
virtual PString GetOutputFormat() const = 0;
virtual int Encode(const void * from,
unsigned * fromLen,
void * to,
unsigned * toLen,
unsigned int * flag
) = 0;
virtual unsigned int GetSampleRate() const = 0;
virtual unsigned int GetBitsPerSec() const = 0;
virtual unsigned int GetFrameTime() const = 0;
virtual unsigned int GetSamplesPerFrame() const = 0;
virtual unsigned int GetBytesPerFrame() const = 0;
virtual unsigned int GetRecommendedFramesPerPacket() const = 0;
virtual unsigned int GetMaxFramesPerPacket() const = 0;
virtual BYTE GetRTPPayload() const = 0;
virtual PString GetSDPFormat() const = 0;
};
template<class TranscoderClass>
class OpalPluginTranscoderFactory : public OpalTranscoderFactory
{
public:
class Worker : public OpalTranscoderFactory::WorkerBase
{
public:
Worker(const OpalTranscoderKey & key, const PluginCodec_Definition * codec, bool enc)
: OpalTranscoderFactory::WorkerBase(), codecDefn(codec), isEncoder(enc)
{ OpalTranscoderFactory::Register(key, this); }
protected:
virtual OpalTranscoder * Create(const OpalTranscoderKey &) const
{ return new TranscoderClass(codecDefn, isEncoder); }
const PluginCodec_Definition * codecDefn;
bool isEncoder;
};
};
//
// Helper class for handling plugin capabilities
//
class H323PluginCapabilityInfo
{
public:
H323PluginCapabilityInfo(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
//H323PluginCapabilityInfo(const PString & _baseName);
const PString & GetFormatName() const
{ return m_capabilityFormatName; }
protected:
const PluginCodec_Definition * m_codecDefn;
PString m_capabilityFormatName;
};
#if OPAL_H323
//
// Class for handling most audio plugin capabilities
//
class H323AudioPluginCapability : public H323AudioCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323AudioPluginCapability, H323AudioCapability);
public:
H323AudioPluginCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
unsigned pluginSubType);
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
virtual unsigned GetSubType() const;
protected:
unsigned pluginSubType;
};
#define OPAL_DECLARE_EMPTY_AUDIO_CAPABILITY(fmt, type) \
class fmt##_CapabilityRegisterer { \
public: \
fmt##_CapabilityRegisterer() \
{ H323CapabilityFactory::Register(fmt, new H323AudioPluginCapability(fmt, fmt, type)); } \
}; \
#define OPAL_DEFINE_EMPTY_AUDIO_CAPABILITY(fmt) \
static fmt##_CapabilityRegisterer fmt##_CapabilityRegisterer_instance; \
//
// Class for handling G.723.1 codecs
//
class H323PluginG7231Capability : public H323AudioPluginCapability
{
PCLASSINFO(H323PluginG7231Capability, H323AudioPluginCapability);
public:
H323PluginG7231Capability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat);
virtual PObject * Clone() const;
virtual PBoolean OnSendingPDU(H245_AudioCapability & cap, unsigned packetSize) const;
virtual PBoolean OnReceivedPDU(const H245_AudioCapability & cap, unsigned & packetSize);
};
#define OPAL_DECLARE_EMPTY_G7231_CAPABILITY(fmt, annex) \
class fmt##_CapabilityRegisterer { \
public: \
fmt##_CapabilityRegisterer() \
{ H323CapabilityFactory::Register(fmt, new H323PluginG7231Capability(fmt, annex)); } \
}; \
#define OPAL_DEFINE_EMPTY_G7231_CAPABILITY(fmt) \
static fmt##_CapabilityRegisterer fmt##_CapabilityRegisterer_instance; \
//
// Class for handling non standard audio capabilities
//
class H323CodecPluginNonStandardAudioCapability : public H323NonStandardAudioCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323CodecPluginNonStandardAudioCapability, H323NonStandardAudioCapability);
public:
H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
const unsigned char * data, unsigned dataLen);
H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
const unsigned char * data, unsigned dataLen);
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
};
//
// Class for handling generic audio capabilities
//
class H323CodecPluginGenericAudioCapability : public H323GenericAudioCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323CodecPluginGenericAudioCapability, H323GenericAudioCapability);
public:
H323CodecPluginGenericAudioCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
const PluginCodec_H323GenericCodecData * data);
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
};
#if OPAL_VIDEO
//
// Class for handling non standard video capabilities
//
class H323CodecPluginNonStandardVideoCapability : public H323NonStandardVideoCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323CodecPluginNonStandardVideoCapability, H323NonStandardVideoCapability);
public:
H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
const unsigned char * data, unsigned dataLen);
H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
const unsigned char * data, unsigned dataLen);
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
};
//
// Class for handling generic video capabilities
//
class H323CodecPluginGenericVideoCapability : public H323GenericVideoCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323CodecPluginGenericVideoCapability, H323GenericVideoCapability);
public:
H323CodecPluginGenericVideoCapability(const PluginCodec_Definition * codecDefn,
const OpalMediaFormat & mediaFormat,
const PluginCodec_H323GenericCodecData * data);
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
};
//
// Class for handling H.261 plugin capabilities
//
class H323H261PluginCapability : public H323VideoCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323H261PluginCapability, H323VideoCapability);
public:
H323H261PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
virtual unsigned GetSubType() const;
virtual PBoolean OnSendingPDU(
H245_VideoCapability & pdu
) const;
virtual PBoolean OnSendingPDU(
H245_VideoMode & pdu
) const;
virtual PBoolean OnReceivedPDU(
const H245_VideoCapability & pdu
);
};
//
// Class for handling H.263 plugin capabilities
//
class H323H263PluginCapability : public H323VideoCapability,
public H323PluginCapabilityInfo
{
PCLASSINFO(H323H263PluginCapability, H323VideoCapability);
public:
H323H263PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual PString GetFormatName() const;
virtual unsigned GetSubType() const;
virtual PBoolean OnSendingPDU(
H245_VideoCapability & pdu
) const;
virtual PBoolean OnSendingPDU(
H245_VideoMode & pdu
) const;
virtual PBoolean OnReceivedPDU(
const H245_VideoCapability & pdu
);
virtual PBoolean IsMatch(
const PASN_Choice & subTypePDU,
const PString & mediaPacketization
) const;
};
#endif // OPAL_VIDEO
#endif // OPAL_H323
#endif // OPAL_CODEC_OPALPLUGINMGR_H
OpalPluginTranscoder::codecDef
const PluginCodec_Definition * codecDef
Definition: opalpluginmgr.h:234
OpalPluginCodecManager::RegisterCapability
void RegisterCapability(const PluginCodec_Definition *codecDefn)
OpalFactoryCodec
Definition: opalpluginmgr.h:378
OpalPluginControl::OpalPluginControl
OpalPluginControl(const PluginCodec_Definition *def, const char *name)
vidcodec.h
OpalPluginCodecManager::OnShutdown
virtual void OnShutdown()
OpalPluginTranscoderFactory::Worker::isEncoder
bool isEncoder
Definition: opalpluginmgr.h:445
H323H263PluginCapability::GetFormatName
virtual PString GetFormatName() const
H323CodecPluginGenericAudioCapability
Definition: opalpluginmgr.h:561
OpalPluginCodecManager::RegisterStaticCodec
void RegisterStaticCodec(const H323StaticPluginCodecFactory::Key_T &name, PluginCodec_GetAPIVersionFunction getApiVerFn, PluginCodec_GetCodecFunction getCodecFn)
H323PluginG7231Capability::OnSendingPDU
virtual PBoolean OnSendingPDU(H245_AudioCapability &cap, unsigned packetSize) const
PluginCodec_Definition
Definition: opalplugin.h:328
H323StaticPluginCodec::~H323StaticPluginCodec
virtual ~H323StaticPluginCodec()
Definition: opalpluginmgr.h:64
OpalPluginVideoFormatInternal
Definition: opalpluginmgr.h:298
OpalPluginTranscoder::OpalPluginTranscoder
OpalPluginTranscoder(const PluginCodec_Definition *defn, bool isEnc)
OpalPluginControl
Definition: opalpluginmgr.h:157
OpalAudioFormatInternal
Definition: mediafmt.h:1242
PluginCodec_GetAPIVersionFunction
unsigned(* PluginCodec_GetAPIVersionFunction)()
Definition: opalplugin.h:388
OpalPluginFramedAudioTranscoder::ConvertFrame
PBoolean ConvertFrame(const BYTE *input, PINDEX &consumed, BYTE *output, PINDEX &created)
OpalPluginVideoTranscoder::ConvertFrames
PBoolean ConvertFrames(const RTP_DataFrame &src, RTP_DataFrameList &dstList)
OpalFactoryCodec::GetSamplesPerFrame
virtual unsigned int GetSamplesPerFrame() const =0
H323StaticPluginCodec
Definition: opalpluginmgr.h:61
H323H263PluginCapability::OnSendingPDU
virtual PBoolean OnSendingPDU(H245_VideoCapability &pdu) const
H323H263PluginCapability::IsMatch
virtual PBoolean IsMatch(const PASN_Choice &subTypePDU, const PString &mediaPacketization) const
OpalPluginMediaFormat::OpalPluginMediaFormat
OpalPluginMediaFormat(OpalMediaFormatInternal *info)
Definition: opalpluginmgr.h:210
OpalPluginCodecManager::AddMediaFormat
bool AddMediaFormat(OpalPluginCodecHandler *handler, const PTime &timeNow, const PluginCodec_Definition *codecDefn, const char *fmtName)
H323PluginCapabilityInfo
Definition: opalpluginmgr.h:454
OpalMediaCommand
Definition: mediacmd.h:43
opalplugin.h
OpalPluginMediaFormatInternal::AdjustOptions
bool AdjustOptions(OpalMediaFormatInternal &fmt, OpalPluginControl &control) const
buildopts.h
H323H261PluginCapability::OnSendingPDU
virtual PBoolean OnSendingPDU(H245_VideoCapability &pdu) const
OpalFactoryCodec::GetMaxFramesPerPacket
virtual unsigned int GetMaxFramesPerPacket() const =0
OpalFactoryCodec::GetSampleRate
virtual unsigned int GetSampleRate() const =0
OpalPluginTranscoderFactory::Worker::Worker
Worker(const OpalTranscoderKey &key, const PluginCodec_Definition *codec, bool enc)
Definition: opalpluginmgr.h:436
H323AudioPluginCapability::GetFormatName
virtual PString GetFormatName() const
OpalPluginMediaFormatInternal::PopulateOptions
void PopulateOptions(OpalMediaFormatInternal &format)
H323Capability
Definition: h323caps.h:89
OpalPluginVideoTranscoder::m_lastSequenceNumber
DWORD m_lastSequenceNumber
Definition: opalpluginmgr.h:331
H323StaticPluginCodec::Get_GetAPIFn
virtual PluginCodec_GetAPIVersionFunction Get_GetAPIFn()=0
h323caps.h
OpalPluginTranscoder::UpdateOptions
bool UpdateOptions(const OpalMediaFormat &fmt)
OpalPluginFaxFormatInternal
Definition: opalpluginmgr.h:348
OpalFactoryCodec::GetBytesPerFrame
virtual unsigned int GetBytesPerFrame() const =0
OpalPluginMediaFormatInternal::OpalPluginMediaFormatInternal
OpalPluginMediaFormatInternal(const PluginCodec_Definition *defn)
OpalStreamedTranscoder
Definition: transcoders.h:459
OpalMediaFormatInternal
Definition: mediafmt.h:643
OpalPluginStreamedAudioTranscoder
Definition: opalpluginmgr.h:280
OpalPluginCodecManager::CreateCapability
H323Capability * CreateCapability(const PString &_mediaFormat, const PString &_baseName, unsigned maxFramesPerPacket, unsigned recommendedFramesPerPacket, unsigned _pluginSubType)
OpalFactoryCodec::GetDefinition
virtual const struct PluginCodec_Definition * GetDefinition()
Definition: opalpluginmgr.h:382
OpalPluginFaxFormatInternal::Clone
virtual PObject * Clone() const
OpalPluginTranscoder::isEncoder
bool isEncoder
Definition: opalpluginmgr.h:235
OpalFactoryCodec::GetBitsPerSec
virtual unsigned int GetBitsPerSec() const =0
OpalPluginControl::controlDef
const PluginCodec_ControlDefn * controlDef
Definition: opalpluginmgr.h:182
OpalPluginVideoTranscoder::m_lastDecodedTimestamp
DWORD m_lastDecodedTimestamp
Definition: opalpluginmgr.h:332
OpalPluginCodecManager::PFACTORY_GET_SINGLETON
PFACTORY_GET_SINGLETON(PFactory< PPluginModuleManager >, OpalPluginCodecManager)
OpalPluginVideoFormatInternal::IsValidForProtocol
virtual bool IsValidForProtocol(const PString &protocol) const
H323PluginG7231Capability
Definition: opalpluginmgr.h:510
OpalPluginTranscoder::~OpalPluginTranscoder
~OpalPluginTranscoder()
OpalPluginCodecManager
Definition: opalpluginmgr.h:115
PFACTORY_LOAD
PFACTORY_LOAD(OpalPluginCodecManager)
H323CodecPluginGenericVideoCapability::Clone
virtual PObject * Clone() const
H323CodecPluginGenericAudioCapability::Clone
virtual PObject * Clone() const
OpalFactoryCodec::GetInputFormat
virtual PString GetInputFormat() const =0
OpalPluginVideoFormatInternal::ToCustomisedOptions
virtual bool ToCustomisedOptions()
OpalPluginFramedAudioTranscoder::ExecuteCommand
PBoolean ExecuteCommand(const OpalMediaCommand &command)
OpalFactoryCodec::GetRecommendedFramesPerPacket
virtual unsigned int GetRecommendedFramesPerPacket() const =0
H323PluginG7231Capability::Clone
virtual PObject * Clone() const
OpalPluginTranscoder::setCodecOptions
OpalPluginControl setCodecOptions
Definition: opalpluginmgr.h:238
OpalPluginControl::fnName
const char * fnName
Definition: opalpluginmgr.h:181
H323CodecPluginGenericAudioCapability::H323CodecPluginGenericAudioCapability
H323CodecPluginGenericAudioCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat, const PluginCodec_H323GenericCodecData *data)
OpalPluginTranscoderFactory::Worker::Create
virtual OpalTranscoder * Create(const OpalTranscoderKey &) const
Definition: opalpluginmgr.h:441
OpalPluginMediaFormatInternal::IsValidForProtocol
bool IsValidForProtocol(const PString &_protocol) const
H323AudioPluginCapability
Definition: opalpluginmgr.h:476
OpalPluginFramedAudioTranscoder
Definition: opalpluginmgr.h:265
OpalPluginTranscoder::context
void * context
Definition: opalpluginmgr.h:236
H323AudioPluginCapability::H323AudioPluginCapability
H323AudioPluginCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat, unsigned pluginSubType)
OpalPluginCodecHandler::RegisterVideoTranscoder
virtual void RegisterVideoTranscoder(const PString &src, const PString &dst, const PluginCodec_Definition *codec, bool v)
H323H263PluginCapability::Compare
Comparison Compare(const PObject &obj) const
OpalTranscoderKey
std::pair< PString, PString > OpalTranscoderKey
Definition: transcoders.h:112
OpalPluginCodecHandler
Definition: opalpluginmgr.h:78
H323AudioPluginCapability::GetSubType
virtual unsigned GetSubType() const
H323NonStandardVideoCapability
Definition: h323caps.h:1092
OpalPluginVideoTranscoder::DecodeFrames
bool DecodeFrames(const RTP_DataFrame &src, RTP_DataFrameList &dstList)
OpalPluginCodecHandler::OnCreateAudioFormat
virtual OpalMediaFormatInternal * OnCreateAudioFormat(OpalPluginCodecManager &mgr, const PluginCodec_Definition *codecDefn, const char *fmtName, const char *rtpEncodingName, unsigned frameTime, unsigned timeUnits, time_t timeStamp)
OpalPluginCodecManager::~OpalPluginCodecManager
~OpalPluginCodecManager()
H323NonStandardCapabilityInfo::CompareFuncType
PObject::Comparison(* CompareFuncType)(struct PluginCodec_H323NonStandardCodecData *)
Definition: h323caps.h:377
H323H261PluginCapability::Clone
virtual PObject * Clone() const
RTP_DataFrame
Definition: rtp.h:71
OpalFactoryCodec::GetSDPFormat
virtual PString GetSDPFormat() const =0
H323PluginCapabilityInfo::m_capabilityFormatName
PString m_capabilityFormatName
Definition: opalpluginmgr.h:466
H323PluginG7231Capability::H323PluginG7231Capability
H323PluginG7231Capability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat)
H323AudioPluginCapability::Clone
virtual PObject * Clone() const
OpalMediaFormat
Definition: mediafmt.h:724
OpalPluginFramedAudioTranscoder::OpalPluginFramedAudioTranscoder
OpalPluginFramedAudioTranscoder(const PluginCodec_Definition *codecDefn, bool isEncoder)
OpalPluginVideoFormatInternal::Clone
virtual PObject * Clone() const
H323CodecPluginGenericVideoCapability::GetFormatName
virtual PString GetFormatName() const
PluginCodec_ControlDefn::control
int(* control)(const struct PluginCodec_Definition *codec, void *context, const char *name, void *parm, unsigned *parmLen)
Definition: opalplugin.h:239
H323StaticPluginCodec::Get_GetCodecFn
virtual PluginCodec_GetCodecFunction Get_GetCodecFn()=0
PluginCodec_ControlDefn
Definition: opalplugin.h:237
OpalPluginCodecHandler::OnCreateVideoFormat
virtual OpalMediaFormatInternal * OnCreateVideoFormat(OpalPluginCodecManager &mgr, const PluginCodec_Definition *codecDefn, const char *fmtName, const char *rtpEncodingName, time_t timeStamp)
OpalPluginControl::Exists
bool Exists() const
Definition: opalpluginmgr.h:162
OpalPluginVideoFormatInternal::ToNormalisedOptions
virtual bool ToNormalisedOptions()
H323CodecPluginGenericVideoCapability::H323CodecPluginGenericVideoCapability
H323CodecPluginGenericVideoCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat, const PluginCodec_H323GenericCodecData *data)
OpalFactoryCodec::GetFrameTime
virtual unsigned int GetFrameTime() const =0
H323H261PluginCapability::GetFormatName
virtual PString GetFormatName() const
OpalPluginAudioFormatInternal::Clone
virtual PObject * Clone() const
OpalPluginVideoTranscoder::DecodeFrame
bool DecodeFrame(const RTP_DataFrame &src, RTP_DataFrameList &dstList)
OpalPluginControl::Call
int Call(void *parm, unsigned parmLen, void *context=NULL) const
Definition: opalpluginmgr.h:172
OpalPluginTranscoder::getOutputDataSizeControl
OpalPluginControl getOutputDataSizeControl
Definition: opalpluginmgr.h:239
OpalPluginTranscoderFactory::Worker::codecDefn
const PluginCodec_Definition * codecDefn
Definition: opalpluginmgr.h:444
OpalFactoryCodec::Encode
virtual int Encode(const void *from, unsigned *fromLen, void *to, unsigned *toLen, unsigned int *flag)=0
OpalPluginFaxFormatInternal::IsValidForProtocol
virtual bool IsValidForProtocol(const PString &protocol) const
H323PluginCapabilityInfo::m_codecDefn
const PluginCodec_Definition * m_codecDefn
Definition: opalpluginmgr.h:465
OpalPluginStreamedAudioTranscoder::AcceptComfortNoise
virtual bool AcceptComfortNoise() const
Definition: opalpluginmgr.h:287
OpalPluginMediaFormatInternal::SetOldStyleOption
void SetOldStyleOption(OpalMediaFormatInternal &format, const PString &_key, const PString &_val, const PString &type)
OpalTranscoder
Definition: transcoders.h:137
transcoders.h
OpalPluginVideoTranscoder::m_badMarkers
bool m_badMarkers
Definition: opalpluginmgr.h:334
OpalPluginMediaFormatInternal::codecDef
const PluginCodec_Definition * codecDef
Definition: opalpluginmgr.h:198
OpalPluginFramedAudioTranscoder::ConvertSilentFrame
virtual PBoolean ConvertSilentFrame(BYTE *buffer)
OpalPluginVideoTranscoder
Definition: opalpluginmgr.h:314
OpalPluginCodecManager::OpalPluginCodecManager
OpalPluginCodecManager(PPluginManager *pluginMgr=NULL)
OpalPluginTranscoderFactory::Worker
Definition: opalpluginmgr.h:433
H323H261PluginCapability::GetSubType
virtual unsigned GetSubType() const
OpalFactoryCodec::GetRTPPayload
virtual BYTE GetRTPPayload() const =0
H323PluginG7231Capability::OnReceivedPDU
virtual PBoolean OnReceivedPDU(const H245_AudioCapability &cap, unsigned &packetSize)
H323CodecPluginGenericVideoCapability
Definition: opalpluginmgr.h:606
OpalMediaFormat::m_info
OpalMediaFormatInternal * m_info
Definition: mediafmt.h:1234
OpalPluginMediaFormatInternal::validForProtocolControl
OpalPluginControl validForProtocolControl
Definition: opalpluginmgr.h:201
OpalPluginStreamedAudioTranscoder::ExecuteCommand
PBoolean ExecuteCommand(const OpalMediaCommand &command)
OpalPluginMediaFormatInternal::toCustomisedControl
OpalPluginControl toCustomisedControl
Definition: opalpluginmgr.h:203
H323H261PluginCapability::H323H261PluginCapability
H323H261PluginCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat)
H323CodecPluginNonStandardAudioCapability::H323CodecPluginNonStandardAudioCapability
H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat, H323NonStandardCapabilityInfo::CompareFuncType compareFunc, const unsigned char *data, unsigned dataLen)
OpalFramedTranscoder
Definition: transcoders.h:370
mediafmt.h
H323NonStandardCapabilityInfo::compareFunc
CompareFuncType compareFunc
Definition: h323caps.h:468
H323CodecPluginNonStandardVideoCapability::H323CodecPluginNonStandardVideoCapability
H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat, H323NonStandardCapabilityInfo::CompareFuncType compareFunc, const unsigned char *data, unsigned dataLen)
H323VideoCapability
Definition: h323caps.h:951
OpalPluginFramedAudioTranscoder::AcceptComfortNoise
virtual bool AcceptComfortNoise() const
Definition: opalpluginmgr.h:274
OpalPluginCodecHandler::OpalPluginCodecHandler
OpalPluginCodecHandler()
H323H261PluginCapability::Compare
Comparison Compare(const PObject &obj) const
OpalPluginTranscoder::Transcode
bool Transcode(const void *from, unsigned *fromLen, void *to, unsigned *toLen, unsigned *flags) const
Definition: opalpluginmgr.h:227
OpalPluginAudioFormatInternal::ToNormalisedOptions
virtual bool ToNormalisedOptions()
OpalPluginCodecManager::mediaFormatsOnHeap
PList< OpalMediaFormat > mediaFormatsOnHeap
Definition: opalpluginmgr.h:143
OpalPluginStreamedAudioTranscoder::ConvertOne
virtual int ConvertOne(int from) const
OpalPluginFaxFormatInternal::OpalPluginFaxFormatInternal
OpalPluginFaxFormatInternal(const PluginCodec_Definition *codec, const char *fmtName, const char *rtpEncodingName, unsigned frameTime, unsigned, time_t timeStamp)
OpalTranscoderFactory
PFactory< OpalTranscoder, OpalTranscoderKey > OpalTranscoderFactory
Definition: transcoders.h:113
OpalPluginVideoTranscoder::m_bufferRTP
RTP_DataFrame * m_bufferRTP
Definition: opalpluginmgr.h:330
OpalPluginControl::codecDef
const PluginCodec_Definition * codecDef
Definition: opalpluginmgr.h:180
OpalPluginMediaFormat::GetInfo
OpalPluginMediaFormatInternal * GetInfo() const
Definition: opalpluginmgr.h:215
OpalPluginVideoFormatInternal::OpalPluginVideoFormatInternal
OpalPluginVideoFormatInternal(const PluginCodec_Definition *codec, const char *fmtName, const char *rtpEncodingName, time_t timeStamp)
OpalPluginFramedAudioTranscoder::comfortNoise
bool comfortNoise
Definition: opalpluginmgr.h:276
OpalPluginTranscoderFactory
Definition: opalpluginmgr.h:430
H323CodecPluginNonStandardVideoCapability
Definition: opalpluginmgr.h:582
OpalPluginVideoTranscoder::m_lastMarkerTimestamp
DWORD m_lastMarkerTimestamp
Definition: opalpluginmgr.h:333
OpalPluginTranscoder
Definition: opalpluginmgr.h:219
H323NonStandardAudioCapability
Definition: h323caps.h:738
H323PluginCapabilityInfo::H323PluginCapabilityInfo
H323PluginCapabilityInfo(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat)
H323H263PluginCapability::OnReceivedPDU
virtual PBoolean OnReceivedPDU(const H245_VideoCapability &pdu)
H323StaticPluginCodecFactory
PFactory< H323StaticPluginCodec > H323StaticPluginCodecFactory
Definition: opalpluginmgr.h:69
OpalPluginControl::GetName
const char * GetName() const
Definition: opalpluginmgr.h:177
H323H261PluginCapability
Definition: opalpluginmgr.h:625
OpalPluginTranscoder::ExecuteCommand
bool ExecuteCommand(const OpalMediaCommand &command)
OpalFactoryCodec::GetOutputFormat
virtual PString GetOutputFormat() const =0
OpalPluginCodecManager::OnLoadPlugin
void OnLoadPlugin(PDynaLink &dll, INT code)
H323GenericVideoCapability
Definition: h323caps.h:1210
OpalPluginVideoTranscoder::~OpalPluginVideoTranscoder
~OpalPluginVideoTranscoder()
H323CodecPluginNonStandardAudioCapability
Definition: opalpluginmgr.h:537
OpalPluginStreamedAudioTranscoder::OpalPluginStreamedAudioTranscoder
OpalPluginStreamedAudioTranscoder(const PluginCodec_Definition *codec, bool isEncoder)
OpalPluginCodecManager::RegisterCodecPlugins
void RegisterCodecPlugins(unsigned int count, const PluginCodec_Definition *codecList, OpalPluginCodecHandler *handler)
OpalPluginAudioFormatInternal::OpalPluginAudioFormatInternal
OpalPluginAudioFormatInternal(const PluginCodec_Definition *codecDefn, const char *fmtName, const char *rtpEncodingName, unsigned frameTime, unsigned timeUnits, time_t timeStamp)
PluginCodec_H323GenericCodecData
Definition: opalplugin.h:699
OpalVideoFormatInternal
Definition: mediafmt.h:1288
OpalPluginVideoTranscoder::OpalPluginVideoTranscoder
OpalPluginVideoTranscoder(const PluginCodec_Definition *codec, bool isEncoder)
OpalPluginVideoTranscoder::m_videoPictureLossTimer
PSimpleTimer m_videoPictureLossTimer
Definition: opalpluginmgr.h:335
PluginCodec_Definition::codecFunction
int(* codecFunction)(const struct PluginCodec_Definition *codec, void *context, const void *from, unsigned *fromLen, void *to, unsigned *toLen, unsigned int *flag)
Definition: opalplugin.h:371
OpalPluginVideoTranscoder::ExecuteCommand
PBoolean ExecuteCommand(const OpalMediaCommand &command)
H323H263PluginCapability::H323H263PluginCapability
H323H263PluginCapability(const PluginCodec_Definition *codecDefn, const OpalMediaFormat &mediaFormat)
OpalPluginAudioFormatInternal
Definition: opalpluginmgr.h:245
OpalPluginVideoTranscoder::UpdateMediaFormats
bool UpdateMediaFormats(const OpalMediaFormat &input, const OpalMediaFormat &output)
OpalPluginMediaFormatInternal::toNormalisedControl
OpalPluginControl toNormalisedControl
Definition: opalpluginmgr.h:202
OpalPluginMediaFormatInternal::freeOptionsControl
OpalPluginControl freeOptionsControl
Definition: opalpluginmgr.h:200
H323CodecPluginNonStandardAudioCapability::Clone
virtual PObject * Clone() const
OpalPluginFramedAudioTranscoder::UpdateMediaFormats
bool UpdateMediaFormats(const OpalMediaFormat &input, const OpalMediaFormat &output)
OpalPluginStreamedAudioTranscoder::UpdateMediaFormats
bool UpdateMediaFormats(const OpalMediaFormat &input, const OpalMediaFormat &output)
H323H263PluginCapability::Clone
virtual PObject * Clone() const
H323AudioCapability
Definition: h323caps.h:554
H323H263PluginCapability::GetSubType
virtual unsigned GetSubType() const
H323CodecPluginNonStandardVideoCapability::Clone
virtual PObject * Clone() const
OpalPluginCodecManager::UnregisterCodecPlugins
void UnregisterCodecPlugins(unsigned int count, const PluginCodec_Definition *codecList, OpalPluginCodecHandler *handler)
H323CodecPluginNonStandardVideoCapability::GetFormatName
virtual PString GetFormatName() const
OpalPluginAudioFormatInternal::IsValidForProtocol
virtual bool IsValidForProtocol(const PString &protocol) const
H323CodecPluginNonStandardAudioCapability::GetFormatName
virtual PString GetFormatName() const
OpalMediaFormatInternal::rtpEncodingName
PString rtpEncodingName
Definition: mediafmt.h:698
OpalPluginMediaFormatInternal::getOptionsControl
OpalPluginControl getOptionsControl
Definition: opalpluginmgr.h:199
OpalPluginStreamedAudioTranscoder::comfortNoise
bool comfortNoise
Definition: opalpluginmgr.h:290
H323H261PluginCapability::OnReceivedPDU
virtual PBoolean OnReceivedPDU(const H245_VideoCapability &pdu)
OpalPluginMediaFormat
Definition: opalpluginmgr.h:207
OpalPluginCodecHandler::GetChannelCount
static int GetChannelCount(const PluginCodec_Definition *codeDefn)
H323CodecPluginGenericAudioCapability::GetFormatName
virtual PString GetFormatName() const
H323H263PluginCapability
Definition: opalpluginmgr.h:657
H323GenericAudioCapability
Definition: h323caps.h:857
OpalPluginVideoTranscoder::EncodeFrames
bool EncodeFrames(const RTP_DataFrame &src, RTP_DataFrameList &dstList)
H323AudioPluginCapability::pluginSubType
unsigned pluginSubType
Definition: opalpluginmgr.h:492
OpalPluginAudioFormatInternal::ToCustomisedOptions
virtual bool ToCustomisedOptions()
OpalVideoTranscoder
Definition: vidcodec.h:72
OpalPluginMediaFormatInternal
Definition: opalpluginmgr.h:188
OpalPluginControl::Call
int Call(void *parm, unsigned *parmLen, void *context=NULL) const
Definition: opalpluginmgr.h:167
H323PluginCapabilityInfo::GetFormatName
const PString & GetFormatName() const
Definition: opalpluginmgr.h:461