I420Buffer implementations (I420BufferImpl and WrappedNativeI420Buffer) rely on the 'position' of the underlying ByteBuffers to indicate the start of Y, U, and V channels. Returning slices prevents callers from altering the state of the I420Buffer by changing the position. ByteBuffers are especially prone to accidentally moving the position: relative read operations (such as get()) increment the position by the size of data read. BUG=webrtc:8303 Change-Id: I52edce8a3bf46a6c41980ff5110a9480f021f22f Reviewed-on: https://webrtc-review.googlesource.com/4521 Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20050}
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, generate GN projects with:
--args='target_os="android"'
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/.