Meego Wiki
Views

UMMS Architecture

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(How to develop a backend)
(How to develop a backend)
Line 51: Line 51:
The UmmsPlayerBackend is internal interface to abstract all the media playback control. Backend developer should subclass this class and implement its vmethods. Of cause, you can just implement a subset of the virtual methods defined in UmmsPlayerBackendClass struct, e.g. For dvb player backend, it is optional to implement the "pause" method. If you want to add time-shifting feature for DVB playback, implementing "pause" method is a choice.
The UmmsPlayerBackend is internal interface to abstract all the media playback control. Backend developer should subclass this class and implement its vmethods. Of cause, you can just implement a subset of the virtual methods defined in UmmsPlayerBackendClass struct, e.g. For dvb player backend, it is optional to implement the "pause" method. If you want to add time-shifting feature for DVB playback, implementing "pause" method is a choice.
-
*'''Step 2: Fill a UmmsPlugin struct in your .c file and export it'''
+
*'''Step 2: Fill the UmmsPlugin struct in your PlayerBackend.c file and export it'''
-
The struct UmmsPlugin:
+
The definition of struct UmmsPlugin:
<pre>
<pre>
typedef struct _UmmsPlugin {
typedef struct _UmmsPlugin {
Line 79: Line 79:
}UmmsPlugin;
}UmmsPlugin;
</pre>
</pre>
 +
The most important fields are supported_uri_protocols, unsupported_uri_protocols and backend_new_func. For details, ref this

Revision as of 14:13, 17 April 2012

Contents

UMMS Architecture

Introduction

This page describes the architecture of umms-0.1, you can get the code from: git://gitorious.org:meego-middleware/umms.git
UMMS general description can found on its main page

Class Diagram

ClassDiagramUmms-0.1.png

  • UmmsAudioManager

Class to implement com.UMMS.AudioManager interface which provide client with audio output control service.

  • UmmsVideoOutput

Class to implement com.UMMS.VideoOutput interface which provide client with video output control service.

  • UmmsPlayingContentMetadataViewer

Class to implement com.UMMS.PlayingContentMetadataViewer interface which allow the client to query the current playing content on server side.

  • UmmsObjectManager

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

  • UmmsMediaPlayer

Class to implement the com.UMMS.MediaPlayer interface which provide media playback service for client.

  • UmmsPlayerBackend

A base class which defined internal interface for media playback. UmmsMediaPlayer uses this class to handle the service request. Backend developer need to subclass it.

  • UmmsAudioManagerBackend

A base class which defined internal interface for controlling audio output. UmmsAudioManager uses this class to handle the service request. Backend developer need to subclass it.

  • UmmsVideoOutputBackend

A base class which defined internal interface for controlling video output. UmmsVideoOutput uses this class to handle the service request. Backend developer need to subclass it.

  • UmmsPlugin

A class which defined the plugin mechanism. All backend should be implemented as a UmmsPlugin.

  • Player

An implementation of UmmsPlayerBackend.

  • AudioManger

An implementation of UmmsAudioBackend.

  • VideoOutput

An implementation of UmmsVideoOutput.

Note that, Player,AudioManger,VideoOutput are plugins and will not provide by umms-1.0.

How to develop a backend

Suppose you are going to develop a player backend.

  • Step 1: Subclass UmmsPlayerBackend

The UmmsPlayerBackend is internal interface to abstract all the media playback control. Backend developer should subclass this class and implement its vmethods. Of cause, you can just implement a subset of the virtual methods defined in UmmsPlayerBackendClass struct, e.g. For dvb player backend, it is optional to implement the "pause" method. If you want to add time-shifting feature for DVB playback, implementing "pause" method is a choice.

  • Step 2: Fill the UmmsPlugin struct in your PlayerBackend.c file and export it

The definition of struct UmmsPlugin:

typedef struct _UmmsPlugin {
  gint major_version;//the major version number of umms core that plugin was compiled for
  gint minor_version;//the minor version number of core that plugin was compiled for
  UmmsPluginType type;
  const gchar *filename;//set by "plugin loader" when this plugin loaded.
  const gchar *name;
  const gchar *description;

  /*
   * Used for plugins of UMMS_PLUGIN_TYPE_PLAYER_BACKEND type.
   * If supported_uri_protocols is empty, unsupported_uri_protocols is respected
   * as a "black list" of uri. If supported_uri_protocols is not empty, ignore
   * unsupported_uri_protocols.
   * e.g. The implementor can create a black list for its plugin like this:
   * supported_uri_protocols = {NULL};
   * unsupported_uri_protocols = {"dvb"};
   * that means the plugin can handle all uri protocols unless "dvb".
   */
  const gchar **supported_uri_protocols;
  const gchar **unsupported_uri_protocols;

  /*vmethod to create the instance of backend.*/
  gpointer (*backend_new_func) (void);
}UmmsPlugin;

The most important fields are supported_uri_protocols, unsupported_uri_protocols and backend_new_func. For details, ref this

Personal tools