Attach an output.


#include <mm/renderer.h>
int mmr_output_attach( mmr_context_t *ctxt, 
                       const char *url, 
                       const char *type )


A context handle
The URL of the new output
The media type of the output type. Possible values are "audio", "video", and "file" (quotes are required).




Attach an output to the context and return its output ID (a small non-negative integer, unique for this context). An output can be an audio or video device, a combined audio/video device (such as a DSP directly connected to output hardware), or a file. The types of outputs attached to a context may affect the set of operations that the context will allow. For instance, when "playing" to a file (i.e. ripping), seeking or trick play may not be supported.

Although the API allows requesting multiple outputs of the same type, this may not be supported by all player module implementations. Attaching or detaching outputs while the context has an input may not be supported, either.

Valid output URLs for the "audio" output type are of the following two forms:

  • "audio: name", where name is one of default, hdmi, or main; and
  • "snd: device", where device is the path of an io-audio output device, such as /dev/snd/pcmPreferredp)

Valid output URLs for the "video" output type are of the following form:

In the video URL:
  • window_group is the window group name of the application's top-level window
  • window_id is the window ID for the window where the video output will be rendered
  • The parameter setting initflags=invisible is optional, and causes the window to be invisible upon creation. This flag allows you to adjust window properties such as size, position, and z-order before making it visible. For more information, see Managing video windows

Valid output URLs for the "file" output type are of the form "file: path", where path is the full filepath. The file: prefix is optional. The following file types (and their extensions that can go in the URL) are supported:

  • Waveform Audio File Format (.wav)
  • MPEG 4 Audio (.m4a)
  • Adaptive Multi-Rate (.amr)
  • 3GPP file format (.3gp)
  • Adaptive Multi-Rate Wideband (.awb)
  • Qualcomm PureVoice (.qcp)


A non-negative output ID on success, -1 on failure (use mmr_error_info() )


QNX Neutrino

Interrupt handler No
Signal handler No
Thread Yes