Syntax

Sets global parameters. You must call the preconfig function before you call the open function. This function is displayed as a function pointer in rts_glue_funcs.

int (* preconfig)(
    const char *key,
    const char *val
);

Parameters

Parameter Description
key The name of the parameter. The name is case sensitive.
val The value of the parameter.

Supported parameters

Parameter Description
AutoReconnect Specifies whether to enable automatic reconnection if RTS SDK detects a disconnection. By default, automatic reconnection is enabled.
BufferingDuration Configures the duration of the jitter buffer. Default value: 500 ms.
LogCallback Configures the callback function of external logs. This parameter takes effect only when the LogCbParam parameter is also specified.
LogCbParam Sets parameters for the callback function of external logs. This parameter takes effect only when the LogCallback parameter is also specified.
LogToConsole Specifies whether to push built-in logs to the ApsaraVideo Live console. By default, built-in logs are not pushed to the ApsaraVideo Live console.
LogToFile Specifies whether to export built-in logs to a file. By default, built-in logs are not exported to a file.
LogToServer Specifies whether to push built-in logs to a server. By default, built-in logs are not pushed to a server.
LogLevel Configures the level of log output. Default value: LOG_INFO=2.
MessageCallback Configures the message callback function. This parameter takes effect only when the MessageCbParam parameter is also specified.
MessageCbParam Sets parameters for the message callback function. This parameter takes effect only when the MessageCallback parameter is also specified.
AacdCreateCallback Configure the Microsoft Media Foundation AAC decoder to create a callback.
AacdDecodeCallback Configure the Microsoft Media Foundation AAC decoder to decode a callback.
AacdCloseCallback Configure the Microsoft Media Foundation AAC decoder to remove a callback.
HelpSupportIDPrefix Specifies the prefix of the help support id parameter.

Response parameters

If 0 is returned, the call is successful. If not, the call fails.