mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-20 23:37:15 +00:00
Only use HEVC if the client has hardware-accelerated decoding
This commit is contained in:
1 parent
b99988836a
commit
de5377a95d
1 file changed
+3
-1
@@ -10,6 +10,7 @@
|
||||
|
||||
#import <AudioUnit/AudioUnit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <VideoToolbox/VideoToolbox.h>
|
||||
|
||||
#include "Limelight.h"
|
||||
#include "opus.h"
|
||||
@@ -321,8 +322,9 @@ void ClLogMessage(const char* format, ...)
|
||||
_streamConfig.bitrate = config.bitRate;
|
||||
|
||||
// On iOS 11, we can use HEVC if the server supports encoding it
|
||||
// and this device has hardware decode for it (A9 and later)
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_streamConfig.supportsHevc = 1;
|
||||
_streamConfig.supportsHevc = VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
|
||||
}
|
||||
|
||||
// FIXME: We should use 1024 when streaming remotely
|
||||
|
||||
Reference in new issue
Block a user