Remove usage of long types for LP64 and LLP64 consistency

This commit is contained in:
Cameron Gutman
2020-12-05 16:51:03 -06:00
parent 333382ae74
commit 0ead0df2a1
5 changed files with 11 additions and 11 deletions

View File

@@ -33,8 +33,8 @@ static PLT_THREAD invalidateRefFramesThread;
static PLT_THREAD controlReceiveThread;
static PLT_EVENT invalidateRefFramesEvent;
static int lossCountSinceLastReport;
static long lastGoodFrame;
static long lastSeenFrame;
static int lastGoodFrame;
static int lastSeenFrame;
static bool stopping;
static bool disconnectPending;
@@ -660,7 +660,7 @@ static void lossStatsThreadFunc(void* context) {
}
static void requestIdrFrame(void) {
long long payload[3];
int64_t payload[3];
if (AppVersionQuad[0] >= 5) {
// Form the payload
@@ -697,7 +697,7 @@ static void requestIdrFrame(void) {
}
static void requestInvalidateReferenceFrames(void) {
long long payload[3];
int64_t payload[3];
PQUEUED_FRAME_INVALIDATION_TUPLE qfit;
LC_ASSERT(isReferenceFrameInvalidationEnabled());

View File

@@ -332,7 +332,7 @@ static void inputSendThreadProc(void* context) {
}
// Prepend the length to the message
encryptedLengthPrefix = htonl((unsigned long)encryptedSize);
encryptedLengthPrefix = htonl((uint32_t)encryptedSize);
memcpy(&encryptedBuffer[0], &encryptedLengthPrefix, 4);
if (AppVersionQuad[0] < 5) {

View File

@@ -139,7 +139,7 @@ typedef struct _DECODE_UNIT {
// Receive time of first buffer. This value uses an implementation-defined epoch.
// To compute actual latency values, use LiGetMillis() to get a timestamp that
// shares the same epoch as this value.
unsigned long long receiveTimeMs;
uint64_t receiveTimeMs;
// 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

View File

@@ -6,7 +6,7 @@ typedef struct _RTPFEC_QUEUE_ENTRY {
PRTP_PACKET packet;
int length;
bool isParity;
unsigned long long receiveTimeMs;
uint64_t receiveTimeMs;
unsigned int presentationTimeMs;
struct _RTPFEC_QUEUE_ENTRY* next;
@@ -16,7 +16,7 @@ typedef struct _RTPFEC_QUEUE_ENTRY {
typedef struct _RTP_FEC_QUEUE {
PRTPFEC_QUEUE_ENTRY bufferHead;
PRTPFEC_QUEUE_ENTRY bufferTail;
unsigned long long bufferFirstRecvTimeMs;
uint64_t bufferFirstRecvTimeMs;
int bufferSize;
int bufferLowestSequenceNumber;
int bufferHighestSequenceNumber;

View File

@@ -14,7 +14,7 @@ static bool waitingForIdrFrame;
static unsigned int lastPacketInStream;
static bool decodingFrame;
static bool strictIdrFrameWait;
static unsigned long long firstPacketReceiveTime;
static uint64_t firstPacketReceiveTime;
static unsigned int firstPacketPresentationTime;
static bool dropStatePending;
static bool idrFrameProcessed;
@@ -488,8 +488,8 @@ static int isFirstPacket(char flags) {
// Process an RTP Payload
// The caller will free *existingEntry unless we NULL it
void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
unsigned long long receiveTimeMs, unsigned int presentationTimeMs,
static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
uint64_t receiveTimeMs, unsigned int presentationTimeMs,
PLENTRY_INTERNAL* existingEntry) {
BUFFER_DESC currentPos;
int frameIndex;