Attach an input
#include <mm/renderer.h>
int mmr_input_attach( mmr_context_t *ctxt, const char *url, const char *type )
Attach an input track or playlist. If the context already has an input, the function detaches it first.
The input type affects 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:
An http: or https: URL containing the full path of an HTTP-accessible file or an HTTP stream. When the URL refers to a file, the http: prefix is optional.
HTTP Live Streaming (HLS) is supported just as any HTTP stream, with the following caveats:
The mm-renderer service supports HLS version 3, with media segments encoded as follows:
rtsp://username:password@10.222.97.225/axis-media/media.amp
rtp://@:49152This will listen for an RTP stream on port 49152. This URL type is useful if you want to configure a camera to stream to a QNX Neutrino host.
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. In this case, 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 |