Multimedia Synchronization Overview

The multimedia synchronizer service, mm-sync, synchronizes databases in persistent storage with media metadata found on attached devices. Synchronization involves extracting file information and media creation and playback details and uploading that information into QDB databases.

Before we explain the capabilities of mm-sync, we first clarify the following terms: Suppose you have a USB stick with two partitions. Here, you have one device with two mediastores. The device publishers, which are OS services that publish information about connected devices, write two separate files that each specify the mountpoint and other information about one partition.

The mm-sync service reads metadata from the files found at a mediastore's mountpoint and stores the metadata in a database dedicated to that mediastore. Using databases for storage offers an efficient way of obtaining media information because applications can simply query these databases instead of searching the filesystems of external devices and retrieving information through system calls.

Another advantage to this design is that applications can view media information about any mediastore that has been synchronized, even if the device on which it's stored is no longer present on the system.

Capabilities

The mm-sync service can:
  • index files
  • index metadata
  • resolve playlists
  • process or index external databases

Client applications can request mm-sync to perform some or all of these functions through API calls. The metadata written into the databases then helps these applications to find, organize, and play media, as well as provide end users with helpful, up-to-date information.

Artwork extraction

Although the content that mm-sync synchronizes to databases may include artwork images, the synchronizer service does not extract artwork. To do this, your application must use libmd to retrieve the artwork from the media files, based on the list available in the mediastore database previously synchronized by mm-sync. Information on libmd artwork extraction is found in the Extracting artwork section of the Metadata Provider Library Reference.

Mediastore detection

Mediastore insertions or removals are not detected by mm-sync. Applications can monitor the appropriate Persistent Publish/Subscribe (PPS) objects to learn when mediastores get mounted in the local filesystem, then manually synchronize their contents by calling mm-sync.

Changes in filesystems, such as file additions or removals, are also not detected by mm-sync. Applications must explicitly synchronize mediastore content to guarantee up-to-date file information for their users. An advantage of this design is that mm-sync won't do a synchronization for every mediastore insertion or change of content, which would be very expensive and likely slow down client applications.