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

Unified Diff: webrtc/api/java/jni/surfacetexturehelper_jni.h

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
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/api/java/jni/surfacetexturehelper_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/jni/surfacetexturehelper_jni.h
diff --git a/webrtc/api/java/jni/surfacetexturehelper_jni.h b/webrtc/api/java/jni/surfacetexturehelper_jni.h
index 849c66b5dd2ca6e418d47b82c376ffd392fbbe47..d7a9a7707ab7471009b24ec5e4a6ad9e75d4a7db 100644
--- a/webrtc/api/java/jni/surfacetexturehelper_jni.h
+++ b/webrtc/api/java/jni/surfacetexturehelper_jni.h
@@ -38,9 +38,9 @@ namespace webrtc_jni {
// 4. Call CreateTextureFrame to wrap the Java texture in a VideoFrameBuffer.
class SurfaceTextureHelper : public rtc::RefCountInterface {
public:
- SurfaceTextureHelper(JNIEnv* jni,
- const char* thread_name,
- jobject j_egl_context);
+ // Might return null if creating the Java SurfaceTextureHelper fails.
+ static rtc::scoped_refptr<SurfaceTextureHelper> create(
+ JNIEnv* jni, const char* thread_name, jobject j_egl_context);
jobject GetJavaSurfaceTextureHelper() const;
@@ -51,6 +51,7 @@ class SurfaceTextureHelper : public rtc::RefCountInterface {
protected:
~SurfaceTextureHelper();
+ SurfaceTextureHelper(JNIEnv* jni, jobject j_surface_texture_helper);
private:
// May be called on arbitrary thread.
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/api/java/jni/surfacetexturehelper_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698