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

Unified Diff: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 1840193007: Android: Handle SurfaceTextureHelper ctor failure for decoder and capturer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing perkj@s comments Created 4 years, 7 months 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/api/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
index e4f2449cb9d70add50eb3dc63f948c833a83f40d..39ed12cfa3d2708c9b0ee74c3724a0d707154ad7 100644
--- a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -369,7 +369,11 @@ public class VideoCapturerAndroid implements
final CapturerObserver frameObserver) {
Logging.d(TAG, "startCapture requested: " + width + "x" + height + "@" + framerate);
if (surfaceTextureHelper == null) {
- throw new IllegalArgumentException("surfaceTextureHelper not set.");
+ frameObserver.onCapturerStarted(false /* success */);
+ if (eventsHandler != null) {
+ eventsHandler.onCameraError("No SurfaceTexture created.");
+ }
+ return;
}
if (applicationContext == null) {
throw new IllegalArgumentException("applicationContext not set.");
« no previous file with comments | « webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java ('k') | webrtc/api/java/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698