mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
opt out of using DummySurface on specific Fire TV device
This commit is contained in:
parent
a1f89bec0d
commit
99d3e8f1d3
1 changed files with 8 additions and 1 deletions
|
|
@ -825,6 +825,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
||||||
private boolean shouldUseDummySurface(MediaCodecInfo codecInfo) {
|
private boolean shouldUseDummySurface(MediaCodecInfo codecInfo) {
|
||||||
return Util.SDK_INT >= 23
|
return Util.SDK_INT >= 23
|
||||||
&& !tunneling
|
&& !tunneling
|
||||||
|
&& !codecNeedsDummySurfaceWorkaround(codecInfo.name)
|
||||||
&& !codecNeedsSetOutputSurfaceWorkaround(codecInfo.name)
|
&& !codecNeedsSetOutputSurfaceWorkaround(codecInfo.name)
|
||||||
&& (!codecInfo.secure || DummySurface.isSecureSupported(context));
|
&& (!codecInfo.secure || DummySurface.isSecureSupported(context));
|
||||||
}
|
}
|
||||||
|
|
@ -1171,6 +1172,12 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
||||||
return Util.SDK_INT <= 22 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER);
|
return Util.SDK_INT <= 22 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean codecNeedsDummySurfaceWorkaround(String name) {
|
||||||
|
// Work around https://github.com/google/ExoPlayer/issues/4419.
|
||||||
|
return (("needle".equals(Util.DEVICE)) // FireTV 4K
|
||||||
|
&& "OMX.amlogic.avc.decoder.awesome".equals(name));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the device is known to implement {@link MediaCodec#setOutputSurface(Surface)}
|
* Returns whether the device is known to implement {@link MediaCodec#setOutputSurface(Surface)}
|
||||||
* incorrectly.
|
* incorrectly.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue