mmr_input_attach()

Attach an input.

Synopsis:

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

Arguments:

ctxt
A context handle.
url
The URL of the new input.
type
The input type. Possible values are "track", "playlist", and "autolist" (quotes are required), with the following meanings:
track
One track played in isolation from the rest of the media
playlist
A track sequence, with ordering information and track metadata contained in a playlist file
autolist
A single track formatted as a playlist; you can play the track continuously using the repeat input parameter

Library:

mmrndclient

Description:

Attach an input file, device, or playlist. If the context already has an input, detach it first.

The input type determines how mm-renderer responds to certain playback requests. For example, when seeking to track positions using mmr_seek(), you must specify the desired position one way for the "track" type, and another way for the "autolist" or "playlist" type. Also, mmr_list_change() is supported for "playlist" only. Which input types are supported depends on the configuration of mm-renderer; however, the playback behavior for a given input type does not depend on the configuration.

Valid input URLs for the "track" or "autolist" input types are:

Valid input URLs for the "playlist" input type are:

Note: Not all defined audio devices may work with the current application. It's the client's responsibility to determine if a particular device is supported before trying to use it. See the mmr_output_attach() example for a demo of how to check if an audio device is supported before configuring the audio routing.

Returns:

Zero on success, -1 on failure (use mmr_error_info()).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes

Example:

See the mmr_output_attach() example for a demo of how to select one audio device to use.