Setting up the Multimedia Synchronizer Environment

Multimedia synchronization is done by the mm-sync utility. Before using mm-sync, you must first start the QNX database (QDB) server and load the databases of the mediastores you plan to synchronize. You can then launch mm-sync and start synchronizing media content.

To set up mm-sync:
  1. In a QNX terminal, enter io-fs-media to start the IO service for reading and writing to RAM-based locations. Although it's not required, we recommend running your QDB databases in RAM; for example, from a tmpfs filesystem. You can also run databases from locations in QNX filesystems and flash filesystems but performance may suffer with these two filesystem types 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 PPS configuration objects, which are text files that describe the configuration of the QDB databases.
  3. Enter mkdir -p /pps/qnx/qdb to create the directory structure used in the PPS configuration path.
  4. Enter qdb followed by any desired options to start the QDB server.

    For debugging purposes, you should start qdb with -vvvvvvvV options to get verbose output. The -v option is cumulative, with each additional v adding a level of verbosity, up to seven levels. The -V option sends output to the console and to the sloginfo log file.

  5. Load the databases that hold the file information and metadata for any mediastores you plan to use. For each database you want to load, you must:
    • Copy an existing configuration object or, from a client application using the open() and write() system calls, output the list of configuration attributes and values into the config subdirectory under the PPS configuration path (/pps/qnx/qdb/).

      QDB parses the configuration object's contents and tries to load the database with the same name as the object. QDB then creates a status object that indicates the database state after the loading attempt. If the storage file named in the configuration object doesn't exist, QDB creates the storage 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.
    See the QNX QDB Developer's Guide for details on database configuration files. The mm-sync service can now access any of the loaded databases to perform synchronizations on the associated mediastores.
  6. Start the multimedia synchronization engine by entering into a terminal a command in the form: mm-sync -c /patches/640-0315/target/qnx6/etc/mmsync.conf -vvvv [remaining options].

    You can point mm-sync to a configuration file by using the -c option. Although the mm-sync package includes a default configuration file, it's often beneficial (or even necessary) to use a custom configuration based on your system requirements.

The multimedia synchronizer service is running. You can now manage synchronizations by issuing commands to the mmsyncclient utility or by launching media applications that detect the insertion of new devices and call the appropriate mm-sync API functions.