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 <https://github.com/Genymobile/scrcpy/pull/2947>
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();
