Widen setOutputSurface workaround
As part of this change: - Don't apply the workaround on API level 27+. GTS coverage should prevent such devices from existing. - Use Util.DEVICE consistently. - Remove the "// Device name", which don't really add much but make extra work when updating the list. Issue: #4468 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204889657
This commit is contained in:
parent
f155aa2563
commit
73af056da3
@ -85,6 +85,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
||||
// pending output streams that have fewer frames than the codec latency.
|
||||
private static final int MAX_PENDING_OUTPUT_STREAM_OFFSET_COUNT = 10;
|
||||
|
||||
private static boolean evaluatedDeviceNeedsSetOutputSurfaceWorkaround;
|
||||
private static boolean deviceNeedsSetOutputSurfaceWorkaround;
|
||||
|
||||
private final Context context;
|
||||
private final VideoFrameReleaseTimeHelper frameReleaseTimeHelper;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
@ -1201,8 +1204,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
||||
* incorrectly.
|
||||
*/
|
||||
protected boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
|
||||
if (name.startsWith("OMX.google")) {
|
||||
// Google software decoders are not known to have this issue on any device.
|
||||
if (Util.SDK_INT >= 27 || name.startsWith("OMX.google")) {
|
||||
// Devices running API level 27 or later should also be unaffected. Google OMX decoders are
|
||||
// not known to have this issue on any API level.
|
||||
return false;
|
||||
}
|
||||
// Work around:
|
||||
@ -1217,26 +1221,138 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
||||
// https://github.com/google/ExoPlayer/issues/4134,
|
||||
// https://github.com/google/ExoPlayer/issues/4315,
|
||||
// https://github.com/google/ExoPlayer/issues/4419,
|
||||
// https://github.com/google/ExoPlayer/issues/4460.
|
||||
return "deb".equals(Util.DEVICE) // Nexus 7 (2013)
|
||||
|| "flo".equals(Util.DEVICE) // Nexus 7 (2013)
|
||||
|| "mido".equals(Util.DEVICE) // Redmi Note 4
|
||||
|| "santoni".equals(Util.DEVICE) // Redmi 4X
|
||||
|| "ZB500KL".equals(Util.MODEL) // Asus Zenfone Go
|
||||
|| "tcl_eu".equals(Util.DEVICE) // TCL Percee TV
|
||||
|| "SVP-DTV15".equals(Util.DEVICE) // Sony Bravia 4K 2015
|
||||
|| "BRAVIA_ATV2".equals(Util.DEVICE) // Sony Bravia 4K GB
|
||||
|| "F3311".equals(Util.DEVICE) // Sony Xperia E5
|
||||
|| "M5c".equals(Util.DEVICE) // Meizu M5C
|
||||
|| "QM16XE_U".equals(Util.DEVICE) // Philips QM163E
|
||||
|| "A7010a48".equals(Util.DEVICE) // Lenovo K4 Note
|
||||
|| "woods_f".equals(Util.MODEL) // Moto E (4)
|
||||
|| "watson".equals(Util.DEVICE) // Moto C
|
||||
|| "ALE-L21".equals(Util.MODEL) // Huawei P8 Lite
|
||||
|| "CAM-L21".equals(Util.MODEL) // Huawei Y6II
|
||||
|| "HUAWEI VNS-L21".equals(Util.MODEL) // Huawei P9 Lite
|
||||
|| "AFTN".equals(Util.MODEL) // Amazon FireTV 4K
|
||||
|| Util.DEVICE.startsWith("panell_"); // Motorola Moto C Plus
|
||||
// https://github.com/google/ExoPlayer/issues/4460,
|
||||
// https://github.com/google/ExoPlayer/issues/4468.
|
||||
synchronized (MediaCodecVideoRenderer.class) {
|
||||
if (!evaluatedDeviceNeedsSetOutputSurfaceWorkaround) {
|
||||
switch (Util.DEVICE) {
|
||||
case "1601":
|
||||
case "1713":
|
||||
case "1714":
|
||||
case "A10-70F":
|
||||
case "A1601":
|
||||
case "A2016a40":
|
||||
case "A7000-a":
|
||||
case "A7000plus":
|
||||
case "A7010a48":
|
||||
case "A7020a48":
|
||||
case "AquaPowerM":
|
||||
case "Aura_Note_2":
|
||||
case "BLACK-1X":
|
||||
case "BRAVIA_ATV2":
|
||||
case "C1":
|
||||
case "ComioS1":
|
||||
case "CP8676_I02":
|
||||
case "CPH1609":
|
||||
case "CPY83_I00":
|
||||
case "cv1":
|
||||
case "cv3":
|
||||
case "deb":
|
||||
case "E5643":
|
||||
case "ELUGA_A3_Pro":
|
||||
case "ELUGA_Note":
|
||||
case "ELUGA_Prim":
|
||||
case "ELUGA_Ray_X":
|
||||
case "EverStar_S":
|
||||
case "F3111":
|
||||
case "F3113":
|
||||
case "F3116":
|
||||
case "F3211":
|
||||
case "F3213":
|
||||
case "F3215":
|
||||
case "F3311":
|
||||
case "flo":
|
||||
case "GiONEE_CBL7513":
|
||||
case "GiONEE_GBL7319":
|
||||
case "GIONEE_GBL7360":
|
||||
case "GIONEE_SWW1609":
|
||||
case "GIONEE_SWW1627":
|
||||
case "GIONEE_SWW1631":
|
||||
case "GIONEE_WBL5708":
|
||||
case "GIONEE_WBL7365":
|
||||
case "GIONEE_WBL7519":
|
||||
case "griffin":
|
||||
case "htc_e56ml_dtul":
|
||||
case "hwALE-H":
|
||||
case "HWBLN-H":
|
||||
case "HWCAM-H":
|
||||
case "HWVNS-H":
|
||||
case "iball8735_9806":
|
||||
case "Infinix-X572":
|
||||
case "iris60":
|
||||
case "itel_S41":
|
||||
case "j2xlteins":
|
||||
case "JGZ":
|
||||
case "K50a40":
|
||||
case "le_x6":
|
||||
case "LS-5017":
|
||||
case "M5c":
|
||||
case "manning":
|
||||
case "marino_f":
|
||||
case "MEIZU_M5":
|
||||
case "mh":
|
||||
case "mido":
|
||||
case "MX6":
|
||||
case "namath":
|
||||
case "nicklaus_f":
|
||||
case "NX541J":
|
||||
case "NX573J":
|
||||
case "OnePlus5T":
|
||||
case "p212":
|
||||
case "P681":
|
||||
case "P85":
|
||||
case "panell_d":
|
||||
case "panell_dl":
|
||||
case "panell_ds":
|
||||
case "panell_dt":
|
||||
case "PB2-670M":
|
||||
case "PGN528":
|
||||
case "PGN610":
|
||||
case "PGN611":
|
||||
case "Phantom6":
|
||||
case "Pixi4-7_3G":
|
||||
case "Pixi5-10_4G":
|
||||
case "PLE":
|
||||
case "Q350":
|
||||
case "Q4260":
|
||||
case "Q427":
|
||||
case "Q4310":
|
||||
case "Q5":
|
||||
case "QM16XE_U":
|
||||
case "QX1":
|
||||
case "santoni":
|
||||
case "Slate_Pro":
|
||||
case "SVP-DTV15":
|
||||
case "s905x018":
|
||||
case "taido_row":
|
||||
case "TB3-730F":
|
||||
case "TB3-730X":
|
||||
case "TB3-850F":
|
||||
case "TB3-850M":
|
||||
case "tcl_eu":
|
||||
case "V1":
|
||||
case "V23GB":
|
||||
case "V5":
|
||||
case "vernee_M5":
|
||||
case "watson":
|
||||
case "whyred":
|
||||
case "woods_f":
|
||||
case "woods_fn":
|
||||
case "X3_HK":
|
||||
case "XE2X":
|
||||
case "XT1663":
|
||||
case "Z12_PRO":
|
||||
case "Z80":
|
||||
deviceNeedsSetOutputSurfaceWorkaround = true;
|
||||
break;
|
||||
default:
|
||||
// Workaround not required.
|
||||
break;
|
||||
}
|
||||
evaluatedDeviceNeedsSetOutputSurfaceWorkaround = true;
|
||||
}
|
||||
}
|
||||
return deviceNeedsSetOutputSurfaceWorkaround;
|
||||
}
|
||||
|
||||
protected static final class CodecMaxValues {
|
||||
|
Loading…
x
Reference in New Issue
Block a user