Classes | |
| struct | GF_BaseInterface |
| Base Interface. More... | |
Defines | |
| #define | GF_DECL_MODULE_INTERFACE |
| common module interface | |
| #define | GF_REGISTER_MODULE_INTERFACE(_ifce, _ifce_type, _ifce_name, _ifce_author) |
| module interface registration | |
Typedefs | |
| typedef __tag_mod_man | GF_ModuleManager |
Functions | |
| GF_ModuleManager * | gf_modules_new (const char *directory, GF_Config *cfgFile) |
| module manager construtcor | |
| void | gf_modules_del (GF_ModuleManager *pm) |
| module manager destructor | |
| u32 | gf_modules_refresh (GF_ModuleManager *pm) |
| refreshes modules | |
| u32 | gf_modules_get_count (GF_ModuleManager *pm) |
| get module count | |
| const char * | gf_modules_get_file_name (GF_ModuleManager *pm, u32 index) |
| get module file name | |
| GF_BaseInterface * | gf_modules_load_interface (GF_ModuleManager *pm, u32 index, u32 InterfaceFamily) |
| loads an interface | |
| GF_BaseInterface * | gf_modules_load_interface_by_name (GF_ModuleManager *pm, const char *mod_name, u32 InterfaceFamily) |
| loads an interface by module name | |
| GF_Err | gf_modules_close_interface (GF_BaseInterface *interface_obj) |
| interface shutdown | |
| const char * | gf_modules_get_option (GF_BaseInterface *interface_obj, const char *secName, const char *keyName) |
| interface option query | |
| GF_Err | gf_modules_set_option (GF_BaseInterface *interface_obj, const char *secName, const char *keyName, const char *keyValue) |
| interface option update | |
| GF_Config * | gf_modules_get_config (GF_BaseInterface *ifce) |
| get config fiole | |
Bool QueryInterface(u32 interface_type);
GF_BaseInterface *LoadInterface(u32 interface_type);
void ShutdownInterface(GF_BaseInterface *interface);
struct { GF_DECL_MODULE_INTERFACE extensions; };
| #define GF_DECL_MODULE_INTERFACE |
This is the module interface declaration macro. It must be placed first in an interface structure declaration.
| #define GF_REGISTER_MODULE_INTERFACE | ( | _ifce, | |||
| _ifce_type, | |||||
| _ifce_name, | |||||
| _ifce_author | ) |
This is the module interface registration macro. A module must call this macro whenever creating a new interface.
GF_BaseInterface *MyDecoderInterfaceLoad() { GF_MediaDecoder *ifce; GF_SAFEALLOC(ifce, GF_MediaDecoder); GF_REGISTER_MODULE_INTERFACE(ifce, GF_MEDIA_DECODER_INTERFACE, "Sample Decoder", "The Author") //follows any initialization private to the decoder return (GF_BaseInterface *)ifce; }
| GF_ModuleManager* gf_modules_new | ( | const char * | directory, | |
| GF_Config * | cfgFile | |||
| ) |
Constructs a module manager object.
| directory | absolute path to the directory where the manager shall look for modules | |
| cfgFile | GPAC configuration file handle. If this is NULL, the modules won't be able to share the configuration file with the rest of the GPAC framework. |
| void gf_modules_del | ( | GF_ModuleManager * | pm | ) |
Destroys the module manager
| pm | the module manager |
| u32 gf_modules_refresh | ( | GF_ModuleManager * | pm | ) |
Refreshes all modules in the manager directory and load unloaded ones
| pm | the module manager |
| u32 gf_modules_get_count | ( | GF_ModuleManager * | pm | ) |
Gets the number of modules found in the manager directory
| pm | the module manager |
| const char* gf_modules_get_file_name | ( | GF_ModuleManager * | pm, | |
| u32 | index | |||
| ) |
Gets a module shared library file name based on its index
| pm | the module manager | |
| index | the 0-based index of the module to query |
| GF_BaseInterface* gf_modules_load_interface | ( | GF_ModuleManager * | pm, | |
| u32 | index, | |||
| u32 | InterfaceFamily | |||
| ) |
Loads an interface in the desired module.
| pm | the module manager | |
| index | the 0-based index of the module to load the interface from | |
| InterfaceFamily | type of the interface to load |
| GF_BaseInterface* gf_modules_load_interface_by_name | ( | GF_ModuleManager * | pm, | |
| const char * | mod_name, | |||
| u32 | InterfaceFamily | |||
| ) |
Loads an interface in the desired module
| pm | the module manager | |
| mod_name | the name of the module (shared library file) or of the interface as declared when registered. | |
| InterfaceFamily | type of the interface to load |
| GF_Err gf_modules_close_interface | ( | GF_BaseInterface * | interface_obj | ) |
Closes an interface
| interface_obj | the interface to close |
| const char* gf_modules_get_option | ( | GF_BaseInterface * | interface_obj, | |
| const char * | secName, | |||
| const char * | keyName | |||
| ) |
Gets an option from the config file associated with the module manager
| interface_obj | the interface object used | |
| secName | the desired key parent section name | |
| keyName | the desired key name |
| GF_Err gf_modules_set_option | ( | GF_BaseInterface * | interface_obj, | |
| const char * | secName, | |||
| const char * | keyName, | |||
| const char * | keyValue | |||
| ) |
Sets an option in the config file associated with the module manager
| interface_obj | the interface object used | |
| secName | the desired key parent section name | |
| keyName | the desired key name | |
| keyValue | the desired key value |
| GF_Config* gf_modules_get_config | ( | GF_BaseInterface * | ifce | ) |
Gets the configuration file for the module instance
| interface_obj | the interface object used |
1.4.7