Creating a renderer

Definition

A renderer is an element capable of playing media elements and playlists of media elements.

As for MAFW sources, for MAFW renderers, you also need to write a shared library with a module initializer, a GObject inheriting from MafwRenderer and the parameters when calling the GObject constructor. An example would be very similar to the Mafw source's one.

Of course, the methods that have to be redefined are the ones of MafwRenderer and as in the other case we can implement the methods that make sense for the renderer we are implementing. MafwRenderer defines many methods that we can group like this:

  • Playback: such as play, stop, resume, etc.

  • Playlist management: assign playlist, next, previous, go to index, etc.

  • Status: get the status of the renderer, like its current playback state and assigned media.

  • Position: get current playback position, set playback position (seeking).

Signals

Renderers also define some signals that should be taken into account, such as:

  • "playlist-changed"
  • "media-changed"
  • "state-changed"
  • "buffering-info"
  • "metadata-changed"
  • "buffering-info"