data

Updated: May 06, 2022

Properties reported by an mm-renderer event

Description:

All mm-renderer properties reported by an event, represented as a dictionary. For some events, such as STATE, ERROR, and WARNING events, all properties are stored in other mmr_event_t fields, so no additional information can be found in the data member. For other events, notably those that indicate parameter or metadata updates, most properties are stored in data.

Which properties are stored depends also on the configuration of the attached input and outputs. For instance, events related to input, track, or output parameter updates contain the latest parameters that the client passed into the mm-renderer API, plus the track URL and type. With METADATA events, the properties vary depending on the file format and whether the input is a track or playlist. To look up parameter values in a dictionary by name, use the strm_dict_find_value() Dictionary API function.

The following table lists event types for which the data field is defined. For each event type, the structure stored in the details field and the dictionary contents stored in data are listed:
Event type Corresponding details member Property name Description
MMR_EVENT_STATUS None position Playback position. This is the same value stored in the mmr_event_t pos_str field.
bufferstatus Status or current activity of the buffer: buffering, playing, or idle
bufferlevel Buffer usage level, represented by two decimal numbers (representing milliseconds) separated by a slash: level/capacity
subpicture Subpicture status: on when a subtitle was sent to the output, off when the subtitle was erased
suspended Whether playback is suspended (yes or no). Playback could be suspended when it reaches a certain point, based on the audio configuration.
audio_track Index of the currently playing audio track within the metadata set. This property is present when there's audio content in the input file and an audio output is attached.
video_track Index of the currently playing video track within the metadata set. This property is present when there's video content in the input file and a video output is attached.
subpicture_track Index of the currently playing subtitle track within the metadata set. This property is present when there are subtitles in the input file and a subpicture output is attached.
volume For audio recording, the input's current volume level against its maximum volume level, as follows: current_level/maximum_level
MMR_EVENT_METADATA metadata URL URL of the track whose metadata has changed
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 is format-specific.
md_title_duration Track length
md_title_track Track number (if ripped from a CD)
md_title_disc Disc number (if ripped from a multi-disc album)
md_title_bitrate Track bit rate. This is an approximation, based on the total bit rate from all input media streams and ignoring any variation during playback.
md_title_protected Whether the track is DRM-protected (either 0 or 1)
md_title_seekable Whether the track supports seeking (either 0 or 1)
md_title_pausable Whether the track can be paused (either 0 or 1)
md_title_mediatype Track media type (2 for video only, 4 for audio only, and 6 for audio and video)
md_title_compilation Compilation name
md_title_albumartist Name of the artist of the album artwork
md_title_composer Composer name
md_title_year Year of release
md_title_rating Album rating
md_title_art Number of artwork images in the media file
md_audio_track#a Metadata describing the audio stream with index # in the input file. The value is a list of properties and should be parsed with mmr_metadata_split().
md_video_track#a Metadata describing the video stream with index # in the input file. The value is a list of properties and should be parsed with mmr_metadata_split().
md_subpicture_track#a Metadata describing the subpicture stream with index # in the input file. The value is a list of properties and should be parsed with mmr_metadata_split().
md_title_image#a Metadata describing the title image with index # in the input file. The value is a list of properties and should be parsed with mmr_metadata_split().
MMR_EVENT_INPUT None URL Input URL specified in the last call to mmr_input_attach().
type Input type specified in the last call to mmr_input_attach().
All input parameters Input parameters, which may have been changed since the last mmr_input_parameters() call.
MMR_EVENT_OUTPUT output URL Output URL specified in the mmr_output_attach() call that defined the output whose ID is stored in the output structure.
type Output type specified in the same mmr_output_attach() call that defined the URL.
All output parameters Output parameters specified in the last call to mmr_output_parameters() that configured the output defined in the URL.
MMR_EVENT_CTXTPAR None All context parameters Context parameters specified in the last call to mmr_context_parameters().
MMR_EVENT_TRKPAR trkparam All track parameters Track parameters specified in the last call to mmr_track_parameters().
a The number sign in the actual property is a decimal number indicating the track's index within the metadata set. There's a property like this for every such track (or stream) in the input file.