mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-05-18 23:50:19 +00:00
Add gitignore
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
limelight-common/ARM/
|
||||||
|
limelight-common/Debug/
|
||||||
@@ -17,6 +17,7 @@ static PLT_THREAD decoderThread;
|
|||||||
|
|
||||||
#define RTP_PORT 48000
|
#define RTP_PORT 48000
|
||||||
|
|
||||||
|
/* Initialize the audio stream */
|
||||||
void initializeAudioStream(IP_ADDRESS host, PAUDIO_RENDERER_CALLBACKS arCallbacks, PCONNECTION_LISTENER_CALLBACKS clCallbacks) {
|
void initializeAudioStream(IP_ADDRESS host, PAUDIO_RENDERER_CALLBACKS arCallbacks, PCONNECTION_LISTENER_CALLBACKS clCallbacks) {
|
||||||
memcpy(&callbacks, arCallbacks, sizeof(callbacks));
|
memcpy(&callbacks, arCallbacks, sizeof(callbacks));
|
||||||
remoteHost = host;
|
remoteHost = host;
|
||||||
@@ -25,6 +26,7 @@ void initializeAudioStream(IP_ADDRESS host, PAUDIO_RENDERER_CALLBACKS arCallback
|
|||||||
LbqInitializeLinkedBlockingQueue(&packetQueue, 30);
|
LbqInitializeLinkedBlockingQueue(&packetQueue, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tear down the audio stream once we're done with it */
|
||||||
void destroyAudioStream(void) {
|
void destroyAudioStream(void) {
|
||||||
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
||||||
|
|
||||||
@@ -41,6 +43,7 @@ void destroyAudioStream(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void UdpPingThreadProc(void *context) {
|
static void UdpPingThreadProc(void *context) {
|
||||||
|
/* Ping in ASCII */
|
||||||
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
||||||
struct sockaddr_in saddr;
|
struct sockaddr_in saddr;
|
||||||
int err;
|
int err;
|
||||||
@@ -50,6 +53,7 @@ static void UdpPingThreadProc(void *context) {
|
|||||||
saddr.sin_port = htons(RTP_PORT);
|
saddr.sin_port = htons(RTP_PORT);
|
||||||
memcpy(&saddr.sin_addr, &remoteHost, sizeof(remoteHost));
|
memcpy(&saddr.sin_addr, &remoteHost, sizeof(remoteHost));
|
||||||
|
|
||||||
|
/* Send PING every 100 milliseconds */
|
||||||
while (!PltIsThreadInterrupted(&udpPingThread)) {
|
while (!PltIsThreadInterrupted(&udpPingThread)) {
|
||||||
err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, sizeof(saddr));
|
err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, sizeof(saddr));
|
||||||
if (err != sizeof(pingData)) {
|
if (err != sizeof(pingData)) {
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
|
|||||||
// Remove extra padding
|
// Remove extra padding
|
||||||
currentPos.length = videoPacket->payloadLength;
|
currentPos.length = videoPacket->payloadLength;
|
||||||
|
|
||||||
if (isFirstPacket) {
|
/*if (isFirstPacket) {
|
||||||
if (getSpecialSeq(¤tPos, &specialSeq) &&
|
if (getSpecialSeq(¤tPos, &specialSeq) &&
|
||||||
isSeqFrameStart(&specialSeq) &&
|
isSeqFrameStart(&specialSeq) &&
|
||||||
specialSeq.data[specialSeq.offset+specialSeq.length] == 0x67) {
|
specialSeq.data[specialSeq.offset+specialSeq.length] == 0x67) {
|
||||||
@@ -360,7 +360,7 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
|
|||||||
processRtpPayloadSlow(videoPacket, ¤tPos);
|
processRtpPayloadSlow(videoPacket, ¤tPos);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
processRtpPayloadFast(videoPacket, currentPos);
|
processRtpPayloadFast(videoPacket, currentPos);
|
||||||
|
|
||||||
@@ -379,7 +379,6 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
|
|||||||
connectionDetectedFrameLoss(startFrameNumber, nextFrameNumber - 1);
|
connectionDetectedFrameLoss(startFrameNumber, nextFrameNumber - 1);
|
||||||
waitingForNextSuccessfulFrame = 0;
|
waitingForNextSuccessfulFrame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
startFrameNumber = nextFrameNumber;
|
startFrameNumber = nextFrameNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user