mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-20 07:20:19 +00:00
Use HEVC on iOS 11.3 and later. Fixes #296
This commit is contained in:
@@ -342,17 +342,16 @@ void ClLogMessage(const char* format, ...)
|
|||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
// On iOS 11, we can use HEVC if the server supports encoding it
|
// On iOS 11, we can use HEVC if the server supports encoding it
|
||||||
// and this device has hardware decode for it (A9 and later)
|
// and this device has hardware decode for it (A9 and later).
|
||||||
if (@available(iOS 11.0, *)) {
|
// Additionally, iPhone X had a bug which would cause video
|
||||||
// FIXME: Disabled due to incompatibility with iPhone X causing video
|
// to freeze after a few minutes with HEVC prior to iOS 11.3.
|
||||||
// to freeze. Additionally, RFI is not supported so packet loss recovery
|
// As a result, we will only use HEVC on iOS 11.3 or later.
|
||||||
// is worse with HEVC than H.264.
|
if (@available(iOS 11.3, *)) {
|
||||||
|
_streamConfig.supportsHevc = VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
|
||||||
// Streaming with a limited bandwith will result in better quality with HEVC
|
|
||||||
//_streamConfig.supportsHevc = VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (@available(macOS 10.13, *)) {
|
if (@available(macOS 10.13, *)) {
|
||||||
|
// Streaming with limited bandwidth will result in better quality with HEVC
|
||||||
if (VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC) || _streamConfig.streamingRemotely != 0)
|
if (VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC) || _streamConfig.streamingRemotely != 0)
|
||||||
_streamConfig.supportsHevc = true;
|
_streamConfig.supportsHevc = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user