mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Cleanup: standardize * by type name, not var name
This commit is contained in:
parent
b7ca62190c
commit
35835898c3
@ -88,7 +88,7 @@ void destroyAudioStream(void) {
|
|||||||
RtpqCleanupQueue(&rtpReorderQueue);
|
RtpqCleanupQueue(&rtpReorderQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UdpPingThreadProc(void *context) {
|
static void UdpPingThreadProc(void* context) {
|
||||||
/* Ping in ASCII */
|
/* Ping in ASCII */
|
||||||
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
||||||
struct sockaddr_in6 saddr;
|
struct sockaddr_in6 saddr;
|
||||||
@ -142,7 +142,7 @@ static void decodeInputData(PQUEUED_AUDIO_PACKET packet) {
|
|||||||
|
|
||||||
lastSeq = rtp->sequenceNumber;
|
lastSeq = rtp->sequenceNumber;
|
||||||
|
|
||||||
AudioCallbacks.decodeAndPlaySample((char *)(rtp + 1), packet->size - sizeof(*rtp));
|
AudioCallbacks.decodeAndPlaySample((char*)(rtp + 1), packet->size - sizeof(*rtp));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ReceiveThreadProc(void* context) {
|
static void ReceiveThreadProc(void* context) {
|
||||||
|
@ -39,7 +39,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) {
|
int BbGet(PBYTE_BUFFER buff, char* c) {
|
||||||
if (buff->position + sizeof(*c) > buff->length) {
|
if (buff->position + sizeof(*c) > buff->length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ int BbGet(PBYTE_BUFFER buff, char *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get a short from the byte buffer */
|
/* Get a short from the byte buffer */
|
||||||
int BbGetShort(PBYTE_BUFFER buff, short *s) {
|
int BbGetShort(PBYTE_BUFFER buff, short* s) {
|
||||||
if (buff->position + sizeof(*s) >= buff->length) {
|
if (buff->position + sizeof(*s) >= buff->length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ int BbGetShort(PBYTE_BUFFER buff, short *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get an int from the byte buffer */
|
/* Get an int from the byte buffer */
|
||||||
int BbGetInt(PBYTE_BUFFER buff, int *i) {
|
int BbGetInt(PBYTE_BUFFER buff, int* i) {
|
||||||
if (buff->position + sizeof(*i) > buff->length) {
|
if (buff->position + sizeof(*i) > buff->length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ int BbGetInt(PBYTE_BUFFER buff, int *i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get a long from the byte buffer */
|
/* Get a long from the byte buffer */
|
||||||
int BbGetLong(PBYTE_BUFFER buff, long long *l) {
|
int BbGetLong(PBYTE_BUFFER buff, long long* l) {
|
||||||
if (buff->position + sizeof(*l) > buff->length) {
|
if (buff->position + sizeof(*l) > buff->length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@ typedef struct _BYTE_BUFFER {
|
|||||||
|
|
||||||
void BbInitializeWrappedBuffer(PBYTE_BUFFER buff, char* data, int offset, int length, int byteOrder);
|
void BbInitializeWrappedBuffer(PBYTE_BUFFER buff, char* data, int offset, int length, int byteOrder);
|
||||||
|
|
||||||
int BbGet(PBYTE_BUFFER buff, char *c);
|
int BbGet(PBYTE_BUFFER buff, char* c);
|
||||||
int BbGetShort(PBYTE_BUFFER buff, short *s);
|
int BbGetShort(PBYTE_BUFFER buff, short* s);
|
||||||
int BbGetInt(PBYTE_BUFFER buff, int *i);
|
int BbGetInt(PBYTE_BUFFER buff, int* i);
|
||||||
int BbGetLong(PBYTE_BUFFER buff, long long *l);
|
int BbGetLong(PBYTE_BUFFER buff, long long* l);
|
||||||
|
|
||||||
int BbPutInt(PBYTE_BUFFER buff, int i);
|
int BbPutInt(PBYTE_BUFFER buff, int i);
|
||||||
int BbPutShort(PBYTE_BUFFER buff, short s);
|
int BbPutShort(PBYTE_BUFFER buff, short s);
|
||||||
|
@ -144,7 +144,7 @@ static void ClInternalConnectionTerminated(long errorCode)
|
|||||||
PltCloseThread(&terminationCallbackThread);
|
PltCloseThread(&terminationCallbackThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int resolveHostName(const char *host)
|
static int resolveHostName(const char*host)
|
||||||
{
|
{
|
||||||
struct addrinfo hints, *res;
|
struct addrinfo hints, *res;
|
||||||
int err;
|
int err;
|
||||||
|
@ -77,9 +77,9 @@ static const char* preconstructedPayloadsGen4[] = {
|
|||||||
startBGen4
|
startBGen4
|
||||||
};
|
};
|
||||||
|
|
||||||
static short *packetTypes;
|
static short* packetTypes;
|
||||||
static short *payloadLengths;
|
static short* payloadLengths;
|
||||||
static char **preconstructedPayloads;
|
static char**preconstructedPayloads;
|
||||||
|
|
||||||
#define LOSS_REPORT_INTERVAL_MS 50
|
#define LOSS_REPORT_INTERVAL_MS 50
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ static int sendMessageAndDiscardReply(short ptype, short paylen, const void* pay
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void lossStatsThreadFunc(void* context) {
|
static void lossStatsThreadFunc(void* context) {
|
||||||
char *lossStatsPayload;
|
char*lossStatsPayload;
|
||||||
BYTE_BUFFER byteBuffer;
|
BYTE_BUFFER byteBuffer;
|
||||||
|
|
||||||
lossStatsPayload = malloc(payloadLengths[IDX_LOSS_STATS]);
|
lossStatsPayload = malloc(payloadLengths[IDX_LOSS_STATS]);
|
||||||
|
@ -20,7 +20,7 @@ int isBeforeSignedInt(int numA, int numB, int ambiguousCase);
|
|||||||
void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS *drCallbacks, PAUDIO_RENDERER_CALLBACKS *arCallbacks,
|
void fixupMissingCallbacks(PDECODER_RENDERER_CALLBACKS *drCallbacks, PAUDIO_RENDERER_CALLBACKS *arCallbacks,
|
||||||
PCONNECTION_LISTENER_CALLBACKS *clCallbacks);
|
PCONNECTION_LISTENER_CALLBACKS *clCallbacks);
|
||||||
|
|
||||||
char* getSdpPayloadForStreamConfig(int rtspClientVersion, int *length);
|
char* getSdpPayloadForStreamConfig(int rtspClientVersion, int* length);
|
||||||
|
|
||||||
int initializeControlStream(void);
|
int initializeControlStream(void);
|
||||||
int startControlStream(void);
|
int startControlStream(void);
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
#define LBQ_NO_ELEMENT 3
|
#define LBQ_NO_ELEMENT 3
|
||||||
|
|
||||||
typedef struct _LINKED_BLOCKING_QUEUE_ENTRY {
|
typedef struct _LINKED_BLOCKING_QUEUE_ENTRY {
|
||||||
struct _LINKED_BLOCKING_QUEUE_ENTRY *flink;
|
struct _LINKED_BLOCKING_QUEUE_ENTRY* flink;
|
||||||
struct _LINKED_BLOCKING_QUEUE_ENTRY *blink;
|
struct _LINKED_BLOCKING_QUEUE_ENTRY* blink;
|
||||||
void* data;
|
void* data;
|
||||||
} LINKED_BLOCKING_QUEUE_ENTRY, *PLINKED_BLOCKING_QUEUE_ENTRY;
|
} LINKED_BLOCKING_QUEUE_ENTRY, *PLINKED_BLOCKING_QUEUE_ENTRY;
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ void LimelogWindows(char* Format, ...) {
|
|||||||
|
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
PLT_MUTEX thread_list_lock;
|
PLT_MUTEX thread_list_lock;
|
||||||
PLT_THREAD *thread_head;
|
PLT_THREAD* thread_head;
|
||||||
|
|
||||||
DWORD WINAPI ThreadProc(LPVOID lpParameter) {
|
DWORD WINAPI ThreadProc(LPVOID lpParameter) {
|
||||||
struct thread_context *ctx = (struct thread_context *)lpParameter;
|
struct thread_context* ctx = (struct thread_context*)lpParameter;
|
||||||
|
|
||||||
ctx->entry(ctx->context);
|
ctx->entry(ctx->context);
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ DWORD WINAPI ThreadProc(LPVOID lpParameter) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void* ThreadProc(void* context) {
|
void* ThreadProc(void* context) {
|
||||||
struct thread_context *ctx = (struct thread_context *)context;
|
struct thread_context* ctx = (struct thread_context*)context;
|
||||||
|
|
||||||
ctx->entry(ctx->context);
|
ctx->entry(ctx->context);
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ void PltSleepMs(int ms) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int PltCreateMutex(PLT_MUTEX *mutex) {
|
int PltCreateMutex(PLT_MUTEX* mutex) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
*mutex = CreateMutexEx(NULL, NULL, 0, MUTEX_ALL_ACCESS);
|
*mutex = CreateMutexEx(NULL, NULL, 0, MUTEX_ALL_ACCESS);
|
||||||
if (!*mutex) {
|
if (!*mutex) {
|
||||||
@ -63,7 +63,7 @@ int PltCreateMutex(PLT_MUTEX *mutex) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltDeleteMutex(PLT_MUTEX *mutex) {
|
void PltDeleteMutex(PLT_MUTEX* mutex) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
CloseHandle(*mutex);
|
CloseHandle(*mutex);
|
||||||
#else
|
#else
|
||||||
@ -71,7 +71,7 @@ void PltDeleteMutex(PLT_MUTEX *mutex) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltLockMutex(PLT_MUTEX *mutex) {
|
void PltLockMutex(PLT_MUTEX* mutex) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
int err;
|
int err;
|
||||||
err = WaitForSingleObjectEx(*mutex, INFINITE, FALSE);
|
err = WaitForSingleObjectEx(*mutex, INFINITE, FALSE);
|
||||||
@ -83,7 +83,7 @@ void PltLockMutex(PLT_MUTEX *mutex) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltUnlockMutex(PLT_MUTEX *mutex) {
|
void PltUnlockMutex(PLT_MUTEX* mutex) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
ReleaseMutex(*mutex);
|
ReleaseMutex(*mutex);
|
||||||
#else
|
#else
|
||||||
@ -91,7 +91,7 @@ void PltUnlockMutex(PLT_MUTEX *mutex) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltJoinThread(PLT_THREAD *thread) {
|
void PltJoinThread(PLT_THREAD* thread) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
WaitForSingleObjectEx(thread->handle, INFINITE, FALSE);
|
WaitForSingleObjectEx(thread->handle, INFINITE, FALSE);
|
||||||
#else
|
#else
|
||||||
@ -99,9 +99,9 @@ void PltJoinThread(PLT_THREAD *thread) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltCloseThread(PLT_THREAD *thread) {
|
void PltCloseThread(PLT_THREAD* thread) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
PLT_THREAD *current_thread;
|
PLT_THREAD* current_thread;
|
||||||
|
|
||||||
PltLockMutex(&thread_list_lock);
|
PltLockMutex(&thread_list_lock);
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ void PltCloseThread(PLT_THREAD *thread) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int PltIsThreadInterrupted(PLT_THREAD *thread) {
|
int PltIsThreadInterrupted(PLT_THREAD* thread) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
return thread->cancelled;
|
return thread->cancelled;
|
||||||
#else
|
#else
|
||||||
@ -146,7 +146,7 @@ int PltIsThreadInterrupted(PLT_THREAD *thread) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltInterruptThread(PLT_THREAD *thread) {
|
void PltInterruptThread(PLT_THREAD* thread) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
thread->cancelled = 1;
|
thread->cancelled = 1;
|
||||||
SetEvent(thread->termRequested);
|
SetEvent(thread->termRequested);
|
||||||
@ -155,11 +155,11 @@ void PltInterruptThread(PLT_THREAD *thread) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD *thread) {
|
int PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD* thread) {
|
||||||
struct thread_context *ctx;
|
struct thread_context* ctx;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
ctx = (struct thread_context *)malloc(sizeof(*ctx));
|
ctx = (struct thread_context*)malloc(sizeof(*ctx));
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ int PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD *thread) {
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PltCreateEvent(PLT_EVENT *event) {
|
int PltCreateEvent(PLT_EVENT* event) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
*event = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
|
*event = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
|
||||||
if (!*event) {
|
if (!*event) {
|
||||||
@ -224,7 +224,7 @@ int PltCreateEvent(PLT_EVENT *event) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltCloseEvent(PLT_EVENT *event) {
|
void PltCloseEvent(PLT_EVENT* event) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
CloseHandle(*event);
|
CloseHandle(*event);
|
||||||
#else
|
#else
|
||||||
@ -233,7 +233,7 @@ void PltCloseEvent(PLT_EVENT *event) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltSetEvent(PLT_EVENT *event) {
|
void PltSetEvent(PLT_EVENT* event) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
SetEvent(*event);
|
SetEvent(*event);
|
||||||
#else
|
#else
|
||||||
@ -242,7 +242,7 @@ void PltSetEvent(PLT_EVENT *event) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PltClearEvent(PLT_EVENT *event) {
|
void PltClearEvent(PLT_EVENT* event) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
ResetEvent(*event);
|
ResetEvent(*event);
|
||||||
#else
|
#else
|
||||||
@ -250,10 +250,10 @@ void PltClearEvent(PLT_EVENT *event) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int PltWaitForEvent(PLT_EVENT *event) {
|
int PltWaitForEvent(PLT_EVENT* event) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
DWORD error;
|
DWORD error;
|
||||||
PLT_THREAD *current_thread;
|
PLT_THREAD* current_thread;
|
||||||
HANDLE objects[2];
|
HANDLE objects[2];
|
||||||
|
|
||||||
PltLockMutex(&thread_list_lock);
|
PltLockMutex(&thread_list_lock);
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#include "PlatformSockets.h"
|
#include "PlatformSockets.h"
|
||||||
#include "Limelight-internal.h"
|
#include "Limelight-internal.h"
|
||||||
|
|
||||||
void addrToUrlSafeString(struct sockaddr_storage *addr, char* string)
|
void addrToUrlSafeString(struct sockaddr_storage* addr, char* string)
|
||||||
{
|
{
|
||||||
char addrstr[INET6_ADDRSTRLEN];
|
char addrstr[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
if (addr->ss_family == AF_INET6) {
|
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));
|
inet_ntop(addr->ss_family, &sin6->sin6_addr, addrstr, sizeof(addrstr));
|
||||||
|
|
||||||
// IPv6 addresses need to be enclosed in brackets for URLs
|
// IPv6 addresses need to be enclosed in brackets for URLs
|
||||||
sprintf(string, "[%s]", addrstr);
|
sprintf(string, "[%s]", addrstr);
|
||||||
}
|
}
|
||||||
else {
|
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));
|
inet_ntop(addr->ss_family, &sin->sin_addr, addrstr, sizeof(addrstr));
|
||||||
|
|
||||||
// IPv4 addresses are returned without changes
|
// IPv4 addresses are returned without changes
|
||||||
|
@ -36,9 +36,9 @@ typedef socklen_t SOCKADDR_LEN;
|
|||||||
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
||||||
|
|
||||||
// IPv6 addresses have 2 extra characters for URL escaping
|
// IPv6 addresses have 2 extra characters for URL escaping
|
||||||
#define URLSAFESTRING_LEN INET6_ADDRSTRLEN+2
|
#define URLSAFESTRING_LEN (INET6_ADDRSTRLEN+2)
|
||||||
void addrToUrlSafeString(struct sockaddr_storage *addr, char* string);
|
void addrToUrlSafeString(struct sockaddr_storage* addr, char* string);
|
||||||
|
|
||||||
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 bindUdpSocket(int addrfamily, int bufferSize);
|
SOCKET bindUdpSocket(int addrfamily, int bufferSize);
|
||||||
int enableNoDelay(SOCKET s);
|
int enableNoDelay(SOCKET s);
|
@ -3,7 +3,7 @@
|
|||||||
#include "Limelight.h"
|
#include "Limelight.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
|
|
||||||
typedef void(*ThreadEntry)(void *context);
|
typedef void(*ThreadEntry)(void* context);
|
||||||
|
|
||||||
struct thread_context {
|
struct thread_context {
|
||||||
ThreadEntry entry;
|
ThreadEntry entry;
|
||||||
@ -17,7 +17,7 @@ typedef struct _PLT_THREAD {
|
|||||||
DWORD tid;
|
DWORD tid;
|
||||||
HANDLE termRequested;
|
HANDLE termRequested;
|
||||||
|
|
||||||
struct _PLT_THREAD *next;
|
struct _PLT_THREAD* next;
|
||||||
} PLT_THREAD;
|
} PLT_THREAD;
|
||||||
typedef HANDLE PLT_MUTEX;
|
typedef HANDLE PLT_MUTEX;
|
||||||
typedef HANDLE PLT_EVENT;
|
typedef HANDLE PLT_EVENT;
|
||||||
@ -33,22 +33,22 @@ typedef struct _PLT_EVENT {
|
|||||||
#error Unsupported platform
|
#error Unsupported platform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int PltCreateMutex(PLT_MUTEX *mutex);
|
int PltCreateMutex(PLT_MUTEX* mutex);
|
||||||
void PltDeleteMutex(PLT_MUTEX *mutex);
|
void PltDeleteMutex(PLT_MUTEX* mutex);
|
||||||
void PltLockMutex(PLT_MUTEX *mutex);
|
void PltLockMutex(PLT_MUTEX* mutex);
|
||||||
void PltUnlockMutex(PLT_MUTEX *mutex);
|
void PltUnlockMutex(PLT_MUTEX* mutex);
|
||||||
|
|
||||||
int PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD *thread);
|
int PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD*thread);
|
||||||
void PltCloseThread(PLT_THREAD *thread);
|
void PltCloseThread(PLT_THREAD*thread);
|
||||||
void PltInterruptThread(PLT_THREAD *thread);
|
void PltInterruptThread(PLT_THREAD*thread);
|
||||||
int PltIsThreadInterrupted(PLT_THREAD *thread);
|
int PltIsThreadInterrupted(PLT_THREAD*thread);
|
||||||
void PltJoinThread(PLT_THREAD *thread);
|
void PltJoinThread(PLT_THREAD*thread);
|
||||||
|
|
||||||
int PltCreateEvent(PLT_EVENT *event);
|
int PltCreateEvent(PLT_EVENT* event);
|
||||||
void PltCloseEvent(PLT_EVENT *event);
|
void PltCloseEvent(PLT_EVENT* event);
|
||||||
void PltSetEvent(PLT_EVENT *event);
|
void PltSetEvent(PLT_EVENT* event);
|
||||||
void PltClearEvent(PLT_EVENT *event);
|
void PltClearEvent(PLT_EVENT* event);
|
||||||
int PltWaitForEvent(PLT_EVENT *event);
|
int PltWaitForEvent(PLT_EVENT* event);
|
||||||
|
|
||||||
void PltRunThreadProc(void);
|
void PltRunThreadProc(void);
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ static int addGen4Options(PSDP_OPTION *head, char* addrStr) {
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PSDP_OPTION getAttributesList(char *urlSafeAddr) {
|
static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||||
PSDP_OPTION optionHead;
|
PSDP_OPTION optionHead;
|
||||||
char payloadStr[92];
|
char payloadStr[92];
|
||||||
int err;
|
int err;
|
||||||
@ -248,7 +248,7 @@ static PSDP_OPTION getAttributesList(char *urlSafeAddr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Populate the SDP header with required information
|
// Populate the SDP header with required information
|
||||||
static int fillSdpHeader(char* buffer, int rtspClientVersion, char *urlSafeAddr) {
|
static int fillSdpHeader(char* buffer, int rtspClientVersion, char*urlSafeAddr) {
|
||||||
return sprintf(buffer,
|
return sprintf(buffer,
|
||||||
"v=0\r\n"
|
"v=0\r\n"
|
||||||
"o=android 0 %d IN %s %s\r\n"
|
"o=android 0 %d IN %s %s\r\n"
|
||||||
@ -267,7 +267,7 @@ static int fillSdpTail(char* buffer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the SDP attributes for the stream config
|
// Get the SDP attributes for the stream config
|
||||||
char* getSdpPayloadForStreamConfig(int rtspClientVersion, int *length) {
|
char* getSdpPayloadForStreamConfig(int rtspClientVersion, int* length) {
|
||||||
PSDP_OPTION attributeList;
|
PSDP_OPTION attributeList;
|
||||||
int offset;
|
int offset;
|
||||||
char* payload;
|
char* payload;
|
||||||
|
@ -233,7 +233,7 @@ static void reassembleAvcFrame(int frameNumber) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void queueFragment(char *data, int offset, int length) {
|
static void queueFragment(char*data, int offset, int length) {
|
||||||
PLENTRY entry = (PLENTRY)malloc(sizeof(*entry) + length);
|
PLENTRY entry = (PLENTRY)malloc(sizeof(*entry) + length);
|
||||||
if (entry != NULL) {
|
if (entry != NULL) {
|
||||||
entry->next = NULL;
|
entry->next = NULL;
|
||||||
|
@ -38,7 +38,7 @@ void destroyVideoStream(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UDP Ping proc
|
// UDP Ping proc
|
||||||
static void UdpPingThreadProc(void *context) {
|
static void UdpPingThreadProc(void* context) {
|
||||||
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
||||||
struct sockaddr_in6 saddr;
|
struct sockaddr_in6 saddr;
|
||||||
SOCK_RET err;
|
SOCK_RET err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user