mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Use stdint.h types for Video.h
This commit is contained in:
+1
-1
@@ -423,7 +423,7 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, int length, PRTPFEC_
|
|||||||
return RTPF_RET_REJECTED;
|
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
|
// Reinitialize the queue if it's empty after a frame delivery or
|
||||||
// if we can't finish a frame before receiving the next one.
|
// if we can't finish a frame before receiving the next one.
|
||||||
|
|||||||
+12
-10
@@ -17,11 +17,13 @@ bool getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu);
|
|||||||
#define FLAG_SOF 0x4
|
#define FLAG_SOF 0x4
|
||||||
|
|
||||||
typedef struct _NV_VIDEO_PACKET {
|
typedef struct _NV_VIDEO_PACKET {
|
||||||
unsigned int streamPacketIndex;
|
uint32_t streamPacketIndex;
|
||||||
unsigned int frameIndex;
|
uint32_t frameIndex;
|
||||||
char flags;
|
uint8_t flags;
|
||||||
char reserved[3];
|
uint8_t reserved;
|
||||||
int fecInfo;
|
uint8_t multiFecFlags;
|
||||||
|
uint8_t multiFecBlocks;
|
||||||
|
uint32_t fecInfo;
|
||||||
} NV_VIDEO_PACKET, *PNV_VIDEO_PACKET;
|
} NV_VIDEO_PACKET, *PNV_VIDEO_PACKET;
|
||||||
|
|
||||||
#define FLAG_EXTENSION 0x10
|
#define FLAG_EXTENSION 0x10
|
||||||
@@ -30,11 +32,11 @@ typedef struct _NV_VIDEO_PACKET {
|
|||||||
#define MAX_RTP_HEADER_SIZE 16
|
#define MAX_RTP_HEADER_SIZE 16
|
||||||
|
|
||||||
typedef struct _RTP_PACKET {
|
typedef struct _RTP_PACKET {
|
||||||
char header;
|
uint8_t header;
|
||||||
char packetType;
|
uint8_t packetType;
|
||||||
unsigned short sequenceNumber;
|
uint16_t sequenceNumber;
|
||||||
unsigned int timestamp;
|
uint32_t timestamp;
|
||||||
unsigned int ssrc;
|
uint32_t ssrc;
|
||||||
} RTP_PACKET, *PRTP_PACKET;
|
} RTP_PACKET, *PRTP_PACKET;
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ void requestDecoderRefresh(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return 1 if packet is the first one in the frame
|
// 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
|
// Clear the picture data flag
|
||||||
flags &= ~FLAG_CONTAINS_PIC_DATA;
|
flags &= ~FLAG_CONTAINS_PIC_DATA;
|
||||||
|
|
||||||
@@ -570,10 +570,10 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
|
|||||||
uint64_t receiveTimeMs, unsigned int presentationTimeMs,
|
uint64_t receiveTimeMs, unsigned int presentationTimeMs,
|
||||||
PLENTRY_INTERNAL* existingEntry) {
|
PLENTRY_INTERNAL* existingEntry) {
|
||||||
BUFFER_DESC currentPos;
|
BUFFER_DESC currentPos;
|
||||||
unsigned int frameIndex;
|
uint32_t frameIndex;
|
||||||
char flags;
|
uint8_t flags;
|
||||||
unsigned int firstPacket;
|
uint32_t firstPacket;
|
||||||
unsigned int streamPacketIndex;
|
uint32_t streamPacketIndex;
|
||||||
|
|
||||||
// Mask the top 8 bits from the SPI
|
// Mask the top 8 bits from the SPI
|
||||||
videoPacket->streamPacketIndex >>= 8;
|
videoPacket->streamPacketIndex >>= 8;
|
||||||
|
|||||||
Reference in New Issue
Block a user