mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-26 06:22:45 +00:00
Fix streaming in the Android 12 emulator
This commit is contained in:
parent
e636a7171b
commit
54ebd0a796
@ -40,6 +40,8 @@ public class MediaCodecHelper {
|
|||||||
private static final List<String> blacklisted59FpsDecoderPrefixes;
|
private static final List<String> blacklisted59FpsDecoderPrefixes;
|
||||||
private static final List<String> qualcommDecoderPrefixes;
|
private static final List<String> qualcommDecoderPrefixes;
|
||||||
|
|
||||||
|
public static final boolean IS_EMULATOR = Build.HARDWARE.equals("ranchu") || Build.HARDWARE.equals("cheets");
|
||||||
|
|
||||||
private static boolean isLowEndSnapdragon = false;
|
private static boolean isLowEndSnapdragon = false;
|
||||||
private static boolean isAdreno620 = false;
|
private static boolean isAdreno620 = false;
|
||||||
private static boolean initialized = false;
|
private static boolean initialized = false;
|
||||||
@ -78,7 +80,7 @@ public class MediaCodecHelper {
|
|||||||
|
|
||||||
// Blacklist software decoders that don't support H264 high profile,
|
// Blacklist software decoders that don't support H264 high profile,
|
||||||
// but exclude the official AOSP and CrOS emulator from this restriction.
|
// but exclude the official AOSP and CrOS emulator from this restriction.
|
||||||
if (!Build.HARDWARE.equals("ranchu") && !Build.HARDWARE.equals("cheets")) {
|
if (!IS_EMULATOR) {
|
||||||
blacklistedDecoderPrefixes.add("omx.google");
|
blacklistedDecoderPrefixes.add("omx.google");
|
||||||
blacklistedDecoderPrefixes.add("AVCDecoder");
|
blacklistedDecoderPrefixes.add("AVCDecoder");
|
||||||
}
|
}
|
||||||
@ -586,7 +588,7 @@ public class MediaCodecHelper {
|
|||||||
private static boolean isCodecBlacklisted(MediaCodecInfo codecInfo) {
|
private static boolean isCodecBlacklisted(MediaCodecInfo codecInfo) {
|
||||||
// Use the new isSoftwareOnly() function on Android Q
|
// Use the new isSoftwareOnly() function on Android Q
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
if (codecInfo.isSoftwareOnly()) {
|
if (!IS_EMULATOR && codecInfo.isSoftwareOnly()) {
|
||||||
LimeLog.info("Skipping software-only decoder: "+codecInfo.getName());
|
LimeLog.info("Skipping software-only decoder: "+codecInfo.getName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user