ClassData Functions¶
All plugin types that support media can use these callbacks to share information associated with their classID.
For example, these plugins can confirm their hardware is present and operational using the ClassData functions.
They all call getClassData
during initialization. If getClassData
returns 0, the module checks for and initialize the hardware.
It then calls setClassData to store information about the current context. Use handles, not pointers, for storing info.
typedef struct {
SetClassDataFunc setClassData;
GetClassDataFunc getClassData;
} ClassDataFuncs, *ClassDataFuncsPtr;
Function |
Description |
|
Writes class data, destroys previous data. int setClassData (
unsigned int theClass,
void *info);
Note that all plugins that share the data must use the same data structure. |
|
Retrieves the class data for the given class. int getClassData (
unsigned int theClass);
|