Playing and Recording Media Content

Updated: April 19, 2023

The mm-renderer service lets you play audio and video tracks, and record audio content. You can select a file or streaming server as the input, and the appropriate hardware devices or rendering service for the outputs. During playback, mm-renderer manages the media flow based on commands.

The interaction between these components proceeds as shown here:

  1. Configuring playback

    To play media content, an application must configure mm-renderer by defining a context and specifying its input and outputs. For the input, the application must name a locally accessible file, an RTP streaming server (e.g., mm-stream), or an Internet file. Note that a local file could be a track on an attached media device, whose filesystem has been mounted. For each output, the application must name a hardware device or the Screen service. For the sequence of required API calls, see the Using the service from client applications section.

  2. Controlling playback

    When an application issues the command to start playback, mm-renderer initiates the media flow between the input and the outputs. The service uses streamers to read the input; the streamers access the media source and retrieve the content. Then, the service forwards the content to the utilities that send the audio and video components to a sink (output). During playback, mm-renderer can process commands such as skipping to a new track or stopping playback.

  3. Outputting audio and video

    The mm-renderer service uses the Screen Graphics Subsystem for outputting video and io-audio for outputting audio. Screen is a windowing system that renders video to the physical display. The io-audio utility is a resource manager that loads and configures audio drivers, which deliver the audio output to the hardware (e.g., speakers).