Attach an output.
#include <mm/renderer/renderer.h>
int mmr_output_attach(mmr_context_t *ctxt,
const char *url,
const char *type)
BlackBerry 10.0.0
A context handle.
The URL of the new output.
The output type. Possible values are "audio", "video", "subpicture" and "file".
Attach an output and return its output ID (a non-negative integer, unique for this context). An output can be an audio or video device, 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, seeking or trick play may not be supported.
Attaching multiple outputs of the same type is not supported. Attaching or detaching outputs while the context has an input is not supported, either.
To set up a video with closed captions, you need to attach two outputs to the context, one of the "video" type and the other of the "subpicture" type, where the subpicture window is positioned on top of the output window. The captions are sent to the subpicture output, which allows the closed caption text to be seen in front of the video, which can still be seen through the transparent background of the subpicture.
Valid URLs for the "audio" output type are in one of the following forms:
The mm-renderer service opens the device named in the URL. Client applications can use audio:default to specify automated routing for the audio stream. When a non-default device is named, the audio stream routing depends solely on that device. For instance, the removal of the device could result in no audio being output, or an error returned to the client.
Note: Not all defined audio devices may work with the current application. It is the client's responsibility to determine if a particular device is supported before trying to use it.
Valid output URLs for the "video" and "subpicture" output types are of the following form:
screen:?wingrp=window_group&winid=window_id&nodstviewport=1&initflags=invisible
In the video URL:
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, which must be present in the URL) are supported:
mm-renderer will reject any file: output URLs that do not contain one of the listed file extensions.
Note: When using the BlackBerry 10 Device Simulator, the output file must be a .wav file. To test other output file formats, you must use real hardware.
A non-negative output ID on success, -1 on failure (use mmr_error_info()).