mmr_input_parameters()

Updated: October 26, 2022

Set input parameters

Synopsis:

#include <mm/renderer.h>
int mmr_input_parameters(mmr_context_t *ctxt,
                         strm_dict_t *parms)

Arguments:

ctxt
A handle to the context for which the input is being configured
parms

A handle to a dictionary containing the input parameters to set (must not be NULL). Any previous parameters are overridden.

The strm_dict_t object becomes API property after this call, even if it fails. You should not use or destroy the dictionary after passing it to this function.

Library:

mmrndclient

Description:

Set input parameters. These parameters affect how mm-renderer accesses the input. Some parameters must be set before the input is attached because setting them afterwards has no effect. When the input is attached, its type and URL format determine which additional input parameters are processed by mm-renderer. Parameters that aren't applicable are ignored.

All input parameters are cleared when the input is detached, whether explicitly through a call to mmr_input_detach() or implicitly when mmr_input_attach() is called to attach a new input.

Note: An individual playlist item isn't considered an input but the whole playlist is. For playlists, any input parameters that you set will apply to the playlist file. To set parameters for individual playlist items, you must use mmr_track_parameters().

Some mm-renderer plugins don't return errors when you provide unacceptable parameter values. Instead, these plugins revert bad parameters to their previous values or to their default values (for parameters that you set for the first time). To see which values were accepted or changed, you can examine the parameters reported in the data dictionary field of the mmr_event_t structure returned for MMR_EVENT_INPUT events.

For HTTP-based inputs, you can set input parameters that map to libcurl options. These are the same libcurl options that you can define through context parameters. For any options defined in this other set but also in the input parameters, the input parameter settings take precedence.

Returns:

Zero on success, -1 on failure (use mmr_error_info())