mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Reorder some internal structures to reduce padding
This commit is contained in:
@@ -17,13 +17,13 @@ typedef struct _LINKED_BLOCKING_QUEUE_ENTRY {
|
|||||||
typedef struct _LINKED_BLOCKING_QUEUE {
|
typedef struct _LINKED_BLOCKING_QUEUE {
|
||||||
PLT_MUTEX mutex;
|
PLT_MUTEX mutex;
|
||||||
PLT_EVENT containsDataEvent;
|
PLT_EVENT containsDataEvent;
|
||||||
int sizeBound;
|
|
||||||
int currentSize;
|
|
||||||
bool shutdown;
|
|
||||||
bool draining;
|
|
||||||
int lifetimeSize;
|
|
||||||
PLINKED_BLOCKING_QUEUE_ENTRY head;
|
PLINKED_BLOCKING_QUEUE_ENTRY head;
|
||||||
PLINKED_BLOCKING_QUEUE_ENTRY tail;
|
PLINKED_BLOCKING_QUEUE_ENTRY tail;
|
||||||
|
int sizeBound;
|
||||||
|
int currentSize;
|
||||||
|
int lifetimeSize;
|
||||||
|
bool shutdown;
|
||||||
|
bool draining;
|
||||||
} LINKED_BLOCKING_QUEUE, *PLINKED_BLOCKING_QUEUE;
|
} LINKED_BLOCKING_QUEUE, *PLINKED_BLOCKING_QUEUE;
|
||||||
|
|
||||||
int LbqInitializeLinkedBlockingQueue(PLINKED_BLOCKING_QUEUE queueHead, int sizeBound);
|
int LbqInitializeLinkedBlockingQueue(PLINKED_BLOCKING_QUEUE queueHead, int sizeBound);
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
|
|||||||
|
|
||||||
typedef struct _PLT_CRYPTO_CONTEXT {
|
typedef struct _PLT_CRYPTO_CONTEXT {
|
||||||
#ifdef USE_MBEDTLS
|
#ifdef USE_MBEDTLS
|
||||||
bool initialized;
|
|
||||||
mbedtls_cipher_context_t ctx;
|
mbedtls_cipher_context_t ctx;
|
||||||
#else
|
|
||||||
bool initialized;
|
bool initialized;
|
||||||
|
#else
|
||||||
EVP_CIPHER_CTX* ctx;
|
EVP_CIPHER_CTX* ctx;
|
||||||
|
bool initialized;
|
||||||
#endif
|
#endif
|
||||||
} PLT_CRYPTO_CONTEXT, *PPLT_CRYPTO_CONTEXT;
|
} PLT_CRYPTO_CONTEXT, *PPLT_CRYPTO_CONTEXT;
|
||||||
|
|
||||||
|
|||||||
+5
-6
@@ -3,14 +3,13 @@
|
|||||||
#include "Video.h"
|
#include "Video.h"
|
||||||
|
|
||||||
typedef struct _RTPFEC_QUEUE_ENTRY {
|
typedef struct _RTPFEC_QUEUE_ENTRY {
|
||||||
PRTP_PACKET packet;
|
|
||||||
int length;
|
|
||||||
bool isParity;
|
|
||||||
uint64_t receiveTimeMs;
|
|
||||||
uint32_t presentationTimeMs;
|
|
||||||
|
|
||||||
struct _RTPFEC_QUEUE_ENTRY* next;
|
struct _RTPFEC_QUEUE_ENTRY* next;
|
||||||
struct _RTPFEC_QUEUE_ENTRY* prev;
|
struct _RTPFEC_QUEUE_ENTRY* prev;
|
||||||
|
PRTP_PACKET packet;
|
||||||
|
uint64_t receiveTimeMs;
|
||||||
|
uint32_t presentationTimeMs;
|
||||||
|
int length;
|
||||||
|
bool isParity;
|
||||||
} RTPFEC_QUEUE_ENTRY, *PRTPFEC_QUEUE_ENTRY;
|
} RTPFEC_QUEUE_ENTRY, *PRTPFEC_QUEUE_ENTRY;
|
||||||
|
|
||||||
typedef struct _RTPFEC_QUEUE_LIST {
|
typedef struct _RTPFEC_QUEUE_LIST {
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ typedef struct _RTP_QUEUE_ENTRY {
|
|||||||
} RTP_QUEUE_ENTRY, *PRTP_QUEUE_ENTRY;
|
} RTP_QUEUE_ENTRY, *PRTP_QUEUE_ENTRY;
|
||||||
|
|
||||||
typedef struct _RTP_REORDER_QUEUE {
|
typedef struct _RTP_REORDER_QUEUE {
|
||||||
int maxSize;
|
|
||||||
uint32_t maxQueueTimeMs;
|
|
||||||
|
|
||||||
PRTP_QUEUE_ENTRY queueHead;
|
PRTP_QUEUE_ENTRY queueHead;
|
||||||
PRTP_QUEUE_ENTRY queueTail;
|
PRTP_QUEUE_ENTRY queueTail;
|
||||||
int queueSize;
|
|
||||||
|
|
||||||
unsigned short nextRtpSequenceNumber;
|
|
||||||
|
|
||||||
uint64_t oldestQueuedTimeMs;
|
uint64_t oldestQueuedTimeMs;
|
||||||
|
|
||||||
|
uint32_t maxQueueTimeMs;
|
||||||
|
int maxSize;
|
||||||
|
int queueSize;
|
||||||
|
|
||||||
|
uint16_t nextRtpSequenceNumber;
|
||||||
} RTP_REORDER_QUEUE, *PRTP_REORDER_QUEUE;
|
} RTP_REORDER_QUEUE, *PRTP_REORDER_QUEUE;
|
||||||
|
|
||||||
#define RTPQ_RET_PACKET_CONSUMED 0x1
|
#define RTPQ_RET_PACKET_CONSUMED 0x1
|
||||||
@@ -38,4 +38,4 @@ typedef struct _RTP_REORDER_QUEUE {
|
|||||||
void RtpqInitializeQueue(PRTP_REORDER_QUEUE queue, int maxSize, int maxQueueTimeMs);
|
void RtpqInitializeQueue(PRTP_REORDER_QUEUE queue, int maxSize, int maxQueueTimeMs);
|
||||||
void RtpqCleanupQueue(PRTP_REORDER_QUEUE queue);
|
void RtpqCleanupQueue(PRTP_REORDER_QUEUE queue);
|
||||||
int RtpqAddPacket(PRTP_REORDER_QUEUE queue, PRTP_PACKET packet, PRTP_QUEUE_ENTRY packetEntry);
|
int RtpqAddPacket(PRTP_REORDER_QUEUE queue, PRTP_PACKET packet, PRTP_QUEUE_ENTRY packetEntry);
|
||||||
PRTP_PACKET RtpqGetQueuedPacket(PRTP_REORDER_QUEUE queue);
|
PRTP_PACKET RtpqGetQueuedPacket(PRTP_REORDER_QUEUE queue);
|
||||||
|
|||||||
Reference in New Issue
Block a user