mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Pass RTSP session URL to moonlight-common-c for dynamic ports
This commit is contained in:
@@ -151,7 +151,8 @@ NvHTTP::launchApp(int appId,
|
|||||||
PSTREAM_CONFIGURATION streamConfig,
|
PSTREAM_CONFIGURATION streamConfig,
|
||||||
bool sops,
|
bool sops,
|
||||||
bool localAudio,
|
bool localAudio,
|
||||||
int gamepadMask)
|
int gamepadMask,
|
||||||
|
QString& rtspSessionUrl)
|
||||||
{
|
{
|
||||||
int riKeyId;
|
int riKeyId;
|
||||||
|
|
||||||
@@ -185,10 +186,12 @@ NvHTTP::launchApp(int appId,
|
|||||||
|
|
||||||
// Throws if the request failed
|
// Throws if the request failed
|
||||||
verifyResponseStatus(response);
|
verifyResponseStatus(response);
|
||||||
|
|
||||||
|
rtspSessionUrl = getXmlString(response, "sessionUrl0");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NvHTTP::resumeApp(PSTREAM_CONFIGURATION streamConfig)
|
NvHTTP::resumeApp(PSTREAM_CONFIGURATION streamConfig, QString& rtspSessionUrl)
|
||||||
{
|
{
|
||||||
int riKeyId;
|
int riKeyId;
|
||||||
|
|
||||||
@@ -207,6 +210,8 @@ NvHTTP::resumeApp(PSTREAM_CONFIGURATION streamConfig)
|
|||||||
|
|
||||||
// Throws if the request failed
|
// Throws if the request failed
|
||||||
verifyResponseStatus(response);
|
verifyResponseStatus(response);
|
||||||
|
|
||||||
|
rtspSessionUrl = getXmlString(response, "sessionUrl0");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -150,14 +150,16 @@ public:
|
|||||||
quitApp();
|
quitApp();
|
||||||
|
|
||||||
void
|
void
|
||||||
resumeApp(PSTREAM_CONFIGURATION streamConfig);
|
resumeApp(PSTREAM_CONFIGURATION streamConfig,
|
||||||
|
QString& rtspSessionUrl);
|
||||||
|
|
||||||
void
|
void
|
||||||
launchApp(int appId,
|
launchApp(int appId,
|
||||||
PSTREAM_CONFIGURATION streamConfig,
|
PSTREAM_CONFIGURATION streamConfig,
|
||||||
bool sops,
|
bool sops,
|
||||||
bool localAudio,
|
bool localAudio,
|
||||||
int gamepadMask);
|
int gamepadMask,
|
||||||
|
QString& rtspSessionUrl);
|
||||||
|
|
||||||
QVector<NvApp>
|
QVector<NvApp>
|
||||||
getAppList();
|
getAppList();
|
||||||
|
|||||||
@@ -1026,16 +1026,19 @@ bool Session::startConnectionAsync()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString rtspSessionUrl;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NvHTTP http(m_Computer->activeAddress, m_Computer->serverCert);
|
NvHTTP http(m_Computer->activeAddress, m_Computer->serverCert);
|
||||||
if (m_Computer->currentGameId != 0) {
|
if (m_Computer->currentGameId != 0) {
|
||||||
http.resumeApp(&m_StreamConfig);
|
http.resumeApp(&m_StreamConfig, rtspSessionUrl);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
http.launchApp(m_App.id, &m_StreamConfig,
|
http.launchApp(m_App.id, &m_StreamConfig,
|
||||||
enableGameOptimizations,
|
enableGameOptimizations,
|
||||||
m_Preferences->playAudioOnHost,
|
m_Preferences->playAudioOnHost,
|
||||||
m_InputHandler->getAttachedGamepadMask());
|
m_InputHandler->getAttachedGamepadMask(),
|
||||||
|
rtspSessionUrl);
|
||||||
}
|
}
|
||||||
} catch (const GfeHttpResponseException& e) {
|
} catch (const GfeHttpResponseException& e) {
|
||||||
emit displayLaunchError(tr("GeForce Experience returned error: %1").arg(e.toQString()));
|
emit displayLaunchError(tr("GeForce Experience returned error: %1").arg(e.toQString()));
|
||||||
@@ -1061,6 +1064,13 @@ bool Session::startConnectionAsync()
|
|||||||
hostInfo.serverInfoGfeVersion = siGfeVersion.data();
|
hostInfo.serverInfoGfeVersion = siGfeVersion.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Older GFE and Sunshine versions didn't have this field
|
||||||
|
QByteArray rtspSessionUrlStr;
|
||||||
|
if (!rtspSessionUrl.isEmpty()) {
|
||||||
|
rtspSessionUrlStr = rtspSessionUrl.toLatin1();
|
||||||
|
hostInfo.rtspSessionUrl = rtspSessionUrlStr.data();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_Preferences->packetSize != 0) {
|
if (m_Preferences->packetSize != 0) {
|
||||||
// Override default packet size and remote streaming detection
|
// Override default packet size and remote streaming detection
|
||||||
// NB: Using STREAM_CFG_AUTO will cap our packet size at 1024 for remote hosts.
|
// NB: Using STREAM_CFG_AUTO will cap our packet size at 1024 for remote hosts.
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: 7c346c3104...3b9d8a3176
Reference in New Issue
Block a user