#include <opalplugin.hpp>
Inheritance diagram for PluginCodec< NAME >:
Public Types | |
typedef PluginCodec_MediaFormat< NAME > | MediaFormat |
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 | GetActiveOptions (PluginCodec_OptionMap &) |
Get options that are "active" and may be different from the last SetOptions() call. | |
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 the 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_s (const PluginCodec_Definition *defn) |
static void | Destroy_s (const PluginCodec_Definition *, void *context) |
static int | Transcode_s (const PluginCodec_Definition *, void *context, const void *fromPtr, unsigned *fromLen, void *toPtr, unsigned *toLen, unsigned int *flags) |
static int | GetOutputDataSize_s (const PluginCodec_Definition *, void *context, const char *, void *, unsigned *) |
static int | ToNormalised_s (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | ToCustomised_s (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | GetActiveOptions_s (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *parmLen) |
static int | FreeOptions_s (const PluginCodec_Definition *, void *, const char *, void *parm, unsigned *len) |
static int | GetOptions_s (const struct PluginCodec_Definition *codec, void *, const char *, void *parm, unsigned *len) |
static int | SetOptions_s (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | ValidForProtocol_s (const PluginCodec_Definition *defn, void *, const char *, void *parm, unsigned *len) |
static int | SetInstanceID_s (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | GetStatistics_s (const PluginCodec_Definition *, void *context, const char *, void *parm, unsigned *len) |
static int | Terminate_s (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 |
typedef PluginCodec_MediaFormat<NAME> PluginCodec< NAME >::MediaFormat |
PluginCodec< NAME >::PluginCodec | ( | const PluginCodec_Definition * | defn | ) | [inline, protected] |
virtual PluginCodec< NAME >::~PluginCodec | ( | ) | [inline, virtual] |
virtual bool PluginCodec< NAME >::Construct | ( | ) | [inline, virtual] |
Complete construction of the plug in codec.
static void* PluginCodec< NAME >::Create_s | ( | const PluginCodec_Definition * | defn | ) | [inline, static] |
static void PluginCodec< NAME >::Destroy_s | ( | const PluginCodec_Definition * | , | |
void * | context | |||
) | [inline, static] |
static int PluginCodec< NAME >::FreeOptions_s | ( | const PluginCodec_Definition * | , | |
void * | , | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
virtual bool PluginCodec< NAME >::GetActiveOptions | ( | PluginCodec_OptionMap & | ) | [inline, virtual] |
Get options that are "active" and may be different from the last SetOptions() call.
Reimplemented in PluginVideoEncoder< NAME >.
static int PluginCodec< NAME >::GetActiveOptions_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | parm, | |||
unsigned * | parmLen | |||
) | [inline, static] |
static struct PluginCodec_ControlDefn* PluginCodec< NAME >::GetControls | ( | ) | [inline, static] |
static int PluginCodec< NAME >::GetOptions_s | ( | const struct PluginCodec_Definition * | codec, | |
void * | , | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
virtual size_t PluginCodec< NAME >::GetOutputDataSize | ( | ) | [inline, virtual] |
Get the required output buffer size to be passed into Transcode.
Reimplemented in PluginVideoDecoder< NAME >.
static int PluginCodec< NAME >::GetOutputDataSize_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | , | |||
unsigned * | ||||
) | [inline, static] |
virtual bool PluginCodec< NAME >::GetStatistics | ( | char * | , | |
unsigned | ||||
) | [inline, virtual] |
Gather any statistics as a string into the provide buffer.
static int PluginCodec< NAME >::GetStatistics_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
virtual bool PluginCodec< NAME >::OnChangedOptions | ( | ) | [inline, virtual] |
Callback for if any options are changed.
virtual bool PluginCodec< NAME >::SetInstanceID | ( | const char * | , | |
unsigned | ||||
) | [inline, virtual] |
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.
static int PluginCodec< NAME >::SetInstanceID_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
virtual bool PluginCodec< NAME >::SetOption | ( | const char * | optionName, | |
const char * | optionValue | |||
) | [inline, virtual] |
bool PluginCodec< NAME >::SetOptionBit | ( | unsigned & | oldValue, | |
unsigned | bit, | |||
const char * | optionValue | |||
) | [inline] |
bool PluginCodec< NAME >::SetOptionBit | ( | int & | oldValue, | |
unsigned | bit, | |||
const char * | optionValue | |||
) | [inline] |
bool PluginCodec< NAME >::SetOptionBoolean | ( | bool & | oldValue, | |
const char * | optionValue | |||
) | [inline] |
bool PluginCodec< NAME >::SetOptionBoolean | ( | T & | oldValue, | |
const char * | optionValue | |||
) | [inline] |
virtual bool PluginCodec< NAME >::SetOptions | ( | const char *const * | options | ) | [inline, virtual] |
Set all the options for the codec.
static int PluginCodec< NAME >::SetOptions_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
bool PluginCodec< NAME >::SetOptionUnsigned | ( | unsigned & | oldValue, | |
const char * | optionValue, | |||
unsigned | minimum, | |||
unsigned | maximum = UINT_MAX | |||
) | [inline] |
bool PluginCodec< NAME >::SetOptionUnsigned | ( | T & | oldValue, | |
const char * | optionValue, | |||
unsigned | minimum, | |||
unsigned | maximum = UINT_MAX | |||
) | [inline] |
static bool PluginCodec< NAME >::Terminate | ( | ) | [inline, static] |
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.
static int PluginCodec< NAME >::Terminate_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const char * | , | |||
void * | , | |||
unsigned * | ||||
) | [inline, static] |
static int PluginCodec< NAME >::ToCustomised_s | ( | const PluginCodec_Definition * | defn, | |
void * | , | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
static int PluginCodec< NAME >::ToNormalised_s | ( | const PluginCodec_Definition * | defn, | |
void * | , | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
virtual bool PluginCodec< NAME >::Transcode | ( | const void * | fromPtr, | |
unsigned & | fromLen, | |||
void * | toPtr, | |||
unsigned & | toLen, | |||
unsigned & | flags | |||
) | [pure virtual] |
Convert from one media format to another.
static int PluginCodec< NAME >::Transcode_s | ( | const PluginCodec_Definition * | , | |
void * | context, | |||
const void * | fromPtr, | |||
unsigned * | fromLen, | |||
void * | toPtr, | |||
unsigned * | toLen, | |||
unsigned int * | flags | |||
) | [inline, static] |
static int PluginCodec< NAME >::ValidForProtocol_s | ( | const PluginCodec_Definition * | defn, | |
void * | , | |||
const char * | , | |||
void * | parm, | |||
unsigned * | len | |||
) | [inline, static] |
const PluginCodec_Definition* PluginCodec< NAME >::m_definition [protected] |
unsigned PluginCodec< NAME >::m_frameTime [protected] |
unsigned PluginCodec< NAME >::m_maxBitRate [protected] |
bool PluginCodec< NAME >::m_optionsSame [protected] |