Skype Kit Media Engine
----------------------

Building
========
In order to build the Skype Kit media engine the contents of this directory
must be placed in a media-engine/ directory within the Skype Kit SDK's
./reference/ directory. Building the media engine is then the same as
building any of the other reference examples, using premake4, excepting
that the additional dependencies of GLib and Farsight2 development headers
are needed.

For the time being, a special version of Farsight2 is needed. This custom
version can be found in this branch:

  http://git.collabora.co.uk/?p=user/kakaroto/farsight2.git;a=shortlog;h=refs/heads/fsu

Demo
====
This package contains a demo application which allows running the media
engine as a standalone Skype Kit audio/video host. It can be found in the
demo/ directory. It is built separately from the media-engine.

==== Dependencies ====

To get the media-engine working, you first need to get a set of dependencies :
- GStreamer
- GStreamer-plugins-base
- GStreamer-plugins-good
- GStreamer-plugins-bad
- GStreamer-plugins-ugly

It is recommended to use the git version of those libraries.
(See http://gstreamer.freedesktop.org/dev/)

You then need to install Farsight 2. You will need the FSU version of
Farsight 2 which should be available in the next released version (0.0.22) of
Farsight 2. In the meantime, it is available here : 
http://git.collabora.co.uk/?p=user/kakaroto/farsight2.git
Make sure you checkout the 'fsu' branch before compiling it : 'git checkout fsu'


==== Building the media-engine ====

Once all these dependencies are installed, copy the media-engine directory to
the skypekit/reference/ directory and type 'make' to compile the media-engine
or type 'make docs' to compile the documentation.
Read the README file included with the media-engine for more information.
 

==== Using the media-engine ====

Read the documentation of the media-engine to know how to proceed and look at
the demo code from the media-engine for a reference implementation.
The documentation should be available in the media-engine's source directory,
under the docs/html/ subdirectory.
Make sure you build it first with 'make docs'.


==== G729 ====

In order to test G729, if you do not have your own implementation of the
standard with GStreamer elements, you can use the GladSToNe project which
provides GStreamer elements wrapping the reference implementation of G729
from the ITU.

The reference implementation of the ITU is not distributable, so it is not
included and must be downloaded separately. Binaries of the G729 code and
the GStreamer element generated by GladSToNe can not be distributed either.
Use this only for testing purposes.

To build GladSToNe, simply run the ./build-gladstone.sh script. It will
automatically download the reference implementation, extract it, then download
GladSToNe, patch it, and compile it. You will however need to go to the G729
ITU page and provide the script with the download link to the G729 reference
implementation zip file : http://www.itu.int/rec/T-REC-G.729-200701-I/en
However, the script will not install the G729 elements, so you must type
'make install' in the gladstone directory, this is to allow you to install it
to the appropriate DESTDIR on your system.


==== Known issues ====

The current media-engine code is in beta phase. Although it is working
correctly, it still has a few known issues that need to be fixed.
Here is a list of those issues :
- Add signals for notifying the user of which source/sink/device was chosen
  or whether no device could be found on the system
- Local playback of outgoing DTMF events doesn't work after the first one.
- x264enc bitrate can't change dynamically
  (https://bugzilla.gnome.org/show_bug.cgi?id=621663)
- Receiving audio seems to cut out after a bit in some rare cases
- The media-engine can't be the stream host as that feature is not yet
  implemented
- A couple of rare crashes

The code also still needs to be properly reviewed, cleaned and extensively
tested before a final release.

