Add log messages to troubleshoot problems with missing video/audio

This commit is contained in:
Cameron Gutman 2020-04-29 20:17:55 -07:00
parent fcabfc37ad
commit 9ffdc79b6f
2 changed files with 20 additions and 6 deletions

View File

@ -180,9 +180,12 @@ static void ReceiveThreadProc(void* context) {
continue;
}
// We've received data, so we can stop sending our ping packets
// as quickly, since we're now just keeping the NAT session open.
receivedDataFromPeer = 1;
if (!receivedDataFromPeer) {
// We've received data, so we can stop sending our ping packets
// 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,
// so we will drop the first 100 packets to avoid accumulating latency
@ -261,6 +264,10 @@ static void DecoderThreadProc(void* context) {
}
void stopAudioStream(void) {
if (!receivedDataFromPeer) {
Limelog("No audio traffic was ever received from the host!\n");
}
AudioCallbacks.stop();
PltInterruptThread(&udpPingThread);

View File

@ -112,9 +112,12 @@ static void ReceiveThreadProc(void* context) {
continue;
}
// We've received data, so we can stop sending our ping packets
// as quickly, since we're now just keeping the NAT session open.
receivedDataFromPeer = 1;
if (!receivedDataFromPeer) {
// We've received data, so we can stop sending our ping packets
// 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
packet = (PRTP_PACKET)&buffer[0];
@ -162,6 +165,10 @@ int readFirstFrame(void) {
// Terminate the video stream
void stopVideoStream(void) {
if (!receivedDataFromPeer) {
Limelog("No video traffic was ever received from the host!\n");
}
VideoCallbacks.stop();
// Wake up client code that may be waiting on the decode unit queue