Setting up the Multimedia Synchronizer Environment

Before using mm-sync, you must start both the Persistent Publish/Subscribe (PPS) service and the QNX database (QDB) server, and load the databases of the mediastores that you plan to synchronize. You can then launch the mm-sync service and start synchronizing media content.

To set up mm-sync:
  1. In a QNX Neutrino terminal, enter io-fs-media to start the IO service for reading and writing to RAM locations.
    Although it's not required, we recommend running your QDB databases in RAM (e.g., from a tmpfs filesystem). You can also run databases from locations in QNX filesystems and flash filesystems but performance may suffer due to the inherent slowness in writing to the storage media.
  2. Enter pps to start PPS as a background process.
    PPS creates a root directory (/pps by default) to store the objects used by all services that use PPS, including QDB.
  3. Enter mkdir -p /pps/qnx/qdb to create the directory area used by QDB to store PPS objects.
  4. Enter qdb followed by any desired options to start the QDB server.
    For debugging purposes, you should start qdb with -v options to get verbose output. The -v option is cumulative, with each additional v increasing verbosity, up to seven levels. There's also the -V option, which sends output to the console and the slog2info log.
  5. Load the databases that hold the file, media, and playlist metadata for any mediastores that you plan to use. For each database, you must:
    • Copy an existing configuration object into the config subdirectory under the QDB PPS path (i.e., /pps/qnx/qdb/config/). Or, from a client application using the open() and write() system calls, output the list of configuration attributes and values to a file in this subdirectory.

      QDB configuration objects are text files that describe the configurations of QDB databases. QDB first parses an object and tries to load the database with the same name, then creates a status object that stores the database state. If the storage file named in the configuration object doesn't exist, QDB creates this file and if directed, populates the database with initial data.

      Note: The directory that will contain the new storage file must exist before you start loading the database. Otherwise, the loading fails and QDB sets the status to Error.
  6. Start the multimedia synchronization engine by entering a command in this form: mm-sync -c /base/etc/mm/mm-sync.conf -vvvv remaining options
    Although the mm-sync package includes a default configuration file, it's often helpful or necessary to specify a custom configuration based on your system requirements, by using the -c option.
The databases containing the required media metadata are now accessible through the QDB service and the multimedia synchronizer service is running. You can manage synchronizations by issuing commands to the mmsyncclient utility or by calling mm-sync API functions from media applications.