OPAL
Version 3.10.4
|
#include <opalplugin.hpp>
Public Member Functions | |
virtual | ~PluginCodec () |
virtual bool | Construct () |
Complete construction of the plug in codec. | |
virtual bool | Transcode (const void *fromPtr, unsigned &fromLen, void *toPtr, unsigned &toLen, unsigned &flags)=0 |
Convert from one media format to another. | |
virtual bool | GetStatistics (char *, unsigned) |
Gather any statistics as a string into the provide buffer. | |
virtual size_t | GetOutputDataSize () |
Get the required output buffer size to be passed into Transcode. | |
virtual bool | SetInstanceID (const char *, unsigned) |
virtual bool | SetOptions (const char *const *options) |
Set all the options for the codec. | |
virtual bool | OnChangedOptions () |
Callback for if any options are changed. | |
virtual bool | SetOption (const char *optionName, const char *optionValue) |
Set an individual option of teh given name. | |
template<typename T > | |
bool | SetOptionUnsigned (T &oldValue, const char *optionValue, unsigned minimum, unsigned maximum=UINT_MAX) |
bool | SetOptionUnsigned (unsigned &oldValue, const char *optionValue, unsigned minimum, unsigned maximum=UINT_MAX) |
template<typename T > | |
bool | SetOptionBoolean (T &oldValue, const char *optionValue) |
bool | SetOptionBoolean (bool &oldValue, const char *optionValue) |
bool | SetOptionBit (int &oldValue, unsigned bit, const char *optionValue) |
bool | SetOptionBit (unsigned &oldValue, unsigned bit, const char *optionValue) |
Static Public Member Functions | |
static bool | Terminate () |
template<class CodecClass > | |
static void * | Create (const PluginCodec_Definition *defn) |
static void | Destroy (const PluginCodec_Definition *, void *context) |
static int | Transcode (const PluginCodec_Definition *, void *context, const void *fromPtr, unsigned *fromLen, void *toPtr, unsigned *toLen, unsigned int *flags) |
static int | GetOutputDataSize (const PluginCodec_Definition *, void *context, const char *, void *, unsigned *) |
static int | ToNormalised (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | ToCustomised (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | FreeOptions (const PluginCodec_Definition *, void *, const char *, void *parm, unsigned *len) |
static int | GetOptions (const struct PluginCodec_Definition *codec, void *, const char *, void *parm, unsigned *len) |
static int | SetOptions (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | ValidForProtocol (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | SetInstanceID (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | GetStatistics (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | Terminate (const PluginCodec_Definition *, void *context, const char *, void *, unsigned *) |
static struct PluginCodec_ControlDefn * | GetControls () |
Protected Member Functions | |
PluginCodec (const PluginCodec_Definition *defn) |
Protected Attributes | |
const PluginCodec_Definition * | m_definition |
bool | m_optionsSame |
unsigned | m_maxBitRate |
unsigned | m_frameTime |
|
inlineprotected |
|
inlinevirtual |
|
inlinevirtual |
Complete construction of the plug in codec.
|
inlinestatic |
References PTRACE.
|
inlinestatic |
|
inlinestatic |
Referenced by PluginCodec< NAME >::GetControls().
|
inlinestaticread |
References PluginCodec< NAME >::FreeOptions(), PluginCodec< NAME >::GetOptions(), PluginCodec< NAME >::GetOutputDataSize(), PluginCodec< NAME >::GetStatistics(), PLUGINCODEC_CONTROL_FREE_CODEC_OPTIONS, PLUGINCODEC_CONTROL_GET_CODEC_OPTIONS, PLUGINCODEC_CONTROL_GET_OUTPUT_DATA_SIZE, PLUGINCODEC_CONTROL_GET_STATISTICS, PLUGINCODEC_CONTROL_LOG_FUNCTION_INC, PLUGINCODEC_CONTROL_SET_CODEC_OPTIONS, PLUGINCODEC_CONTROL_SET_INSTANCE_ID, PLUGINCODEC_CONTROL_TERMINATE_CODEC, PLUGINCODEC_CONTROL_TO_CUSTOMISED_OPTIONS, PLUGINCODEC_CONTROL_TO_NORMALISED_OPTIONS, PLUGINCODEC_CONTROL_VALID_FOR_PROTOCOL, PluginCodec< NAME >::SetInstanceID(), PluginCodec< NAME >::SetOptions(), PluginCodec< NAME >::Terminate(), PluginCodec< NAME >::ToCustomised(), PluginCodec< NAME >::ToNormalised(), and PluginCodec< NAME >::ValidForProtocol().
|
inlinestatic |
References PluginCodec_GetCodecFunction::userData.
Referenced by PluginCodec< NAME >::GetControls().
|
inlinevirtual |
Get the required output buffer size to be passed into Transcode.
Referenced by PluginCodec< NAME >::GetControls().
|
inlinestatic |
|
inlinevirtual |
Gather any statistics as a string into the provide buffer.
Referenced by PluginCodec< NAME >::GetControls(), and PluginCodec< NAME >::GetStatistics().
|
inlinestatic |
References PluginCodec< NAME >::GetStatistics().
|
inlinevirtual |
Callback for if any options are changed.
Referenced by PluginCodec< NAME >::SetOptions().
|
inlinevirtual |
Set the instance ID for the codec. This is used to match up the encode and decoder pairs of instances for a given call. While most codecs like G.723.1 are purely unidirectional, some a bidirectional and have information flow between encoder and decoder.
Referenced by PluginCodec< NAME >::GetControls(), and PluginCodec< NAME >::SetInstanceID().
|
inlinestatic |
References PluginCodec< NAME >::SetInstanceID().
|
inlinevirtual |
Set an individual option of teh given name.
References PluginCodec_GetCodecFunction::bitsPerSec, PluginCodec< NAME >::m_definition, PluginCodec< NAME >::m_frameTime, PluginCodec< NAME >::m_maxBitRate, PLUGINCODEC_OPTION_FRAME_TIME, PLUGINCODEC_OPTION_TARGET_BIT_RATE, PluginCodec_GetCodecFunction::sampleRate, and PluginCodec< NAME >::SetOptionUnsigned().
Referenced by PluginCodec< NAME >::SetOptions().
|
inline |
|
inline |
References PluginCodec< NAME >::m_optionsSame.
|
inline |
|
inline |
References PluginCodec< NAME >::m_optionsSame.
|
inlinevirtual |
Set all the options for the codec.
References PluginCodec< NAME >::m_optionsSame, PluginCodec< NAME >::OnChangedOptions(), PTRACE, and PluginCodec< NAME >::SetOption().
Referenced by PluginCodec< NAME >::GetControls(), and PluginCodec< NAME >::SetOptions().
|
inlinestatic |
References PluginCodec< NAME >::SetOptions().
|
inline |
Referenced by PluginCodec< NAME >::SetOption().
|
inline |
References PluginCodec< NAME >::m_optionsSame.
|
inlinestatic |
Terminate operation of plug in codec. This is generally not needed but sometimes (e.g. fax) there is some clean up required to be done on completion of the codec run.
Referenced by PluginCodec< NAME >::GetControls(), and PluginCodec< NAME >::Terminate().
|
inlinestatic |
References PluginCodec< NAME >::Terminate().
|
inlinestatic |
References PluginCodec_MediaFormat::ToCustomised(), and PluginCodec_GetCodecFunction::userData.
Referenced by PluginCodec< NAME >::GetControls().
|
inlinestatic |
References PluginCodec_MediaFormat::ToNormalised(), and PluginCodec_GetCodecFunction::userData.
Referenced by PluginCodec< NAME >::GetControls().
|
pure virtual |
Convert from one media format to another.
|
inlinestatic |
References PTRACE.
|
inlinestatic |
References PluginCodec_GetCodecFunction::userData.
Referenced by PluginCodec< NAME >::GetControls().
|
protected |
Referenced by PluginCodec< NAME >::SetOption().
|
protected |
Referenced by PluginCodec< NAME >::SetOption().
|
protected |
Referenced by PluginCodec< NAME >::SetOption().
|
protected |