This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
The phplay plugins have four entry points. These include MvInit(), and three "calls" pointers:
MvInit() passes back function pointers to these in the calls structure of the MvPluginCtrl_t structure as part of the MvInit() function.
MvInit() initializes the plugin after it's been loaded.
typedef int MvInitF_t( MvPluginCtrl_t * pctrl ); extern MvInitF_t MvInit;
The plugins generate events for the player. To do this, the media player has to set the MvPluginCtrl_t->MvViewerCallbackF_t member variable cb.
/*implemented in phplay*/ typedef void MvViewerCallbackF_t( MvPluginCtrl_t *ctrl, MvEventFlags_t change, MvPluginStatus_t const *status );
A specific callback handler example is provided in the documentation for each plugin. |
Before calling MvInit(), you have to:
In the plugin, declare:
static const MvPluginFunctions_t calls = { local_terminate, local_get_item, local_command };
MvInit() assigns values to the MvPluginCtrl_t->MvPluginFunctions_t member variable calls. This provides the media player with the function pointers below:
struct MvPluginFunctions { void (*terminate)( MvPluginCtrl_t *pdata ); MvMediaInfo_t const *(*get_item)( MvPluginCtrl_t *pdata, MvMediaInfoFlag_t which, unsigned index ); int (*command)( MvCommandData_t * cmdData ); /* MvCommandData includes MvPluginCtrl_t pointer*/ };
A call to MvInit() sets the MvPluginCtrl_t.MvPluginFlags_t pflags value to one of: