mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Merge pull request #13 from irtimmer/remoteOptimizations
Add SDP optimizations for remote connections
This commit is contained in:
commit
cc8eae2c41
@ -25,6 +25,9 @@ typedef struct _STREAM_CONFIGURATION {
|
|||||||
// Max video packet size in bytes (use 1024 if unsure)
|
// Max video packet size in bytes (use 1024 if unsure)
|
||||||
int packetSize;
|
int packetSize;
|
||||||
|
|
||||||
|
// Enable remote optimizations
|
||||||
|
int remote;
|
||||||
|
|
||||||
// AES encryption data for the remote input stream. This must be
|
// AES encryption data for the remote input stream. This must be
|
||||||
// the same as what was passed as rikey and rikeyid
|
// the same as what was passed as rikey and rikeyid
|
||||||
// in /launch and /resume requests.
|
// in /launch and /resume requests.
|
||||||
|
@ -166,7 +166,10 @@ static PSDP_OPTION getAttributesList(char *urlSafeAddr) {
|
|||||||
|
|
||||||
err |= addAttributeString(&optionHead, "x-nv-video[0].rateControlMode", "4");
|
err |= addAttributeString(&optionHead, "x-nv-video[0].rateControlMode", "4");
|
||||||
|
|
||||||
// FIXME: Remote optimizations
|
if (StreamConfig.remote) {
|
||||||
|
err |= addAttributeString(&optionHead, "x-nv-video[0].averageBitrate", "4");
|
||||||
|
err |= addAttributeString(&optionHead, "x-nv-video[0].peakBitrate", "4");
|
||||||
|
}
|
||||||
|
|
||||||
err |= addAttributeString(&optionHead, "x-nv-video[0].timeoutLengthMs", "7000");
|
err |= addAttributeString(&optionHead, "x-nv-video[0].timeoutLengthMs", "7000");
|
||||||
err |= addAttributeString(&optionHead, "x-nv-video[0].framesWithInvalidRefThreshold", "0");
|
err |= addAttributeString(&optionHead, "x-nv-video[0].framesWithInvalidRefThreshold", "0");
|
||||||
@ -211,9 +214,13 @@ static PSDP_OPTION getAttributesList(char *urlSafeAddr) {
|
|||||||
|
|
||||||
err |= addAttributeString(&optionHead, "x-nv-vqos[0].videoQualityScoreUpdateTime", "5000");
|
err |= addAttributeString(&optionHead, "x-nv-vqos[0].videoQualityScoreUpdateTime", "5000");
|
||||||
|
|
||||||
// FIXME: Remote optimizations
|
if (StreamConfig.remote) {
|
||||||
|
err |= addAttributeString(&optionHead, "x-nv-vqos[0].qosTrafficType", "0");
|
||||||
|
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "0");
|
||||||
|
} else {
|
||||||
err |= addAttributeString(&optionHead, "x-nv-vqos[0].qosTrafficType", "5");
|
err |= addAttributeString(&optionHead, "x-nv-vqos[0].qosTrafficType", "5");
|
||||||
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "4");
|
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "4");
|
||||||
|
}
|
||||||
|
|
||||||
if (ServerMajorVersion == 3) {
|
if (ServerMajorVersion == 3) {
|
||||||
err |= addGen3Options(&optionHead, urlSafeAddr);
|
err |= addGen3Options(&optionHead, urlSafeAddr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user