mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-28 00:34:06 +00:00
Added Intra Refresh Support (#97)
This commit is contained in:
1 parent
67996eca5d
commit
0d92c94664
2 files changed
+11
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user