Attach an input.
#include <mm/renderer.h>
int mmr_input_attach( mmr_context_t *ctxt, const char *url, const char *type )
Attach an input file, device, or playlist. If the context already has an input, the function detaches 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 differently for each of the supported input types. Also, mmr_list_change() and mmr_track_parameters() apply to "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" and "autolist" input types are:
snd:/dev/snd/pcmPreferredc?frate=44100&nchan=2Supported options include:
audio:voice?nchan=1&frate=44100&depth=16Currently, this URL format works only with the "file" output type. Client applications should use audio:default to specify automated routing for the audio stream unless there's a good reason to use one particular device. 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 outputted or an error returned to the client.
Valid input URLs for the "playlist" input type are:
Zero on success, -1 on failure (use mmr_error_info()).
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |