mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 08:15:37 +00:00
Add experimental option to unlock bitrate to 500 Mbps
Fixes #1375 Fixes #1343 Closes #1377
This commit is contained in:
parent
7da085480c
commit
f3a75e8e76
@ -421,8 +421,8 @@ void StreamCommandLineParser::parse(const QStringList &args, StreamingPreference
|
|||||||
// Resolve --bitrate option
|
// Resolve --bitrate option
|
||||||
if (parser.isSet("bitrate")) {
|
if (parser.isSet("bitrate")) {
|
||||||
preferences->bitrateKbps = parser.getIntOption("bitrate");
|
preferences->bitrateKbps = parser.getIntOption("bitrate");
|
||||||
if (!inRange(preferences->bitrateKbps, 500, 150000)) {
|
if (!inRange(preferences->bitrateKbps, 500, 500000)) {
|
||||||
parser.showError("Bitrate must be in range: 500 - 150000");
|
parser.showError("Bitrate must be in range: 500 - 500000");
|
||||||
}
|
}
|
||||||
} else if (displaySet || parser.isSet("fps")) {
|
} else if (displaySet || parser.isSet("fps")) {
|
||||||
preferences->bitrateKbps = preferences->getDefaultBitrate(
|
preferences->bitrateKbps = preferences->getDefaultBitrate(
|
||||||
|
@ -685,7 +685,7 @@ Flickable {
|
|||||||
|
|
||||||
stepSize: 500
|
stepSize: 500
|
||||||
from : 500
|
from : 500
|
||||||
to: 150000
|
to: StreamingPreferences.unlockBitrate ? 500000 : 150000
|
||||||
|
|
||||||
snapMode: "SnapOnRelease"
|
snapMode: "SnapOnRelease"
|
||||||
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
||||||
@ -1645,6 +1645,23 @@ Flickable {
|
|||||||
qsTr("YUV 4:4:4 is not supported on this PC.")
|
qsTr("YUV 4:4:4 is not supported on this PC.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: unlockBitrate
|
||||||
|
width: parent.width
|
||||||
|
text: qsTr("Unlock bitrate limit (Experimental)")
|
||||||
|
font.pointSize: 12
|
||||||
|
|
||||||
|
checked: StreamingPreferences.unlockBitrate
|
||||||
|
onCheckedChanged: {
|
||||||
|
StreamingPreferences.unlockBitrate = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTip.delay: 1000
|
||||||
|
ToolTip.timeout: 5000
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: qsTr("This enables extremely high bitrates and should only be used when streaming over an Ethernet LAN connection.")
|
||||||
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: enableMdns
|
id: enableMdns
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#define SER_HEIGHT "height"
|
#define SER_HEIGHT "height"
|
||||||
#define SER_FPS "fps"
|
#define SER_FPS "fps"
|
||||||
#define SER_BITRATE "bitrate"
|
#define SER_BITRATE "bitrate"
|
||||||
|
#define SER_UNLOCK_BITRATE "unlockbitrate"
|
||||||
#define SER_FULLSCREEN "fullscreen"
|
#define SER_FULLSCREEN "fullscreen"
|
||||||
#define SER_VSYNC "vsync"
|
#define SER_VSYNC "vsync"
|
||||||
#define SER_GAMEOPTS "gameopts"
|
#define SER_GAMEOPTS "gameopts"
|
||||||
@ -120,6 +121,7 @@ void StreamingPreferences::reload()
|
|||||||
fps = settings.value(SER_FPS, 60).toInt();
|
fps = settings.value(SER_FPS, 60).toInt();
|
||||||
enableYUV444 = settings.value(SER_YUV444, false).toBool();
|
enableYUV444 = settings.value(SER_YUV444, false).toBool();
|
||||||
bitrateKbps = settings.value(SER_BITRATE, getDefaultBitrate(width, height, fps, enableYUV444)).toInt();
|
bitrateKbps = settings.value(SER_BITRATE, getDefaultBitrate(width, height, fps, enableYUV444)).toInt();
|
||||||
|
unlockBitrate = settings.value(SER_UNLOCK_BITRATE, false).toBool();
|
||||||
enableVsync = settings.value(SER_VSYNC, true).toBool();
|
enableVsync = settings.value(SER_VSYNC, true).toBool();
|
||||||
gameOptimizations = settings.value(SER_GAMEOPTS, true).toBool();
|
gameOptimizations = settings.value(SER_GAMEOPTS, true).toBool();
|
||||||
playAudioOnHost = settings.value(SER_HOSTAUDIO, false).toBool();
|
playAudioOnHost = settings.value(SER_HOSTAUDIO, false).toBool();
|
||||||
@ -307,6 +309,7 @@ void StreamingPreferences::save()
|
|||||||
settings.setValue(SER_HEIGHT, height);
|
settings.setValue(SER_HEIGHT, height);
|
||||||
settings.setValue(SER_FPS, fps);
|
settings.setValue(SER_FPS, fps);
|
||||||
settings.setValue(SER_BITRATE, bitrateKbps);
|
settings.setValue(SER_BITRATE, bitrateKbps);
|
||||||
|
settings.setValue(SER_UNLOCK_BITRATE, unlockBitrate);
|
||||||
settings.setValue(SER_VSYNC, enableVsync);
|
settings.setValue(SER_VSYNC, enableVsync);
|
||||||
settings.setValue(SER_GAMEOPTS, gameOptimizations);
|
settings.setValue(SER_GAMEOPTS, gameOptimizations);
|
||||||
settings.setValue(SER_HOSTAUDIO, playAudioOnHost);
|
settings.setValue(SER_HOSTAUDIO, playAudioOnHost);
|
||||||
|
@ -108,6 +108,7 @@ public:
|
|||||||
Q_PROPERTY(int height MEMBER height NOTIFY displayModeChanged)
|
Q_PROPERTY(int height MEMBER height NOTIFY displayModeChanged)
|
||||||
Q_PROPERTY(int fps MEMBER fps NOTIFY displayModeChanged)
|
Q_PROPERTY(int fps MEMBER fps NOTIFY displayModeChanged)
|
||||||
Q_PROPERTY(int bitrateKbps MEMBER bitrateKbps NOTIFY bitrateChanged)
|
Q_PROPERTY(int bitrateKbps MEMBER bitrateKbps NOTIFY bitrateChanged)
|
||||||
|
Q_PROPERTY(bool unlockBitrate MEMBER unlockBitrate NOTIFY unlockBitrateChanged)
|
||||||
Q_PROPERTY(bool enableVsync MEMBER enableVsync NOTIFY enableVsyncChanged)
|
Q_PROPERTY(bool enableVsync MEMBER enableVsync NOTIFY enableVsyncChanged)
|
||||||
Q_PROPERTY(bool gameOptimizations MEMBER gameOptimizations NOTIFY gameOptimizationsChanged)
|
Q_PROPERTY(bool gameOptimizations MEMBER gameOptimizations NOTIFY gameOptimizationsChanged)
|
||||||
Q_PROPERTY(bool playAudioOnHost MEMBER playAudioOnHost NOTIFY playAudioOnHostChanged)
|
Q_PROPERTY(bool playAudioOnHost MEMBER playAudioOnHost NOTIFY playAudioOnHostChanged)
|
||||||
@ -146,6 +147,7 @@ public:
|
|||||||
int height;
|
int height;
|
||||||
int fps;
|
int fps;
|
||||||
int bitrateKbps;
|
int bitrateKbps;
|
||||||
|
bool unlockBitrate;
|
||||||
bool enableVsync;
|
bool enableVsync;
|
||||||
bool gameOptimizations;
|
bool gameOptimizations;
|
||||||
bool playAudioOnHost;
|
bool playAudioOnHost;
|
||||||
@ -181,6 +183,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void displayModeChanged();
|
void displayModeChanged();
|
||||||
void bitrateChanged();
|
void bitrateChanged();
|
||||||
|
void unlockBitrateChanged();
|
||||||
void enableVsyncChanged();
|
void enableVsyncChanged();
|
||||||
void gameOptimizationsChanged();
|
void gameOptimizationsChanged();
|
||||||
void playAudioOnHostChanged();
|
void playAudioOnHostChanged();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user