mmr_output_attach()

Attach an output

Synopsis:

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

Arguments:

ctxt
A handle to the context to which the output is being attached
url
The URL of the new output. The URL format depends on the type setting.
type
The output type. This string must be one of audio, video, subpicture, or file.

Library:

mmrndclient

Description:

Attach an output to the context and get its output ID. The ID is a non-negative integer, unique for this context. You must call this function when no input is defined for the context; otherwise, the function fails because mm-renderer currently doesn't allow for output attachments when an input is defined.

An output can be an audio or a video device, a combined audio/video device (such as a DSP directly connected to hardware), or a file. At this time, mm-renderer doesn't allow you to define multiple outputs of the same type.

Returns:

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