Merge fixes and changed for Android AppRTCDemo from internal repo.
- Rename AppRTCDemoActivity to CallActivity and move UI controls to a fragment. - Add option to enable/disable statistics. - Move peer connection and video constraints from URL to peer connection client. - Variable renaming. R=jiayl@webrtc.org, wzh@webrtc.org Review URL: https://webrtc-codereview.appspot.com/33299004 Cr-Commit-Position: refs/heads/master@{#8319} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8319 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -35,11 +35,13 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.appspot.apprtc.AppRTCClient.SignalingParameters;
|
||||
import org.appspot.apprtc.PeerConnectionClient;
|
||||
import org.appspot.apprtc.PeerConnectionClient.PeerConnectionEvents;
|
||||
import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
|
||||
import org.appspot.apprtc.util.LooperExecutor;
|
||||
import org.webrtc.IceCandidate;
|
||||
import org.webrtc.MediaConstraints;
|
||||
import org.webrtc.PeerConnection;
|
||||
import org.webrtc.SessionDescription;
|
||||
import org.webrtc.StatsReport;
|
||||
import org.webrtc.VideoRenderer;
|
||||
|
||||
import android.test.InstrumentationTestCase;
|
||||
@@ -167,6 +169,10 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
|
||||
fail("PC Error: " + description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPeerConnectionStatsReady(StatsReport[] reports) {
|
||||
}
|
||||
|
||||
// Helper wait functions.
|
||||
private boolean waitForLocalSDP(int timeoutMs)
|
||||
throws InterruptedException {
|
||||
@@ -220,8 +226,7 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
|
||||
SignalingParameters signalingParameters = new SignalingParameters(
|
||||
iceServers, true,
|
||||
pcConstraints, videoConstraints, audioConstraints,
|
||||
null, null,
|
||||
null, null,
|
||||
null, null, null,
|
||||
null, null);
|
||||
return signalingParameters;
|
||||
}
|
||||
@@ -229,12 +234,14 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
|
||||
PeerConnectionClient createPeerConnectionClient(MockRenderer localRenderer,
|
||||
MockRenderer remoteRenderer) {
|
||||
SignalingParameters signalingParameters = getTestSignalingParameters();
|
||||
PeerConnectionParameters peerConnectionParameters =
|
||||
new PeerConnectionParameters(0, 0, 0, 0, false);
|
||||
|
||||
PeerConnectionClient client = new PeerConnectionClient();
|
||||
client.createPeerConnectionFactory(
|
||||
getInstrumentation().getContext(), "VP8", true, null, this);
|
||||
client.createPeerConnection(
|
||||
localRenderer, remoteRenderer, signalingParameters, 1000);
|
||||
client.createPeerConnection(localRenderer, remoteRenderer,
|
||||
signalingParameters, peerConnectionParameters);
|
||||
client.createOffer();
|
||||
return client;
|
||||
}
|
||||
@@ -313,4 +320,5 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
|
||||
assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT));
|
||||
Log.d(TAG, "testLoopback Done.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user