mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Disables Adaptive workaround for Odroid-XU4 up to SDK 19 in Samsung's Exynos AVC and AVC secure decoders
This commit is contained in:
parent
9aee406c8e
commit
42f3dcf0da
1 changed files with 6 additions and 8 deletions
|
|
@ -337,7 +337,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
String codecName = decoderInfo.name;
|
String codecName = decoderInfo.name;
|
||||||
codecIsAdaptive = decoderInfo.adaptive && codecSupportsAdaptive(codecName, format);
|
codecIsAdaptive = decoderInfo.adaptive && (codecNeedsDisableAdaptationWorkaround(codecName)==false);
|
||||||
codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format);
|
codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format);
|
||||||
codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName);
|
codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName);
|
||||||
codecNeedsAdaptationWorkaround = codecNeedsAdaptationWorkaround(codecName);
|
codecNeedsAdaptationWorkaround = codecNeedsAdaptationWorkaround(codecName);
|
||||||
|
|
@ -1171,18 +1171,16 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||||
&& "OMX.MTK.AUDIO.DECODER.MP3".equals(name);
|
&& "OMX.MTK.AUDIO.DECODER.MP3".equals(name);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns whether the decoder is known to be non Adaptive.
|
* Returns whether the decoder is needs Apaptive workaround disabled
|
||||||
* <p>
|
* <p>
|
||||||
* If false is returned then we explicitly override codecIsAdaptive,
|
* If false is returned then we explicitly override codecIsAdaptive,
|
||||||
* setting it to false.
|
* setting it to false.
|
||||||
*
|
*
|
||||||
* @param name The decoder name.
|
* @return TRUE if the device needs Adaptive workaround disabled
|
||||||
* @param format The input format.
|
|
||||||
* @return False if the device is known to be non adaptive .
|
|
||||||
*/
|
*/
|
||||||
private static boolean codecSupportsAdaptive(String name, Format format) {
|
private static boolean codecNeedsDisableAdaptationWorkaround(String name) {
|
||||||
return !(
|
return (
|
||||||
(Util.SDK_INT == 19 && Util.MODEL.equals("ODROID-XU3")
|
(Util.SDK_INT <= 19 && Util.MODEL.equals("ODROID-XU3")
|
||||||
&& ("OMX.Exynos.AVC.Decoder".equals(name) || "OMX.Exynos.AVC.Decoder.secure".equals(name))));
|
&& ("OMX.Exynos.AVC.Decoder".equals(name) || "OMX.Exynos.AVC.Decoder.secure".equals(name))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue