Support loopback mode and command line execution
for Android AppRTCDemo when using WebSocket signaling. - Add loopback support for new signaling. In loopback mode only room connection is established, WebSocket connection is not opened and all candidate/sdp messages are automatically routed back. - Fix command line support both for channek and new signaling. Exit from application when room connection is closed and add an option to run application for certain time period and exit. - Plus some fixes for WebSocket signaling - support POST (not used for now) and DELETE request to WebSocket server and making sure that all available TURN server are used by peer connection client. BUG=3995,3937 R=jiayl@webrtc.org Review URL: https://webrtc-codereview.appspot.com/24339004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7725 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -67,7 +67,6 @@ public class PeerConnectionClient {
|
||||
// remote descriptions are set. Similarly local ICE candidates are sent to
|
||||
// remote peer after both local and remote description are set.
|
||||
private LinkedList<IceCandidate> queuedRemoteCandidates = null;
|
||||
private LinkedList<IceCandidate> queuedLocalCandidates = null;
|
||||
private MediaConstraints sdpMediaConstraints;
|
||||
private MediaConstraints videoConstraints;
|
||||
private PeerConnectionEvents events;
|
||||
@@ -88,7 +87,6 @@ public class PeerConnectionClient {
|
||||
this.events = events;
|
||||
isInitiator = signalingParameters.initiator;
|
||||
queuedRemoteCandidates = new LinkedList<IceCandidate>();
|
||||
queuedLocalCandidates = new LinkedList<IceCandidate>();
|
||||
|
||||
sdpMediaConstraints = new MediaConstraints();
|
||||
sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair(
|
||||
@@ -384,13 +382,6 @@ public class PeerConnectionClient {
|
||||
}
|
||||
|
||||
private void drainCandidates() {
|
||||
if (queuedLocalCandidates != null) {
|
||||
Log.d(TAG, "Send " + queuedLocalCandidates.size() + " local candidates");
|
||||
for (IceCandidate candidate : queuedLocalCandidates) {
|
||||
events.onIceCandidate(candidate);
|
||||
}
|
||||
queuedLocalCandidates = null;
|
||||
}
|
||||
if (queuedRemoteCandidates != null) {
|
||||
Log.d(TAG, "Add " + queuedRemoteCandidates.size() + " remote candidates");
|
||||
for (IceCandidate candidate : queuedRemoteCandidates) {
|
||||
@@ -449,11 +440,7 @@ public class PeerConnectionClient {
|
||||
public void onIceCandidate(final IceCandidate candidate){
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
if (queuedLocalCandidates != null) {
|
||||
queuedLocalCandidates.add(candidate);
|
||||
} else {
|
||||
events.onIceCandidate(candidate);
|
||||
}
|
||||
events.onIceCandidate(candidate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user