Updated: April 19, 2023 |
To ensure multimedia operations are available to applications when the embedded system loads up, the buildfile's script must launch the multimedia services and the services on which they depend in the correct order.
As explained in the Scripts topic of the Building Embedded Systems guide, any buildfile scripts are executed by the OS just after it finishes its own setup. Multiple scripts are combined into one, so you could add the contents shown below as a separate script to an existing buildfile.
[+script] .script = { display_msg Starting QNX Multimedia Services ####################################################################### ## pps ####################################################################### display_msg Starting PPS ... mount /dev/hd1t177 /var pps -v -l0 -P 50 -C -t 300000 > /dev/shmem/pps.stdout 2>&1 ####################################################################### ## resarb ####################################################################### display_msg Starting Resource Arbitration ... resarb & ####################################################################### ## mm-renderer ####################################################################### display_msg Starting mm-renderer ... mkdir -p /pps/services/multimedia/ mm-renderer -c ####################################################################### ## mm-stream ####################################################################### display_msg Starting Media Streaming Server ... mm-stream }
The mount instruction just before the pps startup command serves to mount a local hard disk to the path used by pps to persist information; thus, the instruction is part of the PPS setup. The pps command line enables verbosity, and sets the object load behavior, process priority, and more. It also redirects standard output and error to the specified file in shared memory. For details on all command-line options and the service itself, see the pps entry in the Utilities Reference or the Persistent Publish/Subscribe Developer's Guide.