Created a java wrapper for the callback OnAddTrack to PeerConnection.Observer

Created a java wrapper for the callback OnAddTrack in this CL since it has been added to native C++ API
The callback function is called when a track is signaled by remote side and a new RtpReceiver is created.
The application can tell when tracks are added to the streams by listening to this callback.

BUG=webrtc:6112

Review-Url: https://codereview.webrtc.org/2513723002
Cr-Commit-Position: refs/heads/master@{#15745}
This commit is contained in:
zhihuang
2016-12-21 14:08:03 -08:00
committed by Commit bot
parent b820f9c92e
commit dcccda7e7c
4 changed files with 178 additions and 109 deletions

View File

@ -41,6 +41,7 @@ import org.webrtc.PeerConnection;
import org.webrtc.PeerConnection.IceConnectionState;
import org.webrtc.PeerConnectionFactory;
import org.webrtc.RtpParameters;
import org.webrtc.RtpReceiver;
import org.webrtc.RtpSender;
import org.webrtc.SdpObserver;
import org.webrtc.SessionDescription;
@ -1175,6 +1176,9 @@ public class PeerConnectionClient {
// No need to do anything; AppRTC follows a pre-agreed-upon
// signaling/negotiation protocol.
}
@Override
public void onAddTrack(final RtpReceiver receiver, final MediaStream[] mediaStreams) {}
}
// Implementation detail: handle offer creation/signaling and answer setting,