Context state
Every time you create
a context by calling mmr_context_create(),
mm-renderer also creates a context directory with the same name.
For instance, creating a context named movie1 creates a directory
named /pps/services/multimedia/renderer/context/movie1.
Inside each context directory, mm-renderer creates several objects
(files) that hold the state of the context. When an input is attached to the context,
additional objects may be created in the context directory, depending on the input type.
The state of a context is represented by the following objects (files), where the
# character indicates a numeric value encoded as decimal:
- param — contains the parameters set with
mmr_context_parameters().
- output# — created when an output is attached; deleted when detached.
The # token is the output ID returned by
mmr_output_attach(). This object contains the URL, output type,
and the latest parameters set with mmr_output_parameters().
- input — populated when an input is attached, emptied when detached.
This object contains the URL, input type, and the latest parameters set with
mmr_input_parameters().
- status — a snapshot of the current status. This is potentially high
bandwidth, so delta mode shouldn't be used to read this object. This object holds
information on the playback position, the buffer capacity, and the buffer
activity.
- state — the play state. This object is intended to be read in delta
mode, otherwise errors or warnings may be lost. The state object may have
the following attributes, depending on the play state:
- state — playing, stopped, or idle
- speed — the current set speed in units of 1/1000th of normal
speed
- warning — the most recent warning (deleted when playback is
stopped)
- warning_pos — the play position when the warning happened
- error — the most recent error code (deleted when playback is
restarted)
- error_pos — the play position when the error happened