mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 02:21:07 +00:00
Use uint64_t for DECODE_UNIT presentationTimeMs
This still holds a millisecond value sourced from RTP timestamp, but since we're changing the API anyway, now is a good time to future-proof this field.
This commit is contained in:
committed by
Cameron Gutman
parent
82ee2d6590
commit
a3ebaaf015
@@ -167,7 +167,7 @@ typedef struct _DECODE_UNIT {
|
|||||||
// Presentation time in milliseconds with the epoch at the first captured frame.
|
// Presentation time in milliseconds with the epoch at the first captured frame.
|
||||||
// This can be used to aid frame pacing or to drop old frames that were queued too
|
// This can be used to aid frame pacing or to drop old frames that were queued too
|
||||||
// long prior to display.
|
// long prior to display.
|
||||||
unsigned int presentationTimeMs;
|
uint64_t presentationTimeMs;
|
||||||
|
|
||||||
// Length of the entire buffer chain in bytes
|
// Length of the entire buffer chain in bytes
|
||||||
int fullLength;
|
int fullLength;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ typedef struct _RTPV_QUEUE_ENTRY {
|
|||||||
struct _RTPV_QUEUE_ENTRY* prev;
|
struct _RTPV_QUEUE_ENTRY* prev;
|
||||||
PRTP_PACKET packet;
|
PRTP_PACKET packet;
|
||||||
uint64_t receiveTimeUs;
|
uint64_t receiveTimeUs;
|
||||||
uint32_t presentationTimeMs;
|
uint64_t presentationTimeMs;
|
||||||
int length;
|
int length;
|
||||||
bool isParity;
|
bool isParity;
|
||||||
} RTPV_QUEUE_ENTRY, *PRTPV_QUEUE_ENTRY;
|
} RTPV_QUEUE_ENTRY, *PRTPV_QUEUE_ENTRY;
|
||||||
@@ -43,7 +43,7 @@ typedef struct _RTP_VIDEO_QUEUE {
|
|||||||
uint8_t multiFecCurrentBlockNumber;
|
uint8_t multiFecCurrentBlockNumber;
|
||||||
uint8_t multiFecLastBlockNumber;
|
uint8_t multiFecLastBlockNumber;
|
||||||
|
|
||||||
uint32_t lastOosFramePresentationTimestamp;
|
uint64_t lastOosFramePresentationTimestamp;
|
||||||
bool receivedOosData;
|
bool receivedOosData;
|
||||||
|
|
||||||
RTP_VIDEO_STATS stats; // the above values are short-lived, this tracks stats for the life of the queue
|
RTP_VIDEO_STATS stats; // the above values are short-lived, this tracks stats for the life of the queue
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ static bool strictIdrFrameWait;
|
|||||||
static uint64_t syntheticPtsBaseUs;
|
static uint64_t syntheticPtsBaseUs;
|
||||||
static uint16_t frameHostProcessingLatency;
|
static uint16_t frameHostProcessingLatency;
|
||||||
static uint64_t firstPacketReceiveTimeUs;
|
static uint64_t firstPacketReceiveTimeUs;
|
||||||
static unsigned int firstPacketPresentationTime;
|
static uint64_t firstPacketPresentationTime;
|
||||||
static bool dropStatePending;
|
static bool dropStatePending;
|
||||||
static bool idrFrameProcessed;
|
static bool idrFrameProcessed;
|
||||||
|
|
||||||
@@ -832,10 +832,10 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!presentationTimeMs && frameIndex > 0) {
|
if (!presentationTimeMs && frameIndex > 0) {
|
||||||
firstPacketPresentationTime = (unsigned int)((receiveTimeUs - syntheticPtsBaseUs) / 1000);
|
firstPacketPresentationTime = (receiveTimeUs - syntheticPtsBaseUs) / 1000;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
firstPacketPresentationTime = (unsigned int)presentationTimeMs;
|
firstPacketPresentationTime = presentationTimeMs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user