mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix direct submit behavior in decoders since the addition of HEVC
This commit is contained in:
parent
ac7504e017
commit
f409a3583c
@ -109,6 +109,20 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
||||
else {
|
||||
LimeLog.info("No HEVC decoder found");
|
||||
}
|
||||
|
||||
// Set attributes that are queried in getCapabilities(). This must be done here
|
||||
// because getCapabilities() may be called before setup() in current versions of the common
|
||||
// library. The limitation of this is that we don't know whether we're using HEVC or AVC, so
|
||||
// we just assume AVC. This isn't really a problem because the capabilities are usually
|
||||
// shared between AVC and HEVC decoders on the same device.
|
||||
if (avcDecoderName != null) {
|
||||
directSubmit = MediaCodecHelper.decoderCanDirectSubmit(avcDecoderName);
|
||||
adaptivePlayback = MediaCodecHelper.decoderSupportsAdaptivePlayback(avcDecoderName);
|
||||
|
||||
if (directSubmit) {
|
||||
LimeLog.info("Decoder "+avcDecoderName+" will use direct submit");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -171,14 +185,6 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set decoder-specific attributes
|
||||
directSubmit = MediaCodecHelper.decoderCanDirectSubmit(selectedDecoderName);
|
||||
adaptivePlayback = MediaCodecHelper.decoderSupportsAdaptivePlayback(selectedDecoderName);
|
||||
|
||||
if (directSubmit) {
|
||||
LimeLog.info("Decoder "+selectedDecoderName+" will use direct submit");
|
||||
}
|
||||
|
||||
// Codecs have been known to throw all sorts of crazy runtime exceptions
|
||||
// due to implementation problems
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user