Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Intra Refresh Support #97

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Limelight.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ typedef struct _DECODE_UNIT {
// number of slices per frame. This capability is only valid on video renderers.
#define CAPABILITY_SLICES_PER_FRAME(x) (((unsigned char)(x)) << 24)

// 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for another nit, can you move this above the special CAPABILITY_SLICES_PER_FRAME macro too?


// This callback is invoked to provide details about the video stream and allow configuration of the decoder.
// Returns 0 on success, non-zero on failure.
typedef int(*DecoderRendererSetup)(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags);
Expand Down
7 changes: 7 additions & 0 deletions src/SdpGenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,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);
Expand Down