mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-11 01:10:32 +00:00
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,7 +1,6 @@
|
|||||||
package com.genymobile.scrcpy;
|
package com.genymobile.scrcpy;
|
||||||
|
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.media.MediaCodec;
|
|
||||||
import android.media.MediaCodecInfo;
|
import android.media.MediaCodecInfo;
|
||||||
import android.os.BatteryManager;
|
import android.os.BatteryManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -267,16 +266,6 @@ public final class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void suggestFix(Throwable e) {
|
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) {
|
if (e instanceof InvalidDisplayIdException) {
|
||||||
InvalidDisplayIdException idie = (InvalidDisplayIdException) e;
|
InvalidDisplayIdException idie = (InvalidDisplayIdException) e;
|
||||||
int[] displayIds = idie.getAvailableDisplayIds();
|
int[] displayIds = idie.getAvailableDisplayIds();
|
||||||
|
Loading…
Reference in New Issue
Block a user