Report frames to the control stream code before FEC reconstruction
This commit is contained in:
parent
cca2ba9aab
commit
97ca7b099f
3 changed files with 7 additions and 4 deletions
|
|
@ -282,6 +282,8 @@ void connectionReceivedCompleteFrame(int frameIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void connectionSawFrame(int frameIndex) {
|
void connectionSawFrame(int frameIndex) {
|
||||||
|
LC_ASSERT(!isBefore16(frameIndex, lastSeenFrame));
|
||||||
|
|
||||||
uint64_t now = PltGetMillis();
|
uint64_t now = PltGetMillis();
|
||||||
if (now - intervalStartTimeMs >= CONN_STATUS_SAMPLE_PERIOD) {
|
if (now - intervalStartTimeMs >= CONN_STATUS_SAMPLE_PERIOD) {
|
||||||
if (intervalTotalFrameCount != 0) {
|
if (intervalTotalFrameCount != 0) {
|
||||||
|
|
|
||||||
|
|
@ -434,6 +434,10 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, int length, PRTPFEC_
|
||||||
|
|
||||||
queue->currentFrameNumber = nvPacket->frameIndex;
|
queue->currentFrameNumber = nvPacket->frameIndex;
|
||||||
|
|
||||||
|
// Tell the control stream logic about this frame, even if we don't end up
|
||||||
|
// being able to reconstruct a full frame from it.
|
||||||
|
connectionSawFrame(queue->currentFrameNumber);
|
||||||
|
|
||||||
// Discard any unsubmitted buffers from the previous frame
|
// Discard any unsubmitted buffers from the previous frame
|
||||||
while (queue->bufferHead != NULL) {
|
while (queue->bufferHead != NULL) {
|
||||||
PRTPFEC_QUEUE_ENTRY entry = queue->bufferHead;
|
PRTPFEC_QUEUE_ENTRY entry = queue->bufferHead;
|
||||||
|
|
|
||||||
|
|
@ -531,9 +531,6 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify the listener of the latest frame we've seen from the PC
|
|
||||||
connectionSawFrame(frameIndex);
|
|
||||||
|
|
||||||
// Verify that we didn't receive an incomplete frame
|
// Verify that we didn't receive an incomplete frame
|
||||||
LC_ASSERT(firstPacket ^ decodingFrame);
|
LC_ASSERT(firstPacket ^ decodingFrame);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue