fix: cleanup fps and resolution settings

This commit is contained in:
Acaki committed 2025-07-12 03:25:17 +08:00
1 parent 6a36e73463
commit 8f25081bbb
2 files changed
+7 -14

No files matched your search

@@ -149,7 +149,7 @@ static const int bitrateTable[] = {
500000, 500000,
}; };
const int RESOLUTION_TABLE_SIZE = 7; const int RESOLUTION_TABLE_SIZE = 6;
const int RESOLUTION_TABLE_CUSTOM_INDEX = RESOLUTION_TABLE_SIZE - 1; const int RESOLUTION_TABLE_CUSTOM_INDEX = RESOLUTION_TABLE_SIZE - 1;
CGSize resolutionTable[RESOLUTION_TABLE_SIZE]; CGSize resolutionTable[RESOLUTION_TABLE_SIZE];
@@ -1171,11 +1171,10 @@ BOOL isCustomResolution(CGSize res) {
resolutionTable[0] = CGSizeMake(1280, 720); resolutionTable[0] = CGSizeMake(1280, 720);
resolutionTable[1] = CGSizeMake(1920, 1080); resolutionTable[1] = CGSizeMake(1920, 1080);
resolutionTable[2] = CGSizeMake(2560, 1440); resolutionTable[2] = CGSizeMake(3840, 2160);
resolutionTable[3] = CGSizeMake(3840, 2160); resolutionTable[3] = CGSizeMake(safeAreaWidth, fullScreenHeight);
resolutionTable[4] = CGSizeMake(safeAreaWidth, fullScreenHeight); resolutionTable[4] = CGSizeMake(fullScreenWidth, fullScreenHeight);
resolutionTable[5] = CGSizeMake(fullScreenWidth, fullScreenHeight); resolutionTable[5] = CGSizeMake([currentSettings.width integerValue], [currentSettings.height integerValue]); // custom initial value
resolutionTable[6] = CGSizeMake([currentSettings.width integerValue], [currentSettings.height integerValue]); // custom initial value
[self updateResolutionTable]; [self updateResolutionTable];
// Don't populate the custom entry unless we have a custom resolution // Don't populate the custom entry unless we have a custom resolution
@@ -1193,11 +1192,8 @@ BOOL isCustomResolution(CGSize res) {
case 60: case 60:
framerate = 1; framerate = 1;
break; break;
case 90:
framerate = 2;
break;
case 120: case 120:
framerate = 3; framerate = 2;
break; break;
} }
@@ -1840,8 +1836,6 @@ BOOL isCustomResolution(CGSize res) {
case 1: case 1:
return 60; return 60;
case 2: case 2:
return 90;
case 3:
return 120; return 120;
default: default:
abort(); abort();
@@ -411,7 +411,7 @@
if(_settings.externalDisplayMode.intValue == 2) _streamVideoRenderView = _streamView; if(_settings.externalDisplayMode.intValue == 2) _streamVideoRenderView = _streamView;
else { else {
//NSLog(@"renderView separated from streamView"); //NSLog(@"renderView separated from streamView");
_streamVideoRenderView = (StreamView*)[[UIView alloc] initWithFrame:self.view.frame]; _streamVideoRenderView = [[StreamView alloc] initWithFrame:self.view.frame];
_streamVideoRenderView.bounds = _streamView.bounds; _streamVideoRenderView.bounds = _streamView.bounds;
_streamVideoRenderView.userInteractionEnabled = false; // this will prevent renderView from intrecepting touchEvents which shall be interacting with streamView _streamVideoRenderView.userInteractionEnabled = false; // this will prevent renderView from intrecepting touchEvents which shall be interacting with streamView
} }
@@ -457,7 +457,6 @@
// This is added to the _overlayView when displayed // This is added to the _overlayView when displayed
#endif #endif
_streamView = [[StreamView alloc] initWithFrame:self.view.frame];
#if TARGET_OS_TV #if TARGET_OS_TV
// we need to tell the other remote handler in RelativeTouchHandler to wait for our double-select // we need to tell the other remote handler in RelativeTouchHandler to wait for our double-select
RelativeTouchHandler *touchHandler = (RelativeTouchHandler *)[_streamView touchHandler]; RelativeTouchHandler *touchHandler = (RelativeTouchHandler *)[_streamView touchHandler];