mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-28 08:44:21 +00:00
Add HDR and colorspace fields to DECODE_UNIT
This commit is contained in:
1 parent
02f12e4448
commit
c9426a6a71
2 files changed
+19
No files matched your search
@@ -453,6 +453,13 @@ static void reassembleFrame(int frameNumber) {
|
||||
qdu->decodeUnit.presentationTimeMs = firstPacketPresentationTime;
|
||||
qdu->decodeUnit.enqueueTimeMs = LiGetMillis();
|
||||
|
||||
// These might be wrong for a few frames during a transition between SDR and HDR,
|
||||
// but the effects shouldn't very noticable since that's an infrequent operation.
|
||||
//
|
||||
// If we start sending this state in the frame header, we can make it 100% accurate.
|
||||
qdu->decodeUnit.hdrActive = LiGetCurrentHostDisplayHdrMode();
|
||||
qdu->decodeUnit.colorspace = (uint8_t)(qdu->decodeUnit.hdrActive ? COLORSPACE_REC_2020 : StreamConfig.colorSpace);
|
||||
|
||||
// IDR frames will have leading CSD buffers
|
||||
if (nalChainHead->bufferType != BUFFER_TYPE_PICDATA) {
|
||||
qdu->decodeUnit.frameType = FRAME_TYPE_IDR;
|
||||
|
||||
Reference in new issue
Block a user