Reason for revert: AppRTCDemo often crashes in loopback mode and incorrect layout when connection is established BUG=webrtc:4909,webrtc:4910 Original issue's description: > AppRTCDemo: Render each video in a separate SurfaceView > > This CL introduces a new org.webrtc.VideoRenderer.Callbacks implementation called SurfaceViewRenderer that renders each video stream in its own SurfaceView. AppRTCDemo is updated to use this new rendering. > > This CL also does the following changes: > * Make the VideoRenderer.Callbacks interface asynchronous and require that renderFrameDone() is called for every renderFrame(). In JNI, this is implemented with cricket::VideoFrame::Copy()/delete. > * Make public static helper functions: convertScalingTypeToVisibleFraction(), getDisplaySize(), and getTextureMatrix(). > * Introduces new helper functions surfaceWidth()/surfaceHeight() in EGlBase that allows to query the surface size. > * Introduce PercentFrameLayout that implements the percentage layout that is used by AppRTCDemo. > > BUG=webrtc:4742 > > Committed: https://crrev.com/05bfbe47ef6bcc9ca731c0fa0d5cd15a4f21e93f > Cr-Commit-Position: refs/heads/master@{#9699} TBR=glaznev@webrtc.org,wzh@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:4742 Review URL: https://codereview.webrtc.org/1286133002 Cr-Commit-Position: refs/heads/master@{#9703}
This directory holds a Java implementation of the webrtc::PeerConnection API, as
well as the JNI glue C++ code that lets the Java implementation reuse the C++
implementation of the same API.
To build the Java API and related tests, build with
OS=linux or OS=android and include
build_with_libjingle=1 build_with_chromium=0
in $GYP_DEFINES.
To use the Java API, start by looking at the public interface of
org.webrtc.PeerConnection{,Factory} and the org.webrtc.PeerConnectionTest.
To understand the implementation of the API, see the native code in jni/.
An example command-line to build & run the unittest:
cd path/to/trunk
GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 java_home=path/to/JDK" gclient runhooks && \
ninja -C out/Debug libjingle_peerconnection_java_unittest && \
./out/Debug/libjingle_peerconnection_java_unittest
(where path/to/JDK should contain include/jni.h)
During development it can be helpful to run the JVM with the -Xcheck:jni flag.