Use stdint.h types for Video.h

This commit is contained in:
Cameron Gutman
2021-04-26 17:08:44 -05:00
parent ae92f15b0a
commit 8dab1ee300
3 changed files with 18 additions and 16 deletions

View File

@@ -423,7 +423,7 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, int length, PRTPFEC_
return RTPF_RET_REJECTED;
}
int fecIndex = (nvPacket->fecInfo & 0x3FF000) >> 12;
uint32_t fecIndex = (nvPacket->fecInfo & 0x3FF000) >> 12;
// Reinitialize the queue if it's empty after a frame delivery or
// if we can't finish a frame before receiving the next one.

View File

@@ -17,11 +17,13 @@ bool getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu);
#define FLAG_SOF 0x4
typedef struct _NV_VIDEO_PACKET {
unsigned int streamPacketIndex;
unsigned int frameIndex;
char flags;
char reserved[3];
int fecInfo;
uint32_t streamPacketIndex;
uint32_t frameIndex;
uint8_t flags;
uint8_t reserved;
uint8_t multiFecFlags;
uint8_t multiFecBlocks;
uint32_t fecInfo;
} NV_VIDEO_PACKET, *PNV_VIDEO_PACKET;
#define FLAG_EXTENSION 0x10
@@ -30,11 +32,11 @@ typedef struct _NV_VIDEO_PACKET {
#define MAX_RTP_HEADER_SIZE 16
typedef struct _RTP_PACKET {
char header;
char packetType;
unsigned short sequenceNumber;
unsigned int timestamp;
unsigned int ssrc;
uint8_t header;
uint8_t packetType;
uint16_t sequenceNumber;
uint32_t timestamp;
uint32_t ssrc;
} RTP_PACKET, *PRTP_PACKET;
#pragma pack(pop)

View File

@@ -555,7 +555,7 @@ void requestDecoderRefresh(void) {
}
// Return 1 if packet is the first one in the frame
static int isFirstPacket(char flags) {
static int isFirstPacket(uint8_t flags) {
// Clear the picture data flag
flags &= ~FLAG_CONTAINS_PIC_DATA;
@@ -570,10 +570,10 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
uint64_t receiveTimeMs, unsigned int presentationTimeMs,
PLENTRY_INTERNAL* existingEntry) {
BUFFER_DESC currentPos;
unsigned int frameIndex;
char flags;
unsigned int firstPacket;
unsigned int streamPacketIndex;
uint32_t frameIndex;
uint8_t flags;
uint32_t firstPacket;
uint32_t streamPacketIndex;
// Mask the top 8 bits from the SPI
videoPacket->streamPacketIndex >>= 8;