1Libjingle 2 31. Introduction 4 5Libjingle is a set of components provided by Google to implement Jingle 6protocols XEP-166 (http://xmpp.org/extensions/xep-0166.html) and XEP-167 7(http://xmpp.org/extensions/xep-0167.html). Libjingle is also backward 8compatible with Google Talk Call Signaling 9(http://code.google.com/apis/talk/call_signaling.html). This package will 10create several static libraries you may link to your projects as needed. 11 12-talk - No source files in talk/, just these subdirectories 13|-base - Contains basic low-level portable utility functions for 14| things like threads and sockets 15|-p2p - The P2P stack 16 |-base - Base p2p functionality 17 |-client - Hooks to tie it into XMPP 18|-session - Signaling 19 |-phone - Signaling code specific to making phone calls 20 |-testdata - Samples of RTP voice and video dump 21 |-tunnel - Tunnel session and channel 22|-xmllite - XML parser 23|-xmpp - XMPP engine 24 25In addition, this package contains two examples in talk/examples which 26illustrate the basic concepts of how the provided classes work. 27 282. How to Build 29 30Libjingle is built with swtoolkit (http://code.google.com/p/swtoolkit/), which 31is a set of extensions to the open-source SCons build tool (www.scons.org). 32 * First, install Python 2.4 or later from http://www.python.org/. 33 Please note that since swtoolkit only works with Python 2.x, you will 34 not be able to use Python 3.x. 35 36 * Second, install the stand alone scons-local package 2.0.0 or later from 37 http://www.scons.org/download.php and set an environment variable, 38 SCONS_DIR, to point to the directory containing SCons, for example, 39 /src/libjingle/scons-local/scons-local-2.0.0.final.0/. 40 41 * Third, install swtoolkit from http://code.google.com/p/swtoolkit/. 42 43 * Finally, Libjingle depends on two open-source projects, expat and srtp. 44 Download expat from http://sourceforge.net/projects/expat/ to 45 talk/third_party/expat-2.0.1/. Follow the instructions at 46 http://sourceforge.net/projects/srtp/develop to download latest srtp to 47 talk/third_party/srtp. Note that srtp-1.4.4 does not work since it misses 48 the extensions used by Libjingle. 49 If you put expat or srtp in a different directory, you need to edit 50 talk/libjingle.scons correspondingly. 51 522.1 Build Libjingle under Linux or OS X 53 * First, make sure the SCONS_DIR environment variable is set correctly. 54 * Second, run talk/third_party/expat-2.0.1/configure and 55 talk/third_party/srtp/configure. 56 * Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run 57 $path_to_swtoolkit/hammer.sh --help for information on how to build for 58 different modes. 59 602.2 Build Libjingle under Windows 61 * First, make sure the SCONS_DIR environment variable is set correctly and 62 Microsoft Visual Studio is installed. 63 * Second, copy talk/third_party/srtp/config.hw to 64 talk/third_party/srtp/crypto/include/config.h. 65 * Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.bat. Run 66 $path_to_swtoolkit/hammer.sh --help for information on how to build for 67 different modes. You can run the last step under Visual Studio Command 68 Prompt if Visual Studio tools are not under the path environment variable. 69 70The built binaries are under talk/build/dbg/staging or talk/build/opt/staging, 71depending on the build mode. When the build is complete, you can run the 72examples, login or call. For the call sample, you can specify the input and 73output RTP dump for voice and video. This package provides two samples of input 74RTP dump: voice.rtpdump is a single channel, 16Khz voice encoded with G722, and 75video.rtpdump is 320x240 video encoded with H264 AVC at 30 frames per second. 76These provided samples will inter-operate with Google Talk Video. If you use 77other input RTP dump, you may need to change the codecs in call_main.cc, lines 78215 - 222. 79 80Libjingle also builds two server tools, a relay server and a STUN server. The 81relay server may be used to relay traffic when a direct peer-to-peer connection 82could not be established. The STUN Server implements the STUN protocol for 83Simple Traversal of UDP over NAT. See the Libjingle Developer Guide at 84http://code.google.com/apis/talk/index.html for information about configuring a 85client to use this relay server and this STUN server.