Parameters

Various properties (such as the audio volume) can be controlled by attaching parameters to a context or to its input or output. Parameters are represented as dictionary objects, collections of key-value pairs, where both the key and the value are strings. The parameters that apply to the context and its input and output depend on the media types that are attached.

Whether attaching parameters to the context or its input or output, your application has to call strm_dict_new() to create a new dictionary object if none exists. Use strm_dict_set() to set the key-value pairs for the parameters you want to attach.

To attach parameters to the context, call the function mmr_context_parameters(), passing the handle to the dictionary object that holds the context parameters. Similarly, call the function mmr_input_parameters() to attach the input parameters, and call the function mmr_output_parameters() to attach the output parameters. In each case, pass a handle to a separate dictionary object that's populated with the appropriate parameter key-value pairs.

To modify parameters, call the appropriate function again, passing a handle to a dictionary object populated with the new parameters. Note that the mmr_*_parameters() functions consume the dictionary object handle. If you want to keep the object, call the function strm_dict_clone() to duplicate the handle before calling one of the parameter functions.