mmr_track_parameters()

Set track parameters.

Synopsis:

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

Since:

BlackBerry 10.0.0

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:

libmmrndclient (For the qcc command, use the -l mrndclient option to link against this library)

Description:

Set track parameters. This function can be used when the input type is "playlist" or "autolist".

When the input type is "playlist", the input parameters only apply to the playlist file, and the default track parameters are empty. You can call mmr_track_parameters(ctxt,0,parms) to set the default track parameters before attaching the input.

When the input type is "autolist", any input parameters you set before attaching the input become the track parameters for track 1. You set the track parameters for an autolist by calling mmr_track_parameters(ctxt,1,parms). After the input is attached, input parameters are ignored, and any changes to them will have no effect.

The index specifies the track that these parameters are applied to. The index value must be within range of the current playlist window; otherwise, the function call fails. An index of zero specifies the default parameters given to a new track that enters the playlist window. You can set the default parameters by calling mmr_track_parameters(ctxt,0,parms) before attaching the input.

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:

  • OPT_VERBOSE
  • OPT_CONNECTTIMEOUT_MS
  • OPT_LOW_SPEED_LIMIT
  • OPT_LOW_SPEED_TIME
  • OPT_USERAGENT
  • OPT_USERNAME
  • OPT_PASSWORD
  • OPT_PROXYUSERNAME
  • OPT_PROXYPASSWORD
  • OPT_COOKIE
  • OPT_COOKIEFILE
  • OPT_COOKIEJAR
  • OPT_COOKIESESSION
  • OPT_CAINFO
  • OPT_CAPATH
  • OPT_SSL_VERIFYPEER
  • OPT_SSL_VERIFYHOST
  • OPT_PROXY
  • OPT_NOPROXY
  • OPT_HTTPPROXYTUNNEL
  • OPT_PROXYPORT
  • OPT_PROXYTYPE
  • OPT_PROXYAUTH
  • OPT_HTTPAUTH
  • OPT_HTTPHEADER
  • OPT_DNSCACHETIMEOUT

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()).

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus