Running mm-detect

Client applications don't run the mm-detect service at specific times to perform media tasks (like they do with other multimedia components). CAR systems use the System Launch Monitor (SLM) service to automate starting mm-detect during bootup. Applications can start mm-detect manually for recovery purposes.

Starting mm-detect with specific command options during bootup

SLM automates process management by launching processes in an order that respects their interprocess dependencies. The list of processes to launch and their properties, including their command-line arguments and interprocess dependencies, are written in a configuration file (/etc/slm-config-all.xml). During bootup, SLM reads this file and carries out its instructions when starting processes.

Using SLM to start mm-detect ensures that the system is ready to play media when the HMI finishes booting and also that mm-detect runs with the same command options and therefore behaves consistently from one bootup to the next. For the full explanation of how SLM works, refer to "System Launch and Monitor (SLM)" in the System Services Reference.

SLM is preconfigured to start mm-detect with certain command options but you can change which command options it passes to mm-detect to suit the needs of your CAR system and applications.
To change the command options passed to mm-detect:
  1. From a command console connected to your CAR system, navigate to and open the SLM configuration file, whose full path is /etc/slm-config-all.xml.
  2. In the configuration file, locate the component that specifies the properties for mm-detect.
    This component is the <SLM:component> XML object with the name "mmdetect".
  3. Change the value of the <SLM:args> tag in the "mmdetect" component to hold the new set of command-line options to pass to mm-detect at startup.
    For the full list of command-line options, see "mm-detect command line".
  4. Save the changes to the SLM configuration file and return to the console.
  5. If you want the new configuration to take effect immediately, in the console, enter reboot.

    The system reboots and the SLM utility relaunches all the processes, including mm-detect, with their command options specified in the configuration file. When the system finishes reloading, mm-detect is running with the new configuration.

    If you don't reboot immediately after changing the configuration file, mm-detect continues to run with its previous configuration until you shut down the system and restart.