Developers Downloads Licenses Products Help player
Home Page SummaryForumsBugsListsDocsNewsDoxygenCVSFiles
 
Helix Player Architecture
Navigation

[History]  

From Helix Community

Jump to: navigation, search

Contents

Helix Player Architecture

author: nhart
published: 9/19/2003
URL: https://player.helixcommunity.org/2003/draft/arch.html
CVS version: $Id: arch.html,v 1.18 2004/05/10 19:35:49 vikram Exp $


Table of Contents


Introduction

This document is intended to describe the general design of the Helix Player and assist the reader with developing the player or software that uses it. This document does not cover the inner workings of the Helix client engine, datatypes or protocols. For detailed information about those aspects of the player please see the client project.

The goals of the Helix Player project are:

  1. provide a high quality, feature rich media player for Linux, Solaris and Unix.
  2. provide a Mozilla browser plug-in
  3. provide compatibility with legacy RealNetworks technologies
  4. support open source media technologies such as Ogg Vorbis
  5. provide a GTK+ widget that allows third parties to incorporate the Helix Player into their own applications

Helix Player Diagram

The Helix Player is implemented in several layers. The topmost layer is the GTK+ user interface which incorporates the Helix Player GTK+ widget. The player widget is built on top of a simple library called HXClientKit which provides a simplified interface to the Helix client engine. The Helix client engine is the cross-platform COM-based media engine that handles playback of the media. The simple diagram below shows how these layers are built on top of each other.

  ---------------------
 |                     |
 | GTK+ player UI      |
 |                     |
 |---------------------|
 |                     |
 | GTK+ Widget         |
 |                     |
 |---------------------|
 |                     |
 | HXClientKit         |
 |                     |
 |---------------------|
 |                     |
 | Helix Client Engine |
 |                     |
  ---------------------
 

The reasons for this layered design are to provide both simplicity and flexibility. Third parties interested in developing for or with the Helix Player can choose which level of detail they need for their product. Users interested in providing simple media playback might choose to simply insert the GTK+ widget into their application's UI. Those interested in implementing their own widget using another toolkit (such as Qt) or would like to expose additional features of the client engine to their widget should work with the HXClientKit layer. Those interested in the low-level implementation of the media engine should work directly with the Helix client engine.

Terminology

To avoid confusion, commonly used terms should be defined here. (Note to doc maintainers: please add terms as appropriate!)

term(s) definition
client engine, client core The helix media engine responsible for media playback (includes network protocols, timeline & synchronization, video and audio services and numerous other features)

HXClientKit

A library that wraps the helix client engine and provides a simplified C & objective-C API for media playback.
player widget (or "the widget")

The helix player GTK+ widget that uses HXClientKit to play media within a GTK+ UI.

Mozilla plugin (or "the plugin")

A shared library that uses the Mozilla plug-in APIs to embed the helix player within a web page.

Overview

We are taking a layered approach to the Helix Player's architecture. Our primary goal is to provide a rich and functional media player for the end user. At the same time we also wish to provide developers with the tools to easily incorporate the Helix media engine into their own applications. This document is intended to explain how this architecture works to a software developer.

The base of the Helix Player is the Helix client engine. It is a COM-based (not Microsoft COM) engine that supports a flexible plugin architecture. Datatypes are implemented as a pair of file format and renderer plugins. Some plugins, like the RealVideo renderer, are designed to support multiple codecs. Some protocols (like http) are implemented as file system plugins. It is also possible to write a generic plugin that can override or extend one of the client engine's features (for instance, to provide a custom audio device implementation.) Those interested in learning more about it should visit the client project site.

The client engine is extremely flexible and powerful, but also very complicated to use. Some RealNetworks software developers recognized this and wrote a wrapper around the client engine that makes it much easier to build a media player. The wrapper is a static library called HXClientKit and it uses very simple C functions to control and receive notifications about media playback. (For Mac OSX developers there is also a set of Objective C APIs as well.)

Using HXClientKit one can easily add support for the Helix client engine into nearly any application. We decided to take this one step further with the Helix Player project and have implemented a GTK+ widget based on HXClientKit. This enables anyone to easily insert a fully-functional Helix-based media player into a GTK+ or Gnome application. Developers using this layer of the Helix Player architecture need only insert the widget into their UI and hook up their UI elements (such as buttons & status display) to its functions and signals. This is in fact how the Helix Player application is implemented.

The Helix Player GTK+ widget provides additional functionality that allows the application to specify whether it should be run in-process or in a separate process. If enabled, the widget will launch a separate process to contain the media engine and use a custom IPC mechanism to control playback. This handy feature enables one to get around potentially problematic runtime linker issues or simply prevent one's application from crashing should the media engine cause a runtime error.

The Helix Player also provides a Mozilla plugin which can be used to embed media presentations within any web browser (or other application) that supports the Mozilla plugin API. Our plugin provides a number of scriptable APIs and callback functions that enable one to customize and control the media presentation. The plugin is designed to be as backwards compatible as possible with RealNetworks' commercial media players (RealPlayer, RealOne Player) Netscape/Mozilla plugins. The Helix Player plugin uses the GTK+ widget and its out-of-process IPC mechanism.

The widget's IPC mechanism is documented so that ambitious developers can even use this widget in their own application (or script) without needing to support a GTK+ front end. One merely needs to invoke the Helix Player application with a particular set of command line options and communicate with it via STDIN/STDOUT. Using this feature one could effectively embed the Helix client engine in nearly any environment.

Finally, if a developer wishes to use a different toolkit (eg: Qt) then he/she need only mimic the implementation of our GTK+ widget and build their own application (or widget) on top of the HXClientKit layer. Currently the Helix Player project only officially supports GTK+ for its UI but we welcome individuals interested in extending the architecture or player to use other technologies.


Return to the table of contents



HXClientKit

Description

The HXClientKit is a simple library and set of header files that allows one to easily use the Helix client engine. One need only include the appropriate headers, link to the library and use a few simple C functions to play any media supported by Helix. There are numerous optional callback functions that can be implemented to receive information about the presentation and its playback status.

At its simplest one need only call ClientPlayerCreate() to obtain a token representing an instance of a media player. This token must be passed in to the HXClientKit functions in order to manipulate the corresponding player. Please take a look at the API reference for detailed information on all of the player functions.

Modules

This module resides in player/hxclientkit and its ribosome build target is "player_hxclientkit". It depends on the following modules:

  • common/include
  • common/dbgtool/pub
  • common/runtime/pub
  • client/include

Usage Example

For an example of how to use the HXClientKit please see the files contained in player/hxclientkit/test or the online version (taken from player/hxclientkit/test.)

API Reference

This documentation is maintained by Apple's HeaderDoc and can be found here.


Return to the table of contents



GTK+ Widget

Description

Using the Helix Player GTK+ widget is the easiest way to build a GUI media player with Helix.

Modules

The primary module for the Helix Player GTK+ widget is player/common/gtk. It has several dependencies as well:

  • common/include
  • client/include
  • common/runtime
  • common/system
  • common/container
  • common/runtime
  • common/dbgtool
  • common/util
  • player/hxclientkit

In addition, there are several external dependencies:

  • GTK+-2 (2.2 or later recommended)
  • pango (1.0?)
  • freetype2
  • atk (1.0?)

Example

todo

API Reference

The GTK+ widget documentation is maintained separately via gtk-doc. The full documentation can be found here.


Return to the table of contents



Helix Player

Description

todo

Modules

The Helix Player is contained in the player/app/gtk module. It is also dependent upon the following additional modules:

  • player/common/gtk
  • common/runtime
  • common/system
  • common/container
  • common/runtime
  • common/dbgtool
  • player/hxclientkit

Sub-Components

todo

Preferences

todo

MRU?

(file menu, open location dialog)

Command Line Options

(see IPC mechanism for embedding options)

UI widgets

eg: controlpanel, statuspanel, etc...

UI design

todo


Return to the table of contents



Helix Player Mozilla plugin

Description

todo

Modules

todo

Examples

todo

Simple Embedding

todo

Scripting

todo

Callbacks

todo

API Reference

(link to external doc?)

UI design

(info/pics on UI design)


Return to the table of contents



IPC Mechanism

Description

The Helix Player IPC mechanism is used so that the GTK+ widget can be embedded in an out-of-process fashion within another application. Typically if developing directly with the GTK+ widget it isn't necessary to know the details of this IPC mechanism. However, the documentation is provided for the curious or those interested in using the mechanism to embed the widget without using the GTK+ front end.

(more to come)

Modules

The IPC mechanism is currently built in to the GTK+ widget. It therefore uses the same modules.

Example

(Ryan?)

Command Line Options

(Ryan?)

Protocol

(Vijay? Ryan?)

Syntax

(Vijay? Ryan?)

API Reference


Return to the table of contents



Installer

Description

Currently we only offer a simple tarball "installer."

Modules

The tarball installer is found in player/installer/tar.

RPM

todo

API Reference

(link to server installer documentation)


Return to the table of contents





This page was last modified 03:09, 25 February 2008.This page has been accessed 2,283 times.
 

Site Map   |   Terms of Use   |   Privacy Policy   |   About Us   |   Contact Us

We have performed maintenance on Helix Community that turned off deprecated accounts. To re-apply for access, please contact licensing@helixcommunity.org

Copyright © 1995-2014 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.