Set input parameters.
int mmr_input_parameters( mmr_context_t *ctxt, strm_dict_t *parms )
- A context handle.
- A dictionary object containing the parameters to set (handle gets consumed by this call, even on failure).
Set parameters associated with the attached input.
Some plugins used by mm-renderer can change input parameter values if the provided values are not acceptable for the attached input. You can examine the input parameters returned through the Event API to see which values were accepted and which ones were changed (see ).
The input type and the URL format determines which input parameters you can set. Some parameters must be set before the input is attached, because setting them after attaching the input has no effect. 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, which causes mm-renderer to detach the current input.
The parameters supported for the "playlist" and "autolist" input types are:
- Continuously replay the input. Acceptable values are "none" (default), "track", or "all".
When using the "autolist" or "track" input types with a URL that starts with audio:, you can set one of the following two parameters:
- Classify the audio track based on its content (voice, ring tones, video chat, etc.). This parameter provides a shortcut for setting the audio type, thereby simplifying your client code. By using this parameter, you can avoid making the multiple Audio Manager API calls required to obtain an audio manager handle and then use that handle to set the audio type. The audio type is specified as a string, whose value is one of the audio types defined by the AUDIO_TYPE_NAMES set of string constants, which is documented in the Audio Manager Library reference.
- Associate an audio manager handle with the audio stream managed by the current context. This parameter lets you control multiple audio stream settings. To obtain a value for this parameter, call the audio_manager_get_handle() API function, passing in the desired audio type. You can then use this handle to change the audio type and other audio stream characteristics through the Audio Manager API. Refer to the audio routing functions described in the Audio Manager Library reference for more information.
Zero on success, -1 on failure (use mmr_error_info().
See the mmr_output_parameters() examples for demos on how to set each of the audio_type and audioman_handle parameters.