README
1This directory holds a Java implementation of the webrtc::PeerConnection API, as
2well as the JNI glue C++ code that lets the Java implementation reuse the C++
3implementation of the same API.
4
5To build the Java API and related tests, build with
6OS=linux or OS=android and include
7build_with_libjingle=1 build_with_chromium=0
8in $GYP_DEFINES.
9
10To use the Java API, start by looking at the public interface of
11org.webrtc.PeerConnection{,Factory} and the org.webrtc.PeerConnectionTest.
12
13To understand the implementation of the API, see the native code in jni/.
14
15An example command-line to build & run the unittest:
16cd path/to/trunk
17GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 java_home=path/to/JDK" gclient runhooks && \
18 ninja -C out/Debug libjingle_peerconnection_java_unittest && \
19 ./out/Debug/libjingle_peerconnection_java_unittest
20(where path/to/JDK should contain include/jni.h)
21
22During development it can be helpful to run the JVM with the -Xcheck:jni flag.
23
24