From 5ba0f82b35f04b8a19106aa86c2158577248c9bf Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Sat, 13 Feb 2016 13:47:52 -0600 Subject: [PATCH] Manually cleanup files that somehow survived the mass find/replace --- limelight-common/AudioStream.c | 10 +++++----- limelight-common/ByteBuffer.c | 22 +++++++++++----------- limelight-common/ControlStream.c | 2 +- limelight-common/FakeCallbacks.c | 4 ++-- limelight-common/Limelight-internal.h | 4 ++-- limelight-common/Limelight.h | 2 +- limelight-common/PlatformSockets.c | 6 +++--- limelight-common/RtpReorderQueue.h | 4 ++-- limelight-common/RtspParser.c | 14 ++++++++++++-- limelight-common/SdpGenerator.c | 10 +++++----- limelight-common/Video.h | 2 +- limelight-common/VideoDepacketizer.c | 2 +- 12 files changed, 46 insertions(+), 36 deletions(-) diff --git a/limelight-common/AudioStream.c b/limelight-common/AudioStream.c index f0c04f9..de34df7 100644 --- a/limelight-common/AudioStream.c +++ b/limelight-common/AudioStream.c @@ -58,7 +58,7 @@ typedef struct _QUEUED_AUDIO_PACKET { } q; } QUEUED_AUDIO_PACKET, *PQUEUED_AUDIO_PACKET; -/* Initialize the audio stream */ +// Initialize the audio stream void initializeAudioStream(void) { if ((AudioCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) { LbqInitializeLinkedBlockingQueue(&packetQueue, 30); @@ -80,7 +80,7 @@ static void freePacketList(PLINKED_BLOCKING_QUEUE_ENTRY entry) { } } -/* Tear down the audio stream once we're done with it */ +// Tear down the audio stream once we're done with it void destroyAudioStream(void) { if ((AudioCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) { freePacketList(LbqDestroyLinkedBlockingQueue(&packetQueue)); @@ -89,7 +89,7 @@ void destroyAudioStream(void) { } static void UdpPingThreadProc(void* context) { - /* Ping in ASCII */ + // Ping in ASCII char pingData[] = { 0x50, 0x49, 0x4E, 0x47 }; struct sockaddr_in6 saddr; SOCK_RET err; @@ -97,7 +97,7 @@ static void UdpPingThreadProc(void* context) { memcpy(&saddr, &RemoteAddr, sizeof(saddr)); saddr.sin6_port = htons(RTP_PORT); - /* Send PING every 500 milliseconds */ + // Send PING every 500 milliseconds while (!PltIsThreadInterrupted(&udpPingThread)) { err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, RemoteAddrLen); if (err != sizeof(pingData)) { @@ -110,7 +110,7 @@ static void UdpPingThreadProc(void* context) { } } -static int queuePacketToLbq(PQUEUED_AUDIO_PACKET *packet) { +static int queuePacketToLbq(PQUEUED_AUDIO_PACKET* packet) { int err; err = LbqOfferQueueItem(&packetQueue, *packet, &(*packet)->q.lentry); diff --git a/limelight-common/ByteBuffer.c b/limelight-common/ByteBuffer.c index b488c3f..11ea2bc 100644 --- a/limelight-common/ByteBuffer.c +++ b/limelight-common/ByteBuffer.c @@ -8,7 +8,7 @@ void BbInitializeWrappedBuffer(PBYTE_BUFFER buff, char* data, int offset, int le buff->byteOrder = byteOrder; } -/* Get the long long in the correct byte order */ +// Get the long long in the correct byte order static long long byteSwapLongLong(PBYTE_BUFFER buff, long long l) { if (buff->byteOrder == BYTE_ORDER_BIG) { return HTONLL(l); @@ -18,7 +18,7 @@ static long long byteSwapLongLong(PBYTE_BUFFER buff, long long l) { } } -/* Get the int in the correct byte order */ +// Get the int in the correct byte order static int byteSwapInt(PBYTE_BUFFER buff, int i) { if (buff->byteOrder == BYTE_ORDER_BIG) { return htonl(i); @@ -28,7 +28,7 @@ static int byteSwapInt(PBYTE_BUFFER buff, int i) { } } -/* Get the short in the correct byte order */ +// Get the short in the correct byte order static int byteSwapShort(PBYTE_BUFFER buff, short s) { if (buff->byteOrder == BYTE_ORDER_BIG) { return htons(s); @@ -38,7 +38,7 @@ static int byteSwapShort(PBYTE_BUFFER buff, short s) { } } -/* Get a byte from the byte buffer */ +// Get a byte from the byte buffer int BbGet(PBYTE_BUFFER buff, char* c) { if (buff->position + sizeof(*c) > buff->length) { return 0; @@ -50,7 +50,7 @@ int BbGet(PBYTE_BUFFER buff, char* c) { return 1; } -/* Get a short from the byte buffer */ +// Get a short from the byte buffer int BbGetShort(PBYTE_BUFFER buff, short* s) { if (buff->position + sizeof(*s) >= buff->length) { return 0; @@ -64,7 +64,7 @@ int BbGetShort(PBYTE_BUFFER buff, short* s) { return 1; } -/* Get an int from the byte buffer */ +// Get an int from the byte buffer int BbGetInt(PBYTE_BUFFER buff, int* i) { if (buff->position + sizeof(*i) > buff->length) { return 0; @@ -78,7 +78,7 @@ int BbGetInt(PBYTE_BUFFER buff, int* i) { return 1; } -/* Get a long from the byte buffer */ +// Get a long from the byte buffer int BbGetLong(PBYTE_BUFFER buff, long long* l) { if (buff->position + sizeof(*l) > buff->length) { return 0; @@ -92,7 +92,7 @@ int BbGetLong(PBYTE_BUFFER buff, long long* l) { return 1; } -/* Put an int into the byte buffer */ +// Put an int into the byte buffer int BbPutInt(PBYTE_BUFFER buff, int i) { if (buff->position + sizeof(i) > buff->length) { return 0; @@ -106,7 +106,7 @@ int BbPutInt(PBYTE_BUFFER buff, int i) { return 1; } -/* Put a long into the byte buffer */ +// Put a long into the byte buffer int BbPutLong(PBYTE_BUFFER buff, long long l) { if (buff->position + sizeof(l) > buff->length) { return 0; @@ -120,7 +120,7 @@ int BbPutLong(PBYTE_BUFFER buff, long long l) { return 1; } -/* Put a short into the byte buffer */ +// Put a short into the byte buffer int BbPutShort(PBYTE_BUFFER buff, short s) { if (buff->position + sizeof(s) > buff->length) { return 0; @@ -134,7 +134,7 @@ int BbPutShort(PBYTE_BUFFER buff, short s) { return 1; } -/* Put a byte into the buffer */ +// Put a byte into the buffer int BbPut(PBYTE_BUFFER buff, char c) { if (buff->position + sizeof(c) > buff->length) { return 0; diff --git a/limelight-common/ControlStream.c b/limelight-common/ControlStream.c index b5d6d51..0d43c75 100644 --- a/limelight-common/ControlStream.c +++ b/limelight-common/ControlStream.c @@ -122,7 +122,7 @@ void destroyControlStream(void) { freeFrameInvalidationList(LbqDestroyLinkedBlockingQueue(&invalidReferenceFrameTuples)); } -int getNextFrameInvalidationTuple(PQUEUED_FRAME_INVALIDATION_TUPLE *qfit) { +int getNextFrameInvalidationTuple(PQUEUED_FRAME_INVALIDATION_TUPLE* qfit) { int err = LbqPollQueueElement(&invalidReferenceFrameTuples, (void**)qfit); return (err == LBQ_SUCCESS); } diff --git a/limelight-common/FakeCallbacks.c b/limelight-common/FakeCallbacks.c index 7098037..60aefab 100644 --- a/limelight-common/FakeCallbacks.c +++ b/limelight-common/FakeCallbacks.c @@ -38,8 +38,8 @@ static CONNECTION_LISTENER_CALLBACKS fakeClCallbacks = { .displayTransientMessage = fakeClDisplayTransientMessage, }; -void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS *drCallbacks, PAUDIO_RENDERER_CALLBACKS *arCallbacks, - PCONNECTION_LISTENER_CALLBACKS *clCallbacks) +void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS* drCallbacks, PAUDIO_RENDERER_CALLBACKS* arCallbacks, + PCONNECTION_LISTENER_CALLBACKS* clCallbacks) { if (*drCallbacks == NULL) { *drCallbacks = &fakeDrCallbacks; diff --git a/limelight-common/Limelight-internal.h b/limelight-common/Limelight-internal.h index 01cb5b7..169214e 100644 --- a/limelight-common/Limelight-internal.h +++ b/limelight-common/Limelight-internal.h @@ -17,8 +17,8 @@ extern AUDIO_RENDERER_CALLBACKS AudioCallbacks; int isBeforeSignedInt(int numA, int numB, int ambiguousCase); -void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS *drCallbacks, PAUDIO_RENDERER_CALLBACKS *arCallbacks, - PCONNECTION_LISTENER_CALLBACKS *clCallbacks); +void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS* drCallbacks, PAUDIO_RENDERER_CALLBACKS* arCallbacks, + PCONNECTION_LISTENER_CALLBACKS* clCallbacks); char* getSdpPayloadForStreamConfig(int rtspClientVersion, int* length); diff --git a/limelight-common/Limelight.h b/limelight-common/Limelight.h index 114c16a..3f40882 100644 --- a/limelight-common/Limelight.h +++ b/limelight-common/Limelight.h @@ -45,7 +45,7 @@ extern "C" { typedef struct _LENTRY { // Pointer to the next entry or NULL if this is the last entry - struct _LENTRY *next; + struct _LENTRY* next; // Pointer to data (never NULL) char* data; diff --git a/limelight-common/PlatformSockets.c b/limelight-common/PlatformSockets.c index b1661fc..46f3493 100644 --- a/limelight-common/PlatformSockets.c +++ b/limelight-common/PlatformSockets.c @@ -6,14 +6,14 @@ void addrToUrlSafeString(struct sockaddr_storage* addr, char* string) char addrstr[INET6_ADDRSTRLEN]; if (addr->ss_family == AF_INET6) { - struct sockaddr_in6* sin6 = (struct sockaddr_in6 *)addr; + struct sockaddr_in6* sin6 = (struct sockaddr_in6*)addr; inet_ntop(addr->ss_family, &sin6->sin6_addr, addrstr, sizeof(addrstr)); // IPv6 addresses need to be enclosed in brackets for URLs sprintf(string, "[%s]", addrstr); } else { - struct sockaddr_in* sin = (struct sockaddr_in *)addr; + struct sockaddr_in* sin = (struct sockaddr_in*)addr; inet_ntop(addr->ss_family, &sin->sin_addr, addrstr, sizeof(addrstr)); // IPv4 addresses are returned without changes @@ -61,7 +61,7 @@ SOCKET bindUdpSocket(int addrfamily, int bufferSize) { return s; } -SOCKET connectTcpSocket(struct sockaddr_storage *dstaddr, SOCKADDR_LEN addrlen, unsigned short port) { +SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen, unsigned short port) { SOCKET s; struct sockaddr_in6 addr; int err; diff --git a/limelight-common/RtpReorderQueue.h b/limelight-common/RtpReorderQueue.h index b39b7db..e017d79 100644 --- a/limelight-common/RtpReorderQueue.h +++ b/limelight-common/RtpReorderQueue.h @@ -10,8 +10,8 @@ typedef struct _RTP_QUEUE_ENTRY { uint64_t queueTimeMs; - struct _RTP_QUEUE_ENTRY *next; - struct _RTP_QUEUE_ENTRY *prev; + struct _RTP_QUEUE_ENTRY* next; + struct _RTP_QUEUE_ENTRY* prev; } RTP_QUEUE_ENTRY, *PRTP_QUEUE_ENTRY; typedef struct _RTP_REORDER_QUEUE { diff --git a/limelight-common/RtspParser.c b/limelight-common/RtspParser.c index 5337325..9fa576c 100644 --- a/limelight-common/RtspParser.c +++ b/limelight-common/RtspParser.c @@ -57,8 +57,18 @@ static int getMessageLength(PRTSP_MESSAGE msg) { // Given an RTSP message string rtspMessage, parse it into an RTSP_MESSAGE struct msg int parseRtspMessage(PRTSP_MESSAGE msg, char* rtspMessage, int length) { - char* token, *protocol, *endCheck, *target, *statusStr, *command, *sequence, flag; - char messageEnded = 0, *payload = NULL, *opt = NULL; + char* token; + char* protocol; + char* endCheck; + char* target; + char* statusStr; + char* command; + char* sequence; + char flag; + char messageEnded = 0; + + char* payload = NULL; + char* opt = NULL; int statusCode = 0; int sequenceNum; int exitCode; diff --git a/limelight-common/SdpGenerator.c b/limelight-common/SdpGenerator.c index e86c5df..336f573 100644 --- a/limelight-common/SdpGenerator.c +++ b/limelight-common/SdpGenerator.c @@ -15,7 +15,7 @@ typedef struct _SDP_OPTION { char name[MAX_OPTION_NAME_LEN + 1]; void* payload; int payloadLen; - struct _SDP_OPTION *next; + struct _SDP_OPTION* next; } SDP_OPTION, *PSDP_OPTION; // Cleanup the attribute list @@ -60,7 +60,7 @@ static int fillSerializedAttributeList(char* buffer, PSDP_OPTION head) { } // Add an attribute -static int addAttributeBinary(PSDP_OPTION *head, char* name, const void* payload, int payloadLen) { +static int addAttributeBinary(PSDP_OPTION* head, char* name, const void* payload, int payloadLen) { PSDP_OPTION option, currentOption; option = malloc(sizeof(*option) + payloadLen); @@ -89,12 +89,12 @@ static int addAttributeBinary(PSDP_OPTION *head, char* name, const void* payload } // Add an attribute string -static int addAttributeString(PSDP_OPTION *head, char* name, const char* payload) { +static int addAttributeString(PSDP_OPTION* head, char* name, const char* payload) { // We purposefully omit the null terminating character return addAttributeBinary(head, name, payload, (int)strlen(payload)); } -static int addGen3Options(PSDP_OPTION *head, char* addrStr) { +static int addGen3Options(PSDP_OPTION* head, char* addrStr) { int payloadInt; int err = 0; @@ -135,7 +135,7 @@ static int addGen3Options(PSDP_OPTION *head, char* addrStr) { return err; } -static int addGen4Options(PSDP_OPTION *head, char* addrStr) { +static int addGen4Options(PSDP_OPTION* head, char* addrStr) { char payloadStr[92]; int err = 0; unsigned char slicesPerFrame; diff --git a/limelight-common/Video.h b/limelight-common/Video.h index 3dbd82d..7ee0251 100644 --- a/limelight-common/Video.h +++ b/limelight-common/Video.h @@ -8,7 +8,7 @@ typedef struct _QUEUED_DECODE_UNIT { } QUEUED_DECODE_UNIT, *PQUEUED_DECODE_UNIT; void freeQueuedDecodeUnit(PQUEUED_DECODE_UNIT qdu); -int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT *qdu); +int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu); #pragma pack(push, 1) diff --git a/limelight-common/VideoDepacketizer.c b/limelight-common/VideoDepacketizer.c index adda5a2..526d551 100644 --- a/limelight-common/VideoDepacketizer.c +++ b/limelight-common/VideoDepacketizer.c @@ -159,7 +159,7 @@ static int getSpecialSeq(PBUFFER_DESC current, PBUFFER_DESC candidate) { } // Get the first decode unit available -int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT *qdu) { +int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu) { int err = LbqWaitForQueueElement(&decodeUnitQueue, (void**)qdu); if (err == LBQ_SUCCESS) { return 1;