int (* output_log)(
    void *s,
    int level,
    const char *fmt,
    va_list args


Parameter Description
s The value of the LogCbParam parameter that is set when the preconfig function is called. RTS SDK returns the initial value to output_log.
level The level of the log entry.
fmt The formatted string. It is the same as the format parameter in printf.
args The list of variable parameters.

Log entry levels

Level Description
0 Error
1 Warning
2 Info
3 Debug


For information about how to configure the callback function of external logs for RTS SDK by calling the preconfig function, click Download SDK to see the rtsdec.c file in the RTS SDK for a mobile client.

// Call a callback function.
static int output_log(struct AVFormatContext *s, int level, const char *fmt, va_list args)
    // TODO: processes logs.
    return 0;

// Provide the callback function for RTS SDK.
__rts_funcs->preconfig("LogCallback", addr_to_string(output_log, buf));
__rts_funcs->preconfig("LogCbParam", addr_to_string(s, buf));