Reorder some internal structures to reduce padding

This commit is contained in:
Cameron Gutman
2021-05-25 19:54:03 -05:00
parent 46cea5011d
commit 59484ea066
4 changed files with 19 additions and 20 deletions

View File

@@ -17,13 +17,13 @@ typedef struct _LINKED_BLOCKING_QUEUE_ENTRY {
typedef struct _LINKED_BLOCKING_QUEUE {
PLT_MUTEX mutex;
PLT_EVENT containsDataEvent;
int sizeBound;
int currentSize;
bool shutdown;
bool draining;
int lifetimeSize;
PLINKED_BLOCKING_QUEUE_ENTRY head;
PLINKED_BLOCKING_QUEUE_ENTRY tail;
int sizeBound;
int currentSize;
int lifetimeSize;
bool shutdown;
bool draining;
} LINKED_BLOCKING_QUEUE, *PLINKED_BLOCKING_QUEUE;
int LbqInitializeLinkedBlockingQueue(PLINKED_BLOCKING_QUEUE queueHead, int sizeBound);

View File

@@ -11,11 +11,11 @@ typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
typedef struct _PLT_CRYPTO_CONTEXT {
#ifdef USE_MBEDTLS
bool initialized;
mbedtls_cipher_context_t ctx;
#else
bool initialized;
#else
EVP_CIPHER_CTX* ctx;
bool initialized;
#endif
} PLT_CRYPTO_CONTEXT, *PPLT_CRYPTO_CONTEXT;

View File

@@ -3,14 +3,13 @@
#include "Video.h"
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* prev;
PRTP_PACKET packet;
uint64_t receiveTimeMs;
uint32_t presentationTimeMs;
int length;
bool isParity;
} RTPFEC_QUEUE_ENTRY, *PRTPFEC_QUEUE_ENTRY;
typedef struct _RTPFEC_QUEUE_LIST {

View File

@@ -15,16 +15,16 @@ typedef struct _RTP_QUEUE_ENTRY {
} RTP_QUEUE_ENTRY, *PRTP_QUEUE_ENTRY;
typedef struct _RTP_REORDER_QUEUE {
int maxSize;
uint32_t maxQueueTimeMs;
PRTP_QUEUE_ENTRY queueHead;
PRTP_QUEUE_ENTRY queueTail;
int queueSize;
unsigned short nextRtpSequenceNumber;
uint64_t oldestQueuedTimeMs;
uint32_t maxQueueTimeMs;
int maxSize;
int queueSize;
uint16_t nextRtpSequenceNumber;
} RTP_REORDER_QUEUE, *PRTP_REORDER_QUEUE;
#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 RtpqCleanupQueue(PRTP_REORDER_QUEUE queue);
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);