Send client feature flags indicating FEC status support

This commit is contained in:
Cameron Gutman
2023-08-19 11:03:00 -05:00
parent e0d83f61c2
commit 8b0dbf7158
2 changed files with 10 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ extern uint32_t SunshineFeatureFlags;
#define IS_SUNSHINE() (AppVersionQuad[3] < 0)
// Client feature flags for x-ml-general.featureFlags SDP attribute
#define ML_FF_FEC_STATUS 0x01 // Client sends SS_FRAME_FEC_STATUS for frame losses
#define UDP_RECV_POLL_TIMEOUT_MS 100
// At this value or above, we will request high quality audio unless CAPABILITY_SLOW_OPUS_DECODER

View File

@@ -233,6 +233,13 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
optionHead = NULL;
err = 0;
// Send client feature flags to Sunshine hosts
if (IS_SUNSHINE()) {
uint32_t moonlightFeatureFlags = ML_FF_FEC_STATUS;
sprintf(payloadStr, "%u", moonlightFeatureFlags);
err |= addAttributeString(&optionHead, "x-ml-general.featureFlags", payloadStr);
}
sprintf(payloadStr, "%d", StreamConfig.width);
err |= addAttributeString(&optionHead, "x-nv-video[0].clientViewportWd", payloadStr);
sprintf(payloadStr, "%d", StreamConfig.height);