Meego Wiki
Views

UMMS Architecture

From MeeGo wiki
Revision as of 06:15, 19 December 2011 by Wuzhiwen (Talk | contribs)
Jump to: navigation, search

Contents

UMMS Architecture

Introduction

This page describes the architecture of Universal Multi Media Service (UMMS).
UMMS general description can found on its main page

Class Diagram

          -------------------
          |UmmsObjectManager|
          -------------------
                  ^
                  v
                  |
         --------------------               -------------------------
         | MediaPlayer      |    <> ------- |   MediaPlayerControl  |
         --------------------               -------------------------
                  ^                            ^                 ^
                  V                            |                 |
                  |                            |                 |
         ----------------------------      Implement         Implement
         | PlayerControlFactory     |          |                 |
         ----------------------------          |                 |
                                               |                 |
                                      ---------------------   ------------------------
                                      | PlayerControlBase |   | DvbPlayerControlBase |  <--------------
                                      ---------------------   ------------------------                |
                                        ^         ^                       ^                           |
                                        |         |                       |                         ------------------------------------
------------------------------          |         |                       |                         | DvbPlayerControlGeneric (NetBook)|
|PlayerControlGeneric(NetBook)| ---------         |                       |                         ------------------------------------
------------------------------           ----------------------      -------------------------
                                         |PlayerControlTv(TV) |      | DvbPlayerControlTv(TV)|
                                         ----------------------      -------------------------
  • UmmsObjectManager

Class to manage MediaPlayer objects, including create/destory, register/unregister MediaPlayer objects.

  • MediaPlayer

Class to provide media playback service.

  • PlayerControlFactory

Factory class to create backend player which implemented MediaPlayerControl interface.

  • MediaPlayerControl

Internal interface. MediaPlayer uses this interface to handle the service request. Backend developer need to implemente this interface.

  • PlayerControlBase

Base class to handle the non-dvb playback request. It internally uses playbin2 to implement the MediaPlayerControl interface.

  • PlayerControlGeneric

A backend used on generic PC platform(e.g. NetBook).

  • PlayerControlTv

A backend used on TV platform (e.g. CE4100).

  • DvbPlayerControlBase

Base class to handle the dvb playback request. It creates a custom gstreamer pipeline to play/recode the dvb stream.

  • DvbPlayerControlGeneric

Derived class from DvbPlayerControlBase which is used on generic PC platform(e.g. NetBook).

  • DvbPlayerControlTv

Derived class from DvbPlayerControlBase which is used on TV platform(e.g. CE4100).

How to develop a backend

  • Step 1: Implement MediaPlayerControl interface

The MediaPlayerControl is internal interface to abstract all the media playback control. Backend developer should create a class and implement this interface. Of cause, you can just implement a subset of the virtual methods defined by the interface, e.g. The DvbPlayerControlBase doesn't implement the "pause" method. If you want to add time-shifting feature for DVB playback, implementing "pause" method is a choice.

  • Step 2: Modify PlayerControlFactory

All the backend selection logic is contained in PlayerControlFactory class. For now, PlayerControlFactory creates the appropriate backend(named "engine" in the source code) according to platform information and the URI. The Developer should modify the function pointer array(in player-control-factory.c) to contain his custom backend:

MediaPlayerControl* (*engine_factory[PLATFORM_INVALID][N_PLAYER_CONTROL_FACTORY_ENGINE_TYPE])(void)
Personal tools