mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-11 10:26:04 +00:00
Update moonlight-common-c
This commit is contained in:
@@ -637,7 +637,6 @@ static NSMutableSet* hostList;
|
||||
_streamConfig.bitRate = [streamSettings.bitrate intValue];
|
||||
_streamConfig.optimizeGameSettings = streamSettings.optimizeGames;
|
||||
_streamConfig.playAudioOnPC = streamSettings.playAudioOnPC;
|
||||
_streamConfig.allowHevc = streamSettings.useHevc;
|
||||
_streamConfig.useFramePacing = streamSettings.useFramePacing;
|
||||
_streamConfig.swapABXYButtons = streamSettings.swapABXYButtons;
|
||||
|
||||
@@ -661,17 +660,19 @@ static NSMutableSet* hostList;
|
||||
_streamConfig.audioConfiguration = AUDIO_CONFIGURATION_STEREO;
|
||||
}
|
||||
|
||||
// HDR requires HDR10 display and HEVC Main10 decoder on the client.
|
||||
// It additionally requires an HEVC Main10 encoder on the server (GTX 1000+).
|
||||
//
|
||||
// It should also be a user preference, since some games may require higher peak
|
||||
// brightness than the iOS device can support to look correct in HDR mode.
|
||||
if (@available(iOS 11.3, tvOS 11.2, *)) {
|
||||
_streamConfig.enableHdr =
|
||||
(app.host.serverCodecModeSupport & 0x200) != 0 && // HEVC Main10 encoding on host PC GPU
|
||||
VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC) && // Decoder supported
|
||||
(AVPlayer.availableHDRModes & AVPlayerHDRModeHDR10) != 0 && // Display supported
|
||||
streamSettings.enableHdr; // User wants it enabled
|
||||
_streamConfig.serverCodecModeSupport = app.host.serverCodecModeSupport;
|
||||
|
||||
// H.264 is always supported
|
||||
_streamConfig.supportedVideoFormats = VIDEO_FORMAT_H264;
|
||||
|
||||
// HEVC is supported if the user wants it (or it's required by the chosen resolution) and the SoC supports it
|
||||
if ((_streamConfig.width > 4096 || _streamConfig.height > 4096 || streamSettings.useHevc || streamSettings.enableHdr) && VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) {
|
||||
_streamConfig.supportedVideoFormats |= VIDEO_FORMAT_H265;
|
||||
|
||||
// HEVC Main10 is supported if the user wants it and the display supports it
|
||||
if (streamSettings.enableHdr && (AVPlayer.availableHDRModes & AVPlayerHDRModeHDR10) != 0) {
|
||||
_streamConfig.supportedVideoFormats |= VIDEO_FORMAT_H265_MAIN10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user