diff --git a/src/Limelight.h b/src/Limelight.h index 22d5838..552d54a 100644 --- a/src/Limelight.h +++ b/src/Limelight.h @@ -276,6 +276,10 @@ typedef struct _DECODE_UNIT { // supports reference frame invalidation for AV1 streams. This flag is only valid on video renderers. #define CAPABILITY_REFERENCE_FRAME_INVALIDATION_AV1 0x40 +// If set in the video renderer capabilities field, this flag specifies that the renderer +// needs to opt-in to intra refresh, some clients (like the Xbox client with NVEnc) needs it +#define CAPABILITY_INTRA_REFRESH 0x80 + // If set in the video renderer capabilities field, this macro specifies that the renderer // supports slicing to increase decoding performance. The parameter specifies the desired // number of slices per frame. This capability is only valid on video renderers. diff --git a/src/SdpGenerator.c b/src/SdpGenerator.c index 22467c0..5ea5cbb 100644 --- a/src/SdpGenerator.c +++ b/src/SdpGenerator.c @@ -310,6 +310,13 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) { else { err |= addAttributeString(&optionHead, "x-ss-video[0].chromaSamplingType", "0"); } + + // Add intra-refresh if opted in + if (VideoCallbacks.capabilities & CAPABILITY_INTRA_REFRESH){ + err |= addAttributeString(&optionHead, "x-ss-video[0].intraRefresh", "1"); + } else { + err |= addAttributeString(&optionHead, "x-ss-video[0].intraRefresh", "0"); + } } snprintf(payloadStr, sizeof(payloadStr), "%d", StreamConfig.width);