mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-04 06:56:06 +00:00
Initial implementation of AV1
This commit is contained in:
@@ -405,9 +405,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
this);
|
||||
|
||||
// Don't stream HDR if the decoder can't support it
|
||||
if (willStreamHdr && !decoderRenderer.isHevcMain10Hdr10Supported()) {
|
||||
if (willStreamHdr && !decoderRenderer.isHevcMain10Hdr10Supported() && !decoderRenderer.isAv1Main10Supported()) {
|
||||
willStreamHdr = false;
|
||||
Toast.makeText(this, "Decoder does not support HEVC Main10HDR10", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, "Decoder does not support HDR10 profile", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
// Display a message to the user if HEVC was forced on but we still didn't find a decoder
|
||||
@@ -415,6 +415,23 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
Toast.makeText(this, "No HEVC decoder found.\nFalling back to H.264.", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
// TODO: Display a message to the user if HEVC was forced on but we still didn't find a decoder
|
||||
|
||||
// H.264 is always supported
|
||||
int supportedVideoFormats = MoonBridge.VIDEO_FORMAT_H264;
|
||||
if (decoderRenderer.isHevcSupported()) {
|
||||
supportedVideoFormats |= MoonBridge.VIDEO_FORMAT_H265;
|
||||
if (decoderRenderer.isHevcMain10Hdr10Supported()) {
|
||||
supportedVideoFormats |= MoonBridge.VIDEO_FORMAT_H265_MAIN10;
|
||||
}
|
||||
}
|
||||
if (decoderRenderer.isAv1Supported()) {
|
||||
supportedVideoFormats |= MoonBridge.VIDEO_FORMAT_AV1_MAIN8;
|
||||
if (decoderRenderer.isAv1Main10Supported()) {
|
||||
supportedVideoFormats |= MoonBridge.VIDEO_FORMAT_AV1_MAIN10;
|
||||
}
|
||||
}
|
||||
|
||||
int gamepadMask = ControllerHandler.getAttachedControllerMask(this);
|
||||
if (!prefConfig.multiController) {
|
||||
// Always set gamepad 1 present for when multi-controller is
|
||||
@@ -464,7 +481,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
.setMaxPacketSize(1392)
|
||||
.setRemoteConfiguration(StreamConfiguration.STREAM_CFG_AUTO) // NvConnection will perform LAN and VPN detection
|
||||
.setHevcBitratePercentageMultiplier(75)
|
||||
.setHevcSupported(decoderRenderer.isHevcSupported())
|
||||
.setAv1BitratePercentageMultiplier(60)
|
||||
.setSupportedVideoFormats(supportedVideoFormats)
|
||||
.setEnableHdr(willStreamHdr)
|
||||
.setAttachedGamepadMask(gamepadMask)
|
||||
.setClientRefreshRateX100((int)(displayRefreshRate * 100))
|
||||
|
||||
Reference in New Issue
Block a user