Get information about plugins


#include <mm/renderer.h>
ssize_t mmr_plugin_info(mmr_connection_t *connection,
                        strm_dict_t *buf[],
                        size_t blen)


An mm-renderer connection handle
A buffer for storing the dictionary references (can be NULL if blen is zero)
The length of the buffer (can be zero)




Get information about the loaded plugins that manage media flows. This information includes supported MIME types. The function writes details about each plugin into a separate dictionary and stores references to the dictionary objects in the buf array.

The blen parameter restricts the maximum number of dictionaries created and of references written into buf. You can set blen to 0 and buf to NULL to make the function return the total number of loaded plugins, which you can use to allocate sufficient memory for buf. In each array entry, you must store the handle returned in a separate call to strm_dict_new(), which creates an empty dictionary. Then, you can call mmr_plugin_info() again with blen set to the value returned by the first call to this function, to obtain information about all loaded plugins.

The dictionary created for each plugin contains these entries:
  • dll, whose value stores the name of the binary, as passed to dlopen()
  • plugin, whose value stores the plugin's description
  • entries that the plugin decided to add. Currently, only one entry is defined:
    • mime, whose value is a comma-separated list of MIME types the plugin can play

Because different plugins can support different MIME types, if you want the full list of supported MIME types, you must concatenate the lists from all of the dictionaries.

When you're finished using these dictionaries, you need to destroy them with strm_dict_destroy().


On success, the total number of loaded plugins (which may be greater than blen). On failure, -1 (errno is set and the contents of buf are undefined).