Merge branch 'Integration' into stylus3
full color range switch
This commit is contained in:
@@ -584,6 +584,29 @@
|
||||
<constraint firstAttribute="height" constant="31" id="8mE-tx-T8i"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="iPd-Rg-St7" userLabel="fullColorRangeStack">
|
||||
<rect key="frame" x="432" y="1901" width="280" height="31"/>
|
||||
<subviews>
|
||||
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Full Color Range" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iPd-Ra-Lbl" userLabel="fullRangeLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="130" id="iPd-Ra-Wdt"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<switch verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iPd-Wt-Ch9" userLabel="fullRangeSwitch">
|
||||
<rect key="frame" x="150" y="0.0" width="132" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="130" id="iPd-Wt-Wdt"/>
|
||||
</constraints>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="31" id="iPd-Ht-Con"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="H8p-G9-pnl" userLabel="performanceGraphs Stack">
|
||||
<rect key="frame" x="440" y="1198" width="380" height="68"/>
|
||||
<subviews>
|
||||
@@ -1962,6 +1985,8 @@
|
||||
<outlet property="frameQueueSizeSlider" destination="oZa-8Y-icz" id="Jo1-Fx-UMw"/>
|
||||
<outlet property="frameQueueSizeStack" destination="MML-c1-D5j" id="82B-r7-Zbh"/>
|
||||
<outlet property="framerateSelector" destination="8hF-kb-2uV" id="dfT-hb-csE"/>
|
||||
<outlet property="fullColorRangeStack" destination="iPd-Rg-St7" id="iPd-Out-Let"/>
|
||||
<outlet property="fullColorRangeSwitch" destination="iPd-Wt-Ch9" id="iPd-Out-Swt"/>
|
||||
<outlet property="graphOpacityStack" destination="P6m-Zv-R4H" id="QEV-kA-A3a"/>
|
||||
<outlet property="graphOpacityStepper" destination="DQq-4U-avd" id="Nwr-0I-Q8G"/>
|
||||
<outlet property="gyroModeSelector" destination="aa5-3y-I4d" id="FsX-kH-h7w"/>
|
||||
|
||||
@@ -1739,6 +1739,29 @@
|
||||
<constraint firstAttribute="height" constant="31" id="DlE-MW-o6j"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="fRg-Rn-St7" userLabel="fullColorRangeStack">
|
||||
<rect key="frame" x="437" y="1659" width="280" height="31"/>
|
||||
<subviews>
|
||||
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Full Color Range" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fRl-Ra-Lbl" userLabel="fullRangeLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="130" id="fRl-Ra-Wdt"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<switch verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fRs-Wt-Ch9" userLabel="fullRangeSwitch">
|
||||
<rect key="frame" x="150" y="0.0" width="132" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="130" id="fRs-Wt-Wdt"/>
|
||||
</constraints>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="31" id="fRg-Ht-Con"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9eE-iu-W90" userLabel="backgroundSessionTimerStack">
|
||||
<rect key="frame" x="437" y="1397" width="380" height="55.5"/>
|
||||
<subviews>
|
||||
@@ -2775,6 +2798,8 @@
|
||||
<outlet property="frameQueueSizeSlider" destination="thv-JE-onX" id="gKD-6c-5tw"/>
|
||||
<outlet property="frameQueueSizeStack" destination="IHx-FO-ctr" id="gob-Ea-Avh"/>
|
||||
<outlet property="framerateSelector" destination="dAN-Gy-Eg7" id="tMv-Va-PhO"/>
|
||||
<outlet property="fullColorRangeStack" destination="fRg-Rn-St7" id="fRg-Out-Let"/>
|
||||
<outlet property="fullColorRangeSwitch" destination="fRs-Wt-Ch9" id="fRs-Out-Let"/>
|
||||
<outlet property="graphOpacityStack" destination="Dfy-4R-t2l" id="GSD-WX-VF1"/>
|
||||
<outlet property="graphOpacityStepper" destination="TIF-tB-E8s" id="qIa-PX-8PS"/>
|
||||
<outlet property="gyroModeSelector" destination="PIo-LV-9Gt" id="6Mc-5v-dmJ"/>
|
||||
|
||||
@@ -123,6 +123,7 @@ typedef NS_ENUM(NSInteger, PencilTickMode) {
|
||||
preferredCodec:(uint32_t)preferredCodec
|
||||
enableYUV444:(BOOL)enableYUV444
|
||||
enablePIP:(BOOL)enablePIP
|
||||
fullRange:(BOOL)fullRange
|
||||
enableHdr:(BOOL)enableHdr
|
||||
btMouseSupport:(BOOL)btMouseSupport
|
||||
// absoluteTouchMode:(BOOL)absoluteTouchMode
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
preferredCodec:(uint32_t)preferredCodec
|
||||
enableYUV444:(BOOL)enableYUV444
|
||||
enablePIP:(BOOL)enablePIP
|
||||
fullRange:(BOOL)fullRange
|
||||
enableHdr:(BOOL)enableHdr
|
||||
btMouseSupport:(BOOL)btMouseSupport
|
||||
// absoluteTouchMode:(BOOL)absoluteTouchMode
|
||||
@@ -163,6 +164,7 @@
|
||||
settingsToSave.preferredCodec = preferredCodec;
|
||||
settingsToSave.enableYUV444 = enableYUV444;
|
||||
settingsToSave.enablePIP = enablePIP;
|
||||
settingsToSave.fullColorRange = fullRange;
|
||||
settingsToSave.enableHdr = enableHdr;
|
||||
settingsToSave.btMouseSupport = btMouseSupport;
|
||||
// settingsToSave.absoluteTouchMode = absoluteTouchMode;
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
} preferredCodec;
|
||||
@property (nonatomic) BOOL enableYUV444;
|
||||
@property (nonatomic) BOOL enablePIP;
|
||||
@property (nonatomic) BOOL fullColorRange;
|
||||
@property (nonatomic) BOOL reverseMouseWheelDirection;
|
||||
@property (nonatomic, retain) NSNumber * asyncNativeTouchPriority;
|
||||
@property (nonatomic) BOOL multiController;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
self.preferredCodec = (typeof(self.preferredCodec))[[NSUserDefaults standardUserDefaults] integerForKey:@"preferredCodec"];
|
||||
self.enableYUV444 = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableYUV444"];
|
||||
self.enablePIP = [[NSUserDefaults standardUserDefaults] boolForKey:@"enablePIP"];
|
||||
self.fullRange = [[NSUserDefaults standardUserDefaults] boolForKey:@"fullRange"];
|
||||
self.frameQueueSize = [NSNumber numberWithInteger:[[NSUserDefaults standardUserDefaults] integerForKey:@"frameQueueSize"]];
|
||||
self.playAudioOnPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"audioOnPC"];
|
||||
self.enableHdr = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableHdr"];
|
||||
@@ -88,6 +89,7 @@
|
||||
self.preferredCodec = settings.preferredCodec;
|
||||
self.enableYUV444 = settings.enableYUV444;
|
||||
self.enablePIP = settings.enablePIP;
|
||||
self.fullColorRange = settings.fullColorRange;
|
||||
self.frameQueueSize = settings.frameQueueSize;
|
||||
self.playAudioOnPC = settings.playAudioOnPC;
|
||||
self.redirectMic = settings.redirectMic;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
- (void)toggleStatsOverlay;
|
||||
- (void)toggleMouseCapture;
|
||||
- (void)toggleMouseVisible;
|
||||
- (void)disconnectAndQuitApp;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -978,6 +978,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
case UIKeyboardHIDUsageKeyboardC:
|
||||
[interactionDelegate toggleMouseVisible];
|
||||
break;
|
||||
case UIKeyboardHIDUsageKeyboardD:
|
||||
[interactionDelegate disconnectAndQuitApp];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<attribute name="framePacingMode" optional="YES" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
||||
<attribute name="frameQueueSize" optional="YES" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
||||
<attribute name="framerate" attributeType="Integer 32" defaultValueString="60" usesScalarValueType="NO" syncable="YES"/>
|
||||
<attribute name="fullColorRange" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="graphOpacity" optional="YES" attributeType="Integer 32" defaultValueString="50" usesScalarValueType="NO" syncable="YES"/>
|
||||
<attribute name="gyroBiasX" optional="YES" attributeType="Double" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
|
||||
<attribute name="gyroBiasY" optional="YES" attributeType="Double" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
|
||||
|
||||
@@ -57,6 +57,7 @@ static AVAudioPCMBuffer *pcmBuffer;
|
||||
static AVAudioFormat *audioFormat;
|
||||
|
||||
static bool muteInBackground;
|
||||
static bool fullColorRange;
|
||||
|
||||
static VideoDecoderRenderer* renderer;
|
||||
|
||||
@@ -64,7 +65,7 @@ static BandwidthTracker *bwTracker;
|
||||
|
||||
int DrDecoderSetup(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags)
|
||||
{
|
||||
[renderer setupWithVideoFormat:videoFormat width:width height:height frameRate:redrawRate];
|
||||
[renderer setupWithVideoFormat:videoFormat width:width height:height frameRate:redrawRate fullRange:fullColorRange];
|
||||
lastFrameNumber = 0;
|
||||
activeVideoFormat = videoFormat;
|
||||
Log(LOG_I, @"Active video format: 0x%x", activeVideoFormat);
|
||||
@@ -591,7 +592,8 @@ void ClSetControllerLED(uint16_t controllerNumber, uint8_t r, uint8_t g, uint8_t
|
||||
_callbacks = callbacks;
|
||||
|
||||
LiInitializeStreamConfiguration(&_streamConfig);
|
||||
_streamConfig.colorRange = 1; // Full range
|
||||
_streamConfig.colorRange = config.fullColorRange ? 1 : 0;
|
||||
fullColorRange = config.fullColorRange;
|
||||
_streamConfig.width = config.width;
|
||||
_streamConfig.height = config.height;
|
||||
_streamConfig.fps = config.frameRate;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
@property int serverCodecModeSupport;
|
||||
@property BOOL enableYUV444;
|
||||
@property BOOL enablePIP;
|
||||
@property BOOL fullColorRange;
|
||||
@property int width;
|
||||
@property int height;
|
||||
@property int frameRate;
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
#import "StreamConfiguration.h"
|
||||
|
||||
@implementation StreamConfiguration
|
||||
@synthesize host, httpsPort, appID, width, height, frameRate, bitRate, riKeyId, riKey, gamepadMask, appName, optimizeGameSettings, playAudioOnPC, swapABXYButtons, buttonVisualFeedback, gyroMode, emulatedControllerType, audioConfiguration, supportedVideoFormats, multiController, serverCert, rtspSessionUrl, serverCodecModeSupport, enableYUV444, enablePIP, localVolume;
|
||||
@synthesize host, httpsPort, appID, width, height, frameRate, bitRate, riKeyId, riKey, gamepadMask, appName, optimizeGameSettings, playAudioOnPC, swapABXYButtons, buttonVisualFeedback, gyroMode, emulatedControllerType, audioConfiguration, supportedVideoFormats, multiController, serverCert, rtspSessionUrl, serverCodecModeSupport, enableYUV444, enablePIP, fullColorRange, localVolume;
|
||||
@end
|
||||
|
||||
@@ -205,6 +205,8 @@
|
||||
double avgVideoMbps = [_connection getBwTracker].averageMbps;
|
||||
double peakVideoMbps = [_connection getBwTracker].peakMbps;
|
||||
|
||||
NSString* colorRange = _config.fullColorRange ? @"Full" : @"Limited";
|
||||
|
||||
if(overlayLevel == 1) return [LocalizationHelper localizedStringForKey:@"simplifiedOsdText",
|
||||
fps,
|
||||
stats.networkDroppedFrames / interval,
|
||||
@@ -221,7 +223,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
return [LocalizationHelper localizedStringForKey:@"Video stream: %dx%d %.2f FPS (Codec: %@)\n"
|
||||
return [LocalizationHelper localizedStringForKey:@"Video stream: %dx%d %.2f FPS (Codec: %@, %@)\n"
|
||||
"Bitrate: %.1f Mbps, Peak: %.1f\n"
|
||||
"%@"
|
||||
"Renderer: %@\n"
|
||||
@@ -231,6 +233,7 @@
|
||||
_config.height,
|
||||
fps,
|
||||
[_connection getActiveCodecName],
|
||||
colorRange,
|
||||
avgVideoMbps, peakVideoMbps,
|
||||
hostProcessingString,
|
||||
rendererWithPacing,
|
||||
@@ -242,7 +245,7 @@
|
||||
rendererWithPacing = @"AVSampleBuffer (Queue Pacing)";
|
||||
}
|
||||
|
||||
return [LocalizationHelper localizedStringForKey:@"Video stream: %dx%d %.2f FPS (Codec: %@)\n"
|
||||
return [LocalizationHelper localizedStringForKey:@"Video stream: %dx%d %.2f FPS (Codec: %@, %@)\n"
|
||||
"Bitrate: %.1f Mbps, Peak: %.1f, Frames buffered: %.1f\n"
|
||||
"%@"
|
||||
"Renderer: %@\n"
|
||||
@@ -253,6 +256,7 @@
|
||||
_config.height,
|
||||
fps,
|
||||
[_connection getActiveCodecName],
|
||||
colorRange,
|
||||
avgVideoMbps, peakVideoMbps, stats.frameQueueMetrics.avg,
|
||||
hostProcessingString,
|
||||
rendererWithPacing,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
- (id)initWithView:(UIView*)view callbacks:(id<ConnectionCallbacks>)callbacks streamAspectRatio:(float)aspectRatio;
|
||||
|
||||
- (void)setupWithVideoFormat:(int)videoFormat width:(int)videoWidth height:(int)videoHeight frameRate:(int)frameRate;
|
||||
- (void)setupWithVideoFormat:(int)videoFormat width:(int)videoWidth height:(int)videoHeight frameRate:(int)frameRate fullRange:(BOOL)fullRange;
|
||||
- (void)renderFrame:(Frame *)frame atTime:(CMTime)targetTime;
|
||||
- (void)cleanup;
|
||||
- (void)setHdrMode:(BOOL)enabled;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
|
||||
AVSampleBufferDisplayLayer* _displayLayer;
|
||||
int _videoFormat;
|
||||
int _frameRate;
|
||||
BOOL _fullRange;
|
||||
|
||||
NSMutableArray *_parameterSetBuffers;
|
||||
NSData *_masteringDisplayColorVolume;
|
||||
@@ -150,10 +151,11 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
|
||||
|
||||
# pragma mark DisplayLink vsync callback
|
||||
|
||||
- (void)setupWithVideoFormat:(int)videoFormat width:(int)videoWidth height:(int)videoHeight frameRate:(int)frameRate
|
||||
- (void)setupWithVideoFormat:(int)videoFormat width:(int)videoWidth height:(int)videoHeight frameRate:(int)frameRate fullRange:(BOOL)fullRange
|
||||
{
|
||||
self->_videoFormat = videoFormat;
|
||||
self->_frameRate = frameRate;
|
||||
self->_fullRange = fullRange;
|
||||
|
||||
// reset plot data in case we've already used it for a previous renderer
|
||||
[[ImGuiPlots sharedInstance] clearData];
|
||||
@@ -222,10 +224,9 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
|
||||
#else
|
||||
NSNumber *pixelFormat = nil;
|
||||
if (self->_videoFormat & VIDEO_FORMAT_MASK_YUV444) {
|
||||
pixelFormat = @(kCVPixelFormatType_444YpCbCr10BiPlanarFullRange);
|
||||
}
|
||||
else {
|
||||
pixelFormat = @(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange);
|
||||
pixelFormat = self->_fullRange ? @(kCVPixelFormatType_444YpCbCr10BiPlanarFullRange) : @(kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange);
|
||||
} else {
|
||||
pixelFormat = self->_fullRange ? @(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange) : @(kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange);
|
||||
}
|
||||
NSMutableDictionary *destinationPixelBufferAttributes = [@{
|
||||
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat
|
||||
|
||||
@@ -828,6 +828,9 @@ static NSMutableSet* hostList;
|
||||
_streamConfig.localVolume = streamSettings.localVolume.floatValue;
|
||||
_streamConfig.swapABXYButtons = streamSettings.swapABXYButtons;
|
||||
_streamConfig.buttonVisualFeedback = streamSettings.buttonVisualFeedback;
|
||||
_streamConfig.enableYUV444 = streamSettings.enableYUV444;
|
||||
_streamConfig.enablePIP = streamSettings.enablePIP;
|
||||
_streamConfig.fullColorRange = streamSettings.fullColorRange;
|
||||
_streamConfig.asyncNativeTouchPriority = streamSettings.asyncNativeTouchPriority; // new streamConfig segment
|
||||
_streamConfig.gyroMode = [streamSettings.gyroMode intValue];
|
||||
_streamConfig.emulatedControllerType = streamSettings.emulatedControllerType.intValue;
|
||||
@@ -1175,9 +1178,15 @@ static NSMutableSet* hostList;
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.audioOnPcStack];
|
||||
[settingsViewController.touchModeSelector1 setEnabled:!_settingsExpandedInStreamView || !(settingsViewController.touchModeSelector1.selectedSegmentIndex == AbsoluteTouch && !settingsViewController.passthroughGesturesSwitch.isOn)];
|
||||
[settingsViewController.touchModeSelector2 setEnabled:settingsViewController.touchModeSelector1.enabled];
|
||||
|
||||
[settingsViewController.codecSelector setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController.yuv444Switch setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController.hdrSwitch setEnabled:!_settingsExpandedInStreamView && [settingsViewController hdrSupported]];
|
||||
if(_settingsExpandedInStreamView){
|
||||
[settingsViewController.yuv444Switch setEnabled:NO];
|
||||
[settingsViewController.fullColorRangeSwitch setEnabled:NO];
|
||||
[settingsViewController.hdrSwitch setEnabled:NO];
|
||||
}
|
||||
else [settingsViewController updateCodecDependentSwitches];
|
||||
|
||||
[settingsViewController.gyroModeSelector setEnabled:!_settingsExpandedInStreamView || ![streamFrameViewController shallDisableGyroHotSwitch]];
|
||||
[settingsViewController.emulatedControllerTypeSelector setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.citrixX1MouseStack];
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *codecStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *yuv444Stack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *pipStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *fullColorRangeStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *hdrStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *reverseMouseWheelDirectionStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *citrixX1MouseStack;
|
||||
@@ -78,6 +79,7 @@
|
||||
@property (strong, nonatomic) IBOutlet UISwitch *hdrSwitch;
|
||||
@property (strong, nonatomic) IBOutlet UISwitch *yuv444Switch;
|
||||
@property (strong, nonatomic) IBOutlet UISwitch *pipSwitch;
|
||||
@property (strong, nonatomic) IBOutlet UISwitch *fullColorRangeSwitch;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *reverseMouseWheelDirectionSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *statsOverlaySelector;
|
||||
@property (strong, nonatomic) IBOutlet UIScrollView *scrollView;
|
||||
@@ -269,5 +271,6 @@
|
||||
- (void)updateTheme;
|
||||
- (void)hideDynamicLabelsWhenOverlapped:(UIView* )view;
|
||||
- (void)setHidden:(BOOL)hidden forStack:(UIStackView* )stack;
|
||||
- (void)updateCodecDependentSwitches;
|
||||
|
||||
@end
|
||||
|
||||
@@ -431,15 +431,18 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:NO];
|
||||
|
||||
|
||||
settingsViewJustExpanded = true;
|
||||
|
||||
|
||||
// Ensure codec-dependent switches are in correct state when view appears
|
||||
// [self updateCodecDependentSwitches];
|
||||
|
||||
/*
|
||||
[self checkAndRequestMicPermission];
|
||||
self.micHandler = [MicHandler new];
|
||||
[self.micHandler startTapping];
|
||||
*/
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(deviceOrientationDidChange:) // handle orientation change since i made portrait mode available
|
||||
name:UIDeviceOrientationDidChangeNotification
|
||||
@@ -756,6 +759,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
[self addSetting:self.codecStack ofId:@"codecStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.hdrStack ofId:@"hdrStack" withInfoTag:![self hdrSupported] withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.fullColorRangeStack ofId:@"fullRangeStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.framePacingStack ofId:@"framePacingStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:YES to:videoSection];
|
||||
@@ -1558,6 +1562,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
[_parentStack removeFromSuperview];
|
||||
[self initParentStack];
|
||||
[self layoutSections];
|
||||
// [self updateCodecDependentSwitches]; // Ensure switches are in correct state after layout
|
||||
[self updateTheme];
|
||||
//[self doneRemoveSettingItem];
|
||||
Settings *currentSettings = [dataMan retrieveSettings];
|
||||
@@ -1682,7 +1687,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
[self.rememberFoldStateSwitch setOn:self->tempSettings.rememberFoldState];// Load old setting
|
||||
MenuSectionView.overridePersistedFoldState = !self->tempSettings.rememberFoldState;
|
||||
[self.rememberFoldStateSwitch addTarget:self action:@selector(rememberFoldStateSwitchFlipped:) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
|
||||
[self layoutSections];
|
||||
|
||||
|
||||
@@ -1802,12 +1807,17 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
else {
|
||||
[self.hdrSwitch setOn:self->tempSettings.enableHdr];
|
||||
}
|
||||
|
||||
[self.yuv444Switch setOn:self->tempSettings.enableYUV444];
|
||||
|
||||
// Initialize codec-dependent switches together
|
||||
[self.yuv444Switch setOn:self->tempSettings.enableYUV444];
|
||||
[self.fullColorRangeSwitch setOn:self->tempSettings.fullColorRange];
|
||||
[self.codecSelector addTarget:self action:@selector(codecSelectorChanged:) forControlEvents:UIControlEventValueChanged];
|
||||
[self codecSelectorChanged:self.codecSelector];
|
||||
|
||||
[self.pipSwitch setOn:self->tempSettings.enablePIP];
|
||||
if(@available(iOS 15.0, *)) [self.pipSwitch setEnabled:true];
|
||||
else{
|
||||
if(@available(iOS 15.0, *)) {
|
||||
[self.pipSwitch setEnabled:true];
|
||||
} else{
|
||||
[self.pipSwitch setOn:false];
|
||||
[self.pipSwitch setEnabled:false];
|
||||
}
|
||||
@@ -2706,6 +2716,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// a setEnabled method for low iOS version UISlider
|
||||
- (void) widget:(UIView*)widget setEnabled:(bool)enabled{
|
||||
if([widget isKindOfClass:[UISlider class]]){
|
||||
UISlider* widgetPtr = (UISlider* )widget;
|
||||
@@ -3357,6 +3368,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
uint32_t preferredCodec = [self getChosenCodecPreference];
|
||||
BOOL enableYUV444 = self.yuv444Switch.isOn;
|
||||
BOOL enablePIP = self.pipSwitch.isOn;
|
||||
BOOL fullRange = self.fullColorRangeSwitch.isOn;
|
||||
BOOL btMouseSupport = self.citrixX1MouseSwitch.isOn;
|
||||
NSInteger touchMode = [self isNotNativeTouchOnly] ? self.touchModeSelector1.selectedSegmentIndex : NativeTouchOnly;
|
||||
NSInteger statsOverlayLevel = [self.statsOverlaySelector selectedSegmentIndex];
|
||||
@@ -3429,6 +3441,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
preferredCodec:preferredCodec
|
||||
enableYUV444:enableYUV444
|
||||
enablePIP:enablePIP
|
||||
fullRange:fullRange
|
||||
enableHdr:enableHdr
|
||||
btMouseSupport:btMouseSupport
|
||||
touchMode:touchMode
|
||||
@@ -3478,4 +3491,40 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
}
|
||||
|
||||
- (void)codecSelectorChanged:(UISegmentedControl *)sender {
|
||||
[self updateCodecDependentSwitches];
|
||||
}
|
||||
|
||||
- (void)updateCodecDependentSwitches {
|
||||
uint32_t codec = [self getChosenCodecPreference];
|
||||
BOOL isAV1 = (codec == CODEC_PREF_AV1);
|
||||
BOOL isH264 = (codec == CODEC_PREF_H264);
|
||||
|
||||
if (isAV1) {
|
||||
// AV1 must use limited range, so disable fullRange and turn it off
|
||||
[self.fullColorRangeSwitch setOn:NO animated:NO];
|
||||
[self.fullColorRangeSwitch setEnabled:NO];
|
||||
|
||||
// AV1 doesn't support YUV444, so disable it and turn it off
|
||||
[self.yuv444Switch setOn:NO animated:NO];
|
||||
[self.yuv444Switch setEnabled:NO];
|
||||
} else {
|
||||
[self.fullColorRangeSwitch setEnabled:YES];
|
||||
[self.yuv444Switch setEnabled:YES];
|
||||
}
|
||||
|
||||
// H264 doesn't support HDR, so disable it and turn it off
|
||||
if (isH264) {
|
||||
[self.hdrSwitch setOn:NO animated:NO];
|
||||
[self.hdrSwitch setEnabled:NO];
|
||||
} else {
|
||||
// Only enable HDR if the device supports it
|
||||
if ([self hdrSupported]) {
|
||||
[self.hdrSwitch setEnabled:YES];
|
||||
}
|
||||
}
|
||||
|
||||
if(![self hdrSupported]) [self.hdrSwitch setOn:NO animated:NO];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -2989,6 +2989,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"iPd-Ra-Lbl.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Full Color Range\"; ObjectID = \"iPd-Ra-Lbl\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Full Color Range"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "全色彩范围"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "全色彩範圍"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "全色彩範圍"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IvI-tw-APj.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Open Settings in Streaming\"; ObjectID = \"IvI-tw-APj\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
|
||||
@@ -2197,6 +2197,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"fRl-Ra-Lbl.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Full Color Range\"; ObjectID = \"fRl-Ra-Lbl\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Full Color Range"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"value" : "全色彩范围"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"value" : "全色彩範圍"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"value" : "全色彩範圍"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"GbY-52-itv.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Local Volume\"; ObjectID = \"GbY-52-itv\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
|
||||
Reference in New Issue
Block a user