Media playback

Media applications use mm-renderer to play audio and video tracks, by attaching mediastore files or playlists as the input and attaching one or more hardware devices as the outputs. During playback, mm-renderer manages the media flow between the input and the outputs.

The interaction between these components proceeds as shown here:

Multimedia architecture diagram with playback components highlighted and their order of interaction enumerated
Figure 1. Media Playback
  1. Configuring the rendering service

    To play media content, an application must configure the mm-renderer service by defining a context and attaching an input and one or more outputs to it. For the input, the application must provide the URL of a track or playlist stored on an accessible mediastore. For each output, it must provide the URL of an output device and any device configuration options. For an overview of the required API calls, see the "Playing media" section in the Multimedia Renderer Developer's Guide.

  2. Controlling playback

    When an application issues the command to start playback, mm-renderer initiates the media flow between the input and the outputs. Note that the rendering service doesn't parse the media files but instead uses lower-level mechanisms (e.g., HTTP streamers, file readers) to read and forward their contents to other utilities that send the audio and video components to the appropriate drivers. The main purpose of mm-renderer during playback is to process commands such as changing the playback speed, skipping to a new track position, and stopping playback.

  3. Outputting audio and video

    Plugins within mm-renderer communicate with the Screen Graphics Subsystem for outputting video and with the io-audio utility for outputting audio. Screen is the windowing system that mm-renderer uses to render video to the display. The io-audio utility is a resource manager that dynamically loads and configures audio drivers; mm-renderer uses it to deliver the audio in media tracks to the appropriate output hardware (e.g., speakers).