Components used to retrieve media information

Several CAR components—device publishers, mcd, mm-sync, and the CAR HMI—work with each other and with mm-detect to automate the process of detecting devices and delivering up-to-date media information to the end user.

Device publishers

Device publishers are hardware-support components that detect device attachments and, in response, write PPS objects to the /pps/qnx/mount/ directory. We refer to this fixed location as the device listings directory. For information on the PPS service, see the PPS Developer's Guide.

For each media device, the appropriate device publisher creates a dedicated PPS object to hold that device's information, which includes its mountpoint and filesystem information. For example, when the user inserts a USB stick whose device name is usb1, the usblauncher publisher creates a PPS object named /pps/qnx/mount/usb1. When the user removes the device, the same publisher deletes the PPS object.

When the user attaches a USB device that doesn't have any partitions but does have a single, mountable filesystem, usblauncher writes the device mountpoint to one PPS object whose name matches that of the device. If the USB device has partitions, the publisher writes the mountpoints of the various partition filesystems to distinct PPS objects. The names of these objects contain the partition indexes.

Media content detector (mcd)

The media content detector utility (mcd) enumerates and mounts devices and their partitions. The mcd service doesn't interact with mm-detect; instead, mcd runs as a background process and continuously monitors the /dev/ directory for new entries, which indicate device attachments. When it notices a device attachment, mcd enumerates and mounts the device's partitions based on the rules encoded in a special text file (by default, /etc/mcd.mnt).

The mount rules indicate the mountpoints to use for specific device objects (/dev/ entries). Device drivers create and name these objects based on partition properties such as filesystem type. For example, for an inserted USB mass storage device with distinct DOS and QNX4 partitions, the USB driver could create the device objects /dev/umass/umass0t1 and /dev/umass/umass0t7. The mcd service could then assign mountpoints of /fs/usb0 and /fs/usb1 for these two partitions. For further explanation of mount rules and a sample mcd.mnt rules file, see the mcd section in the Utilities Reference.

The mcd service sends mount requests to the appropriate device drivers (e.g., the USB driver for mounting a USB stick), which manage the mountpoint paths. Each device publisher regularly polls its corresponding device driver to learn of any new mountpoints, which it then writes to the PPS objects in the device listings directory.

Multimedia synchronizer (mm-sync)

The multimedia synchronizer service, mm-sync, uploads media metadata from attached devices into QDB databases. Each device has its own QDB database that stores metadata on the device's media contents. For information on the QDB database service and the storage standard used for its databases, see the QDB Developer's Guide.

The first time a device is attached to the in-car system, mm-detect loads and initializes the device's database before invoking mm-sync to start the synchronization. This action by mm-detect is necessary because although mm-sync can write to databases, it can't load or unload them.

When a device is attached at any time, mm-detect instructs mm-sync to synchronize media content from the entire device, starting from the root folder and descending into all subfolders systematically. The device's filesystem is accessed from the mountpoint previously set up by mcd. The command sent to mm-sync also instructs it to upload file information and creation and playback information for media tracks, but not playlist entry information.

CAR HMI

The CAR HMI consists of many applications that provide users with a visually rich front end for interacting with their in-car system. This release contains a media app (Media Player) that reads the synchronization statuses published by mm-detect through PPS and refreshes the list of media sources shown in the HMI as needed.

You can write your own media applications to replace or run alongside Media Player. These applications can read the same PPS object that Media Player reads for synchronization status updates. The information published in this object includes the device's name and media type, and a flag indicating whether the device has been synchronized.

Your applications can extract as much of this information as they need to refresh their HMI display. By default, mm-detect stores this object in /pps/services/mm-detect/, but you can reconfigure which directory this object is stored in.