Properties reported by an mm-renderer event


All the mm-renderer properties reported by the event, represented as a dictionary object stored in the data field of the mmr_event_t data structure. Some events, such as STATE, ERROR, and WARNING events, have all their properties pre-parsed into other mmr_event_t fields, so no additional information can be found in the data field. Other events, notably events that indicate updates to mm-renderer parameters or metadata, have most of their properties stored in the data field, so clients must extract this information from the dictionary.

Which properties are stored in the dictionary depends also on the configuration of the attached input and outputs. For instance, the properties returned with events that indicate updates to input, track, or output parameters consist of the latest parameters the client passed into the Client API, plus the track URL and type. The properties returned with METADATA events vary with the input properties (e.g., the file format, and whether the input is a track or playlist).

To look up parameter values in a strm_dict_t dictionary object by name, see the strm_dict_find_value() function in the Dictionary Object API.

The event types with information stored in the data field, and the associated dictionary contents are as follows:
Event type Property name Description
MMR_EVENT_STATUS position Playback position. This is the same value stored in the pos_str field in the mmr_event_t structure.
bufferstatus Status or current activity of the buffer: buffering, playing, or idle
bufferlevel Buffer usage level, represented by two decimal numbers (in milliseconds) separated by a slash: level/capacity
volume Available only for audio recording. The current volume level of the input signal against the maximum volume level, separated by a slash: current_level/maximum_level
MMR_EVENT_METADATA md_title_name Track name
md_title_artist Artist name
md_title_album Album name
md_title_genre Genre (classical, rock, funk, etc.)
md_title_comment Text information about the track. The source of this information depends on the track format. For example, the information is taken from the COMM frame for ID3 tracks.
md_title_duration Track length
md_title_track Track number (if track was ripped from CD)
md_title_disc Disc number (if track was ripped from multi-disc album)
md_title_samplerate Number of samples taken from input signal per time unit (typically, a second) during recording. For audio content, this field refers to the audio sampling rate; for video, it's the video frame rate.
md_title_bitrate Track bit rate. This is only an approximate value, based on the total bit rate from all media streams in the input track and ignoring any potential variation in bit rate throughout playback.
md_title_protected Boolean attribute (either 0 or 1) indicating if track is DRM-protected
md_title_seekable Boolean attribute (either 0 or 1) indicating if track supports seeking
md_title_pausable Boolean attribute (either 0 or 1) indicating if track can be paused
md_title_mediatype Track media type (2 for video only, 4 for audio only, and 6 for audio and video)
md_video_width Video width, in physical units
md_video_height Video height, in physical units
md_video_pixel_width Video width, in pixels
md_video_pixel_height Video height, in pixels
md_video_capture_format Media file format in which video was recorded
MMR_EVENT_PLAYLIST All playlist information fields Playlist information fields contained in the mmr_event_playlist structure, which is stored in the details field of the mmr_event structure for playlist events.
MMR_EVENT_INPUT All input parameters and the input URL and type Input parameters specified in the last call to mmr_input_parameters(), and the input URL and type specified in the last call to mmr_input_attach(). Some input parameters may have been changed by mm-renderer.
MMR_EVENT_OUTPUT All output parameters and the output URL and type Output parameters specified in the last call to mmr_output_parameters(), the output type specified in the last call to mmr_output_attach(), and the output URL specified in the last call to either of these two functions.
MMR_EVENT_CTXTPAR All context parameters Context parameters specified in the last call to mmr_context_parameters().
MMR_EVENT_TRKPAR All track parameters Track parameters specified in the last call to mmr_track_parameters().