Media Browsing

The Media Player and other HMI apps can browse mediastore contents through mm-player. The service uses plugins to explore filesystems and retrieve metadata from different device types or databases.

The interaction between these components proceeds like this:

Architectural diagram with media browsing components highlighted and their order of interaction enumerated
Figure 1. Media browsing
  1. Sending browsing requests

    To send browsing requests to mm-player, HMI apps call functions in either the car.mediaplayer WebWorks extension (for the HTML5 HMI) or the QtQnxCar2 library (for the Qt5 HMI), which then forwards the requests to the C API of mm-player.

    Each of these components exposes the following browsing operations:
    • browse
    • search
    • getMetadata
  2. Navigating filesystems and retrieving metadata

    The mm-player service uses plugins to explore mediastore filesystems and extract metadata from their files. Each plugin uses a different mechanism to carry out the browse, search, and getMetadata operations on a particular device type. For instance, the synceddb plugin queries QDB databases for file information whereas the POSIX plugin uses the mmbrowse library to navigate directories and read information from locally mounted files. For details on how individual plugins browse media content, refer to the Multimedia Player Plugins chapter in the Multimedia Player Developer's Guide.

  3. Delivering media information

    After the appropriate plugin retrieves the file information or track metadata requested by the browse operation, mm-player delivers the results data to the HMI through either the car.mediaplayer extension or the QtQnxCar2 library, depending on which HMI version is in use. For examples of reading results data after issuing function calls or REST requests to the first of these mechanisms, see the "car.mediaplayer.Mediaplayer" section of the HTML5 Developer's Guide.

    The browse and search operations return file information that includes but is not limited to:
    • filepath
    • media item type (e.g., audio, video, folder)
    The getMetadata operation returns track metadata that may include but is not limited to:
    • artist name
    • album name
    • track title
    • duration (runtime)

    The plugins also notify mm-player when any serious browsing error occurs, so that the service can inform HMI apps when a browse operation fails.