Skip to content

Libjingle is a set of components provided by Google to implement Jingle protocols XEP-166

License

Notifications You must be signed in to change notification settings

alhasanmridha/libjingle

Repository files navigation

Libjingle

1. Introduction

Libjingle is a set of components provided by Google to implement Jingle protocols XEP-166 (http://xmpp.org/extensions/xep-0166.html) and XEP-167 (http://xmpp.org/extensions/xep-0167.html). Libjingle is also backward compatible with Google Talk Call Signaling (http://code.google.com/apis/talk/call_signaling.html). This package will create several static libraries you may link to your projects as needed.

-talk               - No source files in talk/, just these subdirectories
|-base              - Contains basic low-level portable utility functions for
|                     things like threads and sockets
|-p2p               - The P2P stack
  |-base            - Base p2p functionality
  |-client          - Hooks to tie it into XMPP
|-session           - Signaling
  |-phone           - Signaling code specific to making phone calls
    |-testdata      - Samples of RTP voice and video dump
  |-tunnel          - Tunnel session and channel
|-third_party       - Folder for third party libraries
  |-libudev         - Folder containing libudev.h
|-xmllite           - XML parser
|-xmpp              - XMPP engine

In addition, this package contains two examples in talk/examples which illustrate the basic concepts of how the provided classes work.

2. How to Build

We now support two ways to build libjingle: GYP and Scons. We recommend using GYP which is easier to get dependencies and simple to use.

2.1. Building using GYP

2.1.1. Prerequisites

First, be sure to install the prerequisite software. http://www.webrtc.org/reference/getting-started/prerequisite-sw

The currently supported platforms are Windows, Mac OS X, and Linux.

2.1.2. Getting the code and building

Create a working directory, enter it, and run:

$ gclient config http://libjingle.googlecode.com/svn/trunk
$ gclient sync

The sync will generate native build files for your environment using gyp (Linux: make/ninja, OS X: XCode/make/ninja, Windows: Visual Studio). This generation can also be forced manually:

$ gclient runhooks

It is also possible to choice the build method by set the environment variable GYP_GENERATORS. For examplerun this on mac will generate makefiles instead of xcode projects:

$ GYP_GENERATORS=make gclient runhooks

For more information on ninja build: http://code.google.com/p/chromium/wiki/NinjaBuild

On Windows, gyp will use the latest Visual Studio on your system by default. In order to specify a particular Visual Studio version, there are a few options. You can set an environment variable GYP_MSVS_VERSION=<version> before runhooks, or manually run the gyp command triggered by runhooks. From the trunk/ directory:

$ build/gyp_chromium --depth=. -G msvs_version=<version> talk/libjingle_all.gyp

where is, for example, 2008.

2.2. Building using SCons

2.2.1. Prerequisites

Libjingle is built with swtoolkit (http://code.google.com/p/swtoolkit/), which is a set of extensions to the open-source SCons build tool (www.scons.org).

2.2.2. libjingle

Libjingle needs to be downloaded and patched

2.2.3. Build Libjingle under Linux or OS X

  • On Linux, you need to install libssl-dev, libasound2-dev and gtk+2.0.
  • Some optional new features in OpenSSL are only available in OpenSSL v1.0 and above. To build with new OpenSSL features, you need to add the "HAS_OPENSSL_1_0" to the cppdefine under the "talk.Library(env, name = jingle..." section in the "libjingle.scons" file. Then download the OpenSSL v1.0 from the following URL: http://www.openssl.org/source/openssl-1.0.0e.tar.gz Unzip the downloaded package to the "third_party/openssl", such that it creates the directory "third_party/openssl/include/", etc.
  • To build Libjingle, first make sure the SCONS_DIR environment variable is set correctly.
  • Second, run talk/third_party/expat-2.0.1/configure and talk/third_party/srtp/configure.
  • Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run $path_to_swtoolkit/hammer.sh --help for information on how to build for different modes.

2.2.4. Build Libjingle under Windows

  • First, make sure the SCONS_DIR environment variable is set correctly and Microsoft Visual Studio is installed. dir %SCONS_DIR% Should show a folder containing Scons\
  • Second, go to the talk\ directory and run %PATH_TO_SWTOOLKIT%\hammer.bat. To get help run: %PATH_TO_SWTOOLKIT%\hammer.bat --help different modes. You can run the last step under Visual Studio Command Prompt if Visual Studio tools are not under the path environment variable. Example to build call.exe %PATH_TO_SWTOOLKIT%\hammer.bat Example to build opt and dbg all programs %PATH_TO_SWTOOLKIT%\hammer.bat --jobs=6 --verbose --mode=all all_programs

The built binaries are under talk/build/dbg/staging or talk/build/opt/staging, depending on the build mode. When the build is complete, you can run the examples, login or call. For the call sample, you can specify the input and output RTP dump for voice and video. This package provides two samples of input RTP dump: voice.rtpdump is a single channel, 16Khz voice encoded with G722, and video.rtpdump is 320x240 video encoded with H264 AVC at 30 frames per second. These provided samples will inter-operate with Google Talk Video. If you use other input RTP dump, you may need to change the codecs in call_main.cc, lines 215 - 222.

Libjingle also builds two server tools, a relay server and a STUN server. The relay server may be used to relay traffic when a direct peer-to-peer connection could not be established. The STUN Server implements the STUN protocol for Session Traversal Utilities for NAT(rfc5389), and the TURN server is in active development to reach compatibility with rfc5766. See the Libjingle Developer Guide at http://developers.google.com/talk/libjingle/developer_guide for information about configuring a client to use this relay server and this STUN server.

To use LinphoneMediaEngine, you need to perform the following additional steps:

  • Download and install the "MediaStreamer" library on your machine.

  • Add the following lines into the libjingle.scons file. In the "talk.Library(env, name = "libjingle",..." section, you need to add: "HAVE_LINPHONE", "HAVE_SPEEX", "HAVE_ILBC", to the "cppdefines = [".

    In the "talk.App(env, name = "call",..." section, you need to add: "mediastreamer", to the "libs = [".

  • In the libjingle.scons file, add the following line into the "srcs = [ ..." section of the "libjingle" Library. "session/phone/linphonemediaengine.cc",

About

Libjingle is a set of components provided by Google to implement Jingle protocols XEP-166

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published