Updated: October 28, 2024 |
Get information about plugins
#include <mm/renderer.h>
ssize_t mmr_plugin_info(mmr_connection_t *connection, strm_dict_t *buf[], size_t blen)
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.
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).