# opalplugin.hpp File Reference

`#include "opalplugin.h"`
`#include <string.h>`
`#include <stdlib.h>`
`#include <limits.h>`
`#include <map>`
`#include <string>`
`#include <sstream>`

Include dependency graph for opalplugin.hpp:

Go to the source code of this file.

## Data Structures

class | PluginCodec_MediaFormat
class | PluginCodec< NAME >

## Defines

#define | PLUGINCODEC_TRACING 1
#define | PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF
#define | PLUGINCODEC_CONTROL_LOG_FUNCTION_INC { PLUGINCODEC_CONTROL_SET_LOG_FUNCTION, PluginCodec_SetLogFunction },
#define | PTRACE_CHECK(level) (PluginCodec_LogFunctionInstance != NULL && PluginCodec_LogFunctionInstance(level, NULL, 0, NULL, NULL))
#define | PTRACE(level, section, args)

## Functions

int | PluginCodec_SetLogFunction (const PluginCodec_Definition *, void *, const char *, void *parm, unsigned *len)

## Variables

PluginCodec_LogFunction | PluginCodec_LogFunctionInstance

## Define Documentation

#define PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF

Value:

    PluginCodec_LogFunction PluginCodec_LogFunctionInstance; \
      int PluginCodec_SetLogFunction(const PluginCodec_Definition *, void *, const char *, void * parm, unsigned * len) \
      { \
        if (len == NULL || *len != sizeof(PluginCodec_LogFunction)) \
          return false; \
     \
        PluginCodec_LogFunctionInstance = (PluginCodec_LogFunction)parm; \
        if (PluginCodec_LogFunctionInstance != NULL) \
          PluginCodec_LogFunctionInstance(4, __FILE__, __LINE__, "Plugin", "Started logging."); \
     \
        return true; \
      } \

#define PLUGINCODEC_CONTROL_LOG_FUNCTION_INC { PLUGINCODEC_CONTROL_SET_LOG_FUNCTION, PluginCodec_SetLogFunction },

#define PLUGINCODEC_TRACING 1

#define PTRACE | ( | level,
|  | section,
|  | args |  | ) |

Value:

    if (PTRACE_CHECK(level)) { \
            std::ostringstream strm; strm << args; \
            PluginCodec_LogFunctionInstance(level, __FILE__, __LINE__, section, strm.str().c_str()); \
          } else (void)0

#define PTRACE_CHECK | ( | level |  | ) | (PluginCodec_LogFunctionInstance != NULL && PluginCodec_LogFunctionInstance(level, NULL, 0, NULL, NULL))

## Function Documentation

int PluginCodec_SetLogFunction | ( | const PluginCodec_Definition * | ,
|  | void * | ,
|  | const char * | ,
|  | void * | parm,
|  | unsigned * | len |
| ) |  |  |

## Variable Documentation

PluginCodec_LogFunction PluginCodec_LogFunctionInstance