Updated: April 19, 2023 |
Set input parameters
#include <mm/renderer.h>
int mmr_input_parameters(mmr_context_t *ctxt, strm_dict_t *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.
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.
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.
Zero on success, -1 on failure (use mmr_error_info())