Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1734)

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java

Issue 2464243002: Add Datachannel support to Android AppRTCMobile (Closed)
Patch Set: restore videoCapturerStopped = true Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
index ed31ba1ab3f39a46877ac932d7476021dcddb74c..d851843bf23aae0f841c53252f5c85f5d34a7a1e 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -36,6 +36,7 @@ import java.util.List;
import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters;
import org.appspot.apprtc.AppRTCClient.SignalingParameters;
import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
+import org.appspot.apprtc.PeerConnectionClient.DataChannelParameters;
import org.webrtc.Camera1Enumerator;
import org.webrtc.Camera2Enumerator;
import org.webrtc.CameraEnumerator;
@@ -97,6 +98,14 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
"org.appspot.apprtc.SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT";
public static final String EXTRA_USE_VALUES_FROM_INTENT =
"org.appspot.apprtc.USE_VALUES_FROM_INTENT";
+ public static final String EXTRA_DATA_CHANNEL_ENABLED = "org.appspot.apprtc.DATA_CHANNEL_ENABLED";
+ public static final String EXTRA_ORDERED = "org.appspot.apprtc.ORDERED";
+ public static final String EXTRA_MAX_RETRANSMITS_MS = "org.appspot.apprtc.MAX_RETRANSMITS_MS";
+ public static final String EXTRA_MAX_RETRANSMITS = "org.appspot.apprtc.MAX_RETRANSMITS";
+ public static final String EXTRA_PROTOCOL = "org.appspot.apprtc.PROTOCOL";
+ public static final String EXTRA_NEGOTIATED = "org.appspot.apprtc.NEGOTIATED";
+ public static final String EXTRA_ID = "org.appspot.apprtc.ID";
+
private static final String TAG = "CallRTCClient";
private static final int CAPTURE_PERMISSION_REQUEST_CODE = 1;
@@ -264,7 +273,13 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
videoWidth = displayMetrics.widthPixels;
videoHeight = displayMetrics.heightPixels;
}
-
+ DataChannelParameters dataChannelParameters = null;
+ if (intent.getBooleanExtra(EXTRA_DATA_CHANNEL_ENABLED, true)) {
+ dataChannelParameters = new DataChannelParameters(intent.getBooleanExtra(EXTRA_ORDERED, true),
+ intent.getIntExtra(EXTRA_MAX_RETRANSMITS_MS, -1),
+ intent.getIntExtra(EXTRA_MAX_RETRANSMITS, -1), intent.getStringExtra(EXTRA_PROTOCOL),
+ intent.getBooleanExtra(EXTRA_NEGOTIATED, false), intent.getIntExtra(EXTRA_ID, -1));
+ }
peerConnectionParameters =
new PeerConnectionParameters(intent.getBooleanExtra(EXTRA_VIDEO_CALL, true), loopback,
tracing, videoWidth, videoHeight, intent.getIntExtra(EXTRA_VIDEO_FPS, 0),
@@ -277,7 +292,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AEC, false),
intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AGC, false),
intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_NS, false),
- intent.getBooleanExtra(EXTRA_ENABLE_LEVEL_CONTROL, false));
+ intent.getBooleanExtra(EXTRA_ENABLE_LEVEL_CONTROL, false), dataChannelParameters);
commandLineRun = intent.getBooleanExtra(EXTRA_CMDLINE, false);
runTimeMs = intent.getIntExtra(EXTRA_RUNTIME, 0);

Powered by Google App Engine
This is Rietveld 408576698