An application can restart mm-player with an explicit command if the service has stopped running and
the application can't proceed without support for media browsing and playback.
A client application should restart mm-player manually only if:
- the mm-player process has terminated unexpectedly
- the client is actively browsing or playing media
- the client has enough system configuration knowledge to set the appropriate
command-line options for mm-player
- it is undesirable to reboot the in-car system to restart mm-player
because doing so would be too disruptive to the user
To restart mm-player manually, an application must:
-
Confirm that mm-player isn't already running by
checking the list of active processes with the pidin or ps command.
-
Confirm that the nowplaying, mm-detect, and mm-renderer
processes are already running by checking the list of active processes.
The mm-player process depends on these three other services, so if any one is not running,
that service must be started; otherwise, mm-player won't work properly.
-
Send the mm-player command line containing the desired options to the OS,
using the system() or spawn() system call.
The OS tries to run mm-player and reports the outcome to sloginfo.
For details on the system calls that send commands to the OS, see the C Library Reference.
For the full list of command-line options, see "Command line for mm-player".
If sloginfo shows no error, mm-player is now running.
Note:
Your system should run only one instance of mm-player, so applications relying
on the service must coordinate with each other to avoid starting mm-player multiple times.