mmr_track_parameters()

Set track parameters.

Synopsis:

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

Arguments:

ctxt
A context handle.
index
Zero to set the default parameters, or a nonzero index within the current playlist window.
parms
A dictionary containing the track parameters to set. Use NULL to reset the parameters of the specified track to the default values assigned to track 0. Any previous parameters are overridden.

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

Library:

mmrndclient

Description:

Set track parameters. This function can be used when the input type is "playlist" or "autolist". When the input type is "track", this function has no effect.

For "playlist" inputs, index specifies the track that these parameters are applied to. The provided index must be within range of the current playlist window or the function call will fail. An index of zero specifies the default parameters given to a new track when it enters the playlist window.

For "autolist" inputs, any input parameters that you set before attaching the input are taken as the initial track parameters (because the single track is the input). If you want to change them after attaching the input, use mmr_track_parameters(). Changes to input parameters other than repeat are ignored.

Some mm-renderer plugins don't return errors when you provide unacceptable values for track parameters. 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, client applications can examine the parameters that the Event API returned.

When the input URL starts with audio:, you can set one of the following two parameters:

audio_type
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. You can use this parameter instead of using the Audio Manager API to obtain an audio manager handle, and then using that handle to set the audio type.

The audio type is specified as a string that's set to one of the audio types defined by AUDIO_TYPE_NAMES, which is documented in the Audio Manager Library reference.

audioman_handle
Associate an audio manager handle with the audio stream that the current context manages. To obtain a value for this parameter, call the audio_manager_get_handle() API function and pass 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. For more information, refer to the audio routing functions described in the Audio Manager Library reference.

When the input URL starts with http: or https:, you can set the following parameters that map to libcurl options:

Note: You can set these same libcurl options through the context or input parameters. For any options defined in either the context or input parameters but also in the track parameters, the track parameter settings take precedence.

Returns:

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

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes

Examples:

See the mmr_output_parameters() examples for demos on how to set each of the audio_type and audioman_handle parameters.