Improve debugging for A/V data loss and recovery

This commit is contained in:
Cameron Gutman
2021-06-08 20:01:58 -05:00
parent 5a71a4c092
commit 2228e4812d
3 changed files with 20 additions and 1 deletions

View File

@@ -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]) {