Selaa lähdekoodia

android: disable HW accelerated decoding on Samsung

They just keep crashing.
master
Saúl Ibarra Corretgé 5 vuotta sitten
vanhempi
commit
38d1032fec

+ 12
- 7
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Näytä tiedosto

17
 package org.jitsi.meet.sdk;
17
 package org.jitsi.meet.sdk;
18
 
18
 
19
 import android.app.Activity;
19
 import android.app.Activity;
20
+import android.os.Build;
21
+
20
 import androidx.annotation.Nullable;
22
 import androidx.annotation.Nullable;
21
 
23
 
22
 import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
24
 import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
90
         options.setAudioDeviceModule(adm);
92
         options.setAudioDeviceModule(adm);
91
 
93
 
92
         VideoEncoderFactory videoEncoderFactory = new SoftwareVideoEncoderFactory();
94
         VideoEncoderFactory videoEncoderFactory = new SoftwareVideoEncoderFactory();
93
-        VideoDecoderFactory videoDecoderFactory;
95
+        VideoDecoderFactory videoDecoderFactory = new SoftwareVideoDecoderFactory();
96
+
94
         // Initialize EGL context required for HW acceleration. We are only going to use it for
97
         // Initialize EGL context required for HW acceleration. We are only going to use it for
95
         // decoding.
98
         // decoding.
96
-        EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
97
-        if (eglContext == null) {
98
-            // Fallback to the software decoder.
99
-            videoDecoderFactory = new SoftwareVideoDecoderFactory();
100
-        } else {
101
-            videoDecoderFactory = new DefaultVideoDecoderFactory(eglContext);
99
+        // NOTE: We are explicitly skipping Samsung devices because we have observed a high crash
100
+        // count on them.
101
+        if (!Build.MANUFACTURER.toLowerCase().contains("samsung")) {
102
+            EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
103
+            if (eglContext != null) {
104
+                videoDecoderFactory = new DefaultVideoDecoderFactory(eglContext);
105
+            }
102
         }
106
         }
107
+
103
         options.setVideoDecoderFactory(videoDecoderFactory);
108
         options.setVideoDecoderFactory(videoDecoderFactory);
104
         options.setVideoEncoderFactory(videoEncoderFactory);
109
         options.setVideoEncoderFactory(videoEncoderFactory);
105
 
110
 

Loading…
Peruuta
Tallenna