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

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

Issue 1452423003: Add option to capture to texture in AppRTCDemo for Android. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: factory.setVideoHwAccelerationOptions. Created 5 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/PeerConnectionClient.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
index 7c292aeee79b2acc7608159bdec51eb3c9cb0393..77e78c4a2231da776b48ce2ceaa32945f2d25447 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -133,6 +133,7 @@ public class PeerConnectionClient {
public final int videoStartBitrate;
public final String videoCodec;
public final boolean videoCodecHwAcceleration;
+ public final boolean captureToTexture;
public final int audioStartBitrate;
public final String audioCodec;
public final boolean noAudioProcessing;
@@ -141,7 +142,7 @@ public class PeerConnectionClient {
public PeerConnectionParameters(
boolean videoCallEnabled, boolean loopback,
int videoWidth, int videoHeight, int videoFps, int videoStartBitrate,
- String videoCodec, boolean videoCodecHwAcceleration,
+ String videoCodec, boolean videoCodecHwAcceleration, boolean captureToTexture,
int audioStartBitrate, String audioCodec,
boolean noAudioProcessing, boolean useOpenSLES) {
this.videoCallEnabled = videoCallEnabled;
@@ -152,6 +153,7 @@ public class PeerConnectionClient {
this.videoStartBitrate = videoStartBitrate;
this.videoCodec = videoCodec;
this.videoCodecHwAcceleration = videoCodecHwAcceleration;
+ this.captureToTexture = captureToTexture;
this.audioStartBitrate = audioStartBitrate;
this.audioCodec = audioCodec;
this.noAudioProcessing = noAudioProcessing;
@@ -429,7 +431,7 @@ public class PeerConnectionClient {
if (videoCallEnabled) {
Log.d(TAG, "EGLContext: " + renderEGLContext);
- factory.setVideoHwAccelerationOptions(renderEGLContext);
+ factory.setVideoHwAccelerationOptions(renderEGLContext, renderEGLContext);
}
PeerConnection.RTCConfiguration rtcConfig =
@@ -462,7 +464,8 @@ public class PeerConnectionClient {
cameraDeviceName = frontCameraDeviceName;
}
Log.d(TAG, "Opening camera: " + cameraDeviceName);
- videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null);
+ videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null,
+ peerConnectionParameters.captureToTexture ? renderEGLContext : null);
if (videoCapturer == null) {
reportError("Failed to open camera");
return;

Powered by Google App Engine
This is Rietveld 408576698