mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Add log messages to troubleshoot problems with missing video/audio
This commit is contained in:
+10
-3
@@ -180,9 +180,12 @@ static void ReceiveThreadProc(void* context) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We've received data, so we can stop sending our ping packets
|
if (!receivedDataFromPeer) {
|
||||||
// as quickly, since we're now just keeping the NAT session open.
|
// We've received data, so we can stop sending our ping packets
|
||||||
receivedDataFromPeer = 1;
|
// as quickly, since we're now just keeping the NAT session open.
|
||||||
|
receivedDataFromPeer = 1;
|
||||||
|
Limelog("Received first audio packet\n");
|
||||||
|
}
|
||||||
|
|
||||||
// GFE accumulates audio samples before we are ready to receive them,
|
// GFE accumulates audio samples before we are ready to receive them,
|
||||||
// so we will drop the first 100 packets to avoid accumulating latency
|
// so we will drop the first 100 packets to avoid accumulating latency
|
||||||
@@ -261,6 +264,10 @@ static void DecoderThreadProc(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stopAudioStream(void) {
|
void stopAudioStream(void) {
|
||||||
|
if (!receivedDataFromPeer) {
|
||||||
|
Limelog("No audio traffic was ever received from the host!\n");
|
||||||
|
}
|
||||||
|
|
||||||
AudioCallbacks.stop();
|
AudioCallbacks.stop();
|
||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
|
|||||||
+10
-3
@@ -112,9 +112,12 @@ static void ReceiveThreadProc(void* context) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We've received data, so we can stop sending our ping packets
|
if (!receivedDataFromPeer) {
|
||||||
// as quickly, since we're now just keeping the NAT session open.
|
// We've received data, so we can stop sending our ping packets
|
||||||
receivedDataFromPeer = 1;
|
// as quickly, since we're now just keeping the NAT session open.
|
||||||
|
receivedDataFromPeer = 1;
|
||||||
|
Limelog("Received first video packet\n");
|
||||||
|
}
|
||||||
|
|
||||||
// Convert fields to host byte-order
|
// Convert fields to host byte-order
|
||||||
packet = (PRTP_PACKET)&buffer[0];
|
packet = (PRTP_PACKET)&buffer[0];
|
||||||
@@ -162,6 +165,10 @@ int readFirstFrame(void) {
|
|||||||
|
|
||||||
// Terminate the video stream
|
// Terminate the video stream
|
||||||
void stopVideoStream(void) {
|
void stopVideoStream(void) {
|
||||||
|
if (!receivedDataFromPeer) {
|
||||||
|
Limelog("No video traffic was ever received from the host!\n");
|
||||||
|
}
|
||||||
|
|
||||||
VideoCallbacks.stop();
|
VideoCallbacks.stop();
|
||||||
|
|
||||||
// Wake up client code that may be waiting on the decode unit queue
|
// Wake up client code that may be waiting on the decode unit queue
|
||||||
|
|||||||
Reference in New Issue
Block a user