Remove MediaCodec error suggestion fix
Now that scrcpy attempts with a lower definition on any MediaCodec error (or the user explicitly requests to disable auto-downsizing), the suggestion is unnecessary. PR #2947 <https://github.com/Genymobile/scrcpy/pull/2947>
This commit is contained in:
parent
15bf27afdd
commit
0ec64baad4
1 changed files with 0 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
|||
package com.genymobile.scrcpy;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.media.MediaCodec;
|
||||
import android.media.MediaCodecInfo;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
|
@ -267,16 +266,6 @@ public final class Server {
|
|||
}
|
||||
|
||||
private static void suggestFix(Throwable e) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (e instanceof MediaCodec.CodecException) {
|
||||
MediaCodec.CodecException mce = (MediaCodec.CodecException) e;
|
||||
if (mce.getErrorCode() == 0xfffffc0e) {
|
||||
Ln.e("The hardware encoder is not able to encode at the given definition.");
|
||||
Ln.e("Try with a lower definition:");
|
||||
Ln.e(" scrcpy -m 1024");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e instanceof InvalidDisplayIdException) {
|
||||
InvalidDisplayIdException idie = (InvalidDisplayIdException) e;
|
||||
int[] displayIds = idie.getAvailableDisplayIds();
|
||||
|
|
Loading…
Reference in a new issue