GetInfo()

Updated: April 19, 2023

Synopsis:

#include <aoi.h>

int32_t (*GetInfo)(void *ctx, AOStreamerMimeInfo_t *buf);

Arguments:

ctx
The context for the streamer whose MIME type and file extension you want to get.
buf
A pointer to memory for storing an AOStreamerMimeInfo_t structure that will contain the MIME and file information. This structure has the following members:
const char *mimetype
An immutable string containing the MIME type.
const char *extension
An immutable string containing the file extension.

Description:

This function is meant to find the MIME type and file extension supported by the given streamer and to write this information into the given structure. The values written to the mimetype or extension fields can be NULL if these properties are not applicable or their values are unknown.

You can use this function to optimize code that looks for addon streamers. For example, the reported file extension can be rated by the AOExtInspector interface and the MIME type by the AOMimeTypeInspector interface.

Returns:

0 if successful, -1 if an error occurred.