Add many new preferences to settings DB. Default HEVC to off due to reference frame invalidation not working

This commit is contained in:
Cameron Gutman
2018-06-02 17:07:38 -07:00
parent 2f0e219726
commit bfc0b89926
10 changed files with 40 additions and 20 deletions

View File

@@ -297,6 +297,11 @@ void ClLogMessage(const char* format, ...)
Log(LOG_E, @"Unknown audio channel count: %d", config.audioChannelCount);
abort();
}
// HDR implies HEVC allowed
if (config.enableHdr) {
config.allowHevc = YES;
}
#if TARGET_OS_IPHONE
// On iOS 11, we can use HEVC if the server supports encoding it
@@ -305,13 +310,13 @@ void ClLogMessage(const char* format, ...)
// to freeze after a few minutes with HEVC prior to iOS 11.3.
// As a result, we will only use HEVC on iOS 11.3 or later.
if (@available(iOS 11.3, *)) {
_streamConfig.supportsHevc = VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
_streamConfig.supportsHevc = config.allowHevc && VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
}
#else
if (@available(macOS 10.13, *)) {
// Streaming with limited bandwidth will result in better quality with HEVC
if (VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC) || _streamConfig.streamingRemotely != 0)
_streamConfig.supportsHevc = true;
_streamConfig.supportsHevc = config.allowHevc;
}
#endif

View File

@@ -18,7 +18,7 @@
@property int frameRate;
@property int bitRate;
@property int riKeyId;
@property int streamingRemotely;
@property BOOL streamingRemotely;
@property NSData* riKey;
@property int gamepadMask;
@property BOOL optimizeGameSettings;
@@ -27,5 +27,6 @@
@property int audioChannelMask;
@property BOOL enableHdr;
@property BOOL multiController;
@property BOOL allowHevc;
@end

View File

@@ -9,5 +9,5 @@
#import "StreamConfiguration.h"
@implementation StreamConfiguration
@synthesize host, appID, width, height, frameRate, bitRate, riKeyId, riKey, gamepadMask, streamingRemotely, appName, optimizeGameSettings, playAudioOnPC, audioChannelMask, audioChannelCount, enableHdr, multiController;
@synthesize host, appID, width, height, frameRate, bitRate, riKeyId, riKey, gamepadMask, streamingRemotely, appName, optimizeGameSettings, playAudioOnPC, audioChannelMask, audioChannelCount, enableHdr, multiController, allowHevc;
@end