diff --git a/src/AudioStream.c b/src/AudioStream.c index 2152544..2042898 100644 --- a/src/AudioStream.c +++ b/src/AudioStream.c @@ -163,7 +163,7 @@ static void decodeInputData(PQUEUED_AUDIO_PACKET packet) { PRTP_PACKET rtp = (PRTP_PACKET)&packet->data[0]; if (lastSeq != 0 && (unsigned short)(lastSeq + 1) != rtp->sequenceNumber) { - Limelog("Received OOS audio data (expected %d, but got %d)\n", lastSeq + 1, rtp->sequenceNumber); + Limelog("Network dropped audio data (expected %d, but received %d)\n", lastSeq + 1, rtp->sequenceNumber); } lastSeq = rtp->sequenceNumber; diff --git a/src/RtpAudioQueue.c b/src/RtpAudioQueue.c index 31fae36..67e3a1b 100644 --- a/src/RtpAudioQueue.c +++ b/src/RtpAudioQueue.c @@ -12,6 +12,7 @@ // trigger the call to completeFecBlock(). Missing or OOO // packets will do the job. #define FEC_VALIDATION_MODE +#define FEC_VERBOSE #endif void RtpaInitializeQueue(PRTP_AUDIO_QUEUE queue) { @@ -163,6 +164,7 @@ static PRTPA_FEC_BLOCK getFecBlockForRtpPacket(PRTP_AUDIO_QUEUE queue, PRTP_PACK blockSize = length - sizeof(RTP_PACKET) - sizeof(AUDIO_FEC_HEADER); } else { + Limelog("Invalid RTP audio payload type: %u\n", packet->packetType); LC_ASSERT(false); return NULL; } @@ -334,6 +336,14 @@ static bool completeFecBlock(PRTP_AUDIO_QUEUE queue, PRTPA_FEC_BLOCK block) { } } +#ifdef FEC_VERBOSE + if (block->dataShardsReceived != RTPA_DATA_SHARDS) { + Limelog("Recovered %d audio data shards from block %d\n", + RTPA_DATA_SHARDS - block->dataShardsReceived, + block->fecHeader.baseSequenceNumber); + } +#endif + #ifdef FEC_VALIDATION_MODE // Check the RTP header values LC_ASSERT(block->dataPackets[dropIndex]->header == droppedRtpPacket->header); diff --git a/src/RtpVideoQueue.c b/src/RtpVideoQueue.c index 80f7eae..96c16ce 100644 --- a/src/RtpVideoQueue.c +++ b/src/RtpVideoQueue.c @@ -6,6 +6,7 @@ // and recovered packet checks vs the original input. It // is on by default for debug builds. #define FEC_VALIDATION_MODE +#define FEC_VERBOSE #endif void RtpvInitializeQueue(PRTP_VIDEO_QUEUE queue) { @@ -236,6 +237,14 @@ static int reconstructFrame(PRTP_VIDEO_QUEUE queue) { // If this fails, something is probably wrong with our FEC state. LC_ASSERT(ret == 0); +#ifdef FEC_VERBOSE + if (queue->bufferDataPackets != queue->receivedBufferDataPackets) { + Limelog("Recovered %d video data shards from frame %d\n", + queue->bufferDataPackets - queue->receivedBufferDataPackets, + queue->currentFrameNumber); + } +#endif + cleanup_packets: for (i = 0; i < totalPackets; i++) { if (marks[i]) {