Espresso test for loopback video quality testing

Update the AppRTCMobileTestStubbedVideoIO test to run on
phones without Internet connection. This is done by bringing up
a local instance of AppRTC on the Linux machine connected to
the Android device.

Running this test will need the webrtc.DEPS solution to be configured
for the checkout, since that will pull down the precompiled AppRTC
package that is needed.

Continued from http://crrev.com/2780493002#ps20001 (by kjellander@)
Continued from http://crrev.com/2741743002#ps180001 (by mandermo@)

BUG=webrtc:7185

Review-Url: https://codereview.webrtc.org/2825313002
Cr-Commit-Position: refs/heads/master@{#17838}
This commit is contained in:
oprypin
2017-04-24 04:15:13 -07:00
committed by Commit bot
parent 828a6e1f01
commit 30cda5ef98
7 changed files with 120 additions and 36 deletions

View File

@ -27,10 +27,16 @@ public interface AppRTCClient {
public final String roomUrl;
public final String roomId;
public final boolean loopback;
public RoomConnectionParameters(String roomUrl, String roomId, boolean loopback) {
public final String urlParameters;
public RoomConnectionParameters(
String roomUrl, String roomId, boolean loopback, String urlParameters) {
this.roomUrl = roomUrl;
this.roomId = roomId;
this.loopback = loopback;
this.urlParameters = urlParameters;
}
public RoomConnectionParameters(String roomUrl, String roomId, boolean loopback) {
this(roomUrl, roomId, loopback, null /* urlParameters */);
}
}

View File

@ -81,6 +81,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
}
public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID";
public static final String EXTRA_URLPARAMETERS = "org.appspot.apprtc.URLPARAMETERS";
public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK";
public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL";
public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAPTURE";
@ -337,7 +338,9 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
appRtcClient = new DirectRTCClient(this);
}
// Create connection parameters.
roomConnectionParameters = new RoomConnectionParameters(roomUri.toString(), roomId, loopback);
String urlParameters = intent.getStringExtra(EXTRA_URLPARAMETERS);
roomConnectionParameters =
new RoomConnectionParameters(roomUri.toString(), roomId, loopback, urlParameters);
// Create CPU monitor
cpuMonitor = new CpuMonitor(this);

View File

@ -139,7 +139,7 @@ public class RoomParametersFetcher {
}
}
// Request TURN servers.
if (!isTurnPresent) {
if (!isTurnPresent && roomJson.has("ice_server_url")) {
LinkedList<PeerConnection.IceServer> turnServers =
requestTurnServers(roomJson.getString("ice_server_url"));
for (PeerConnection.IceServer turnServer : turnServers) {

View File

@ -131,7 +131,11 @@ public class WebSocketRTCClient implements AppRTCClient, WebSocketChannelEvents
// Helper functions to get connection, post message and leave message URLs
private String getConnectionUrl(RoomConnectionParameters connectionParameters) {
return connectionParameters.roomUrl + "/" + ROOM_JOIN + "/" + connectionParameters.roomId;
String url = connectionParameters.roomUrl + "/" + ROOM_JOIN + "/" + connectionParameters.roomId;
if (connectionParameters.urlParameters != null) {
url += "?" + connectionParameters.urlParameters;
}
return url;
}
private String getMessageUrl(