Skip to content

Commit 8068c6e

Browse files
committed
fixup! Support RGB colorspaces and explicit tone mapping
1 parent 0b27408 commit 8068c6e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/SdpGenerator.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,14 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
309309
else {
310310
err |= addAttributeString(&optionHead, "x-ss-video[0].chromaSamplingType", "0");
311311
}
312+
313+
// Enable server-side HDR tone mapping if requested by video renderer
314+
if (VideoCallbacks.capabilities & CAPABILITY_PREFERS_TONE_MAPPED_SDR_OVER_HDR) {
315+
err |= addAttributeString(&optionHead, "x-ml-video[0].toneMapHDR", "1");
316+
}
317+
else {
318+
err |= addAttributeString(&optionHead, "x-ml-video[0].toneMapHDR", "0");
319+
}
312320
}
313321

314322
snprintf(payloadStr, sizeof(payloadStr), "%d", StreamConfig.width);

0 commit comments

Comments
 (0)