Add support for Generation 5 servers (GFE 2.10.2+)

This commit is contained in:
Iwan Timmer
2016-02-19 17:20:56 +01:00
parent 40478fc19b
commit fd247151ce
6 changed files with 138 additions and 49 deletions

View File

@@ -231,7 +231,7 @@ static void reassembleAvcFrame(int frameNumber) {
}
// Notify the control connection
connectionReceivedFrame(frameNumber);
connectionReceivedCompleteFrame(frameNumber);
// Clear frame drops
consecutiveFrameDrops = 0;
@@ -392,6 +392,9 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
return;
}
// Notify the listener of the latest frame we've seen from the PC
connectionSawFrame(frameIndex);
// Look for a frame start before receiving a frame end
if (firstPacket && decodingFrame)
{
@@ -469,6 +472,12 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
}
lastPacketInStream = streamPacketIndex;
// If this is the first packet, skip the frame header (if one exists)
if (firstPacket && ServerMajorVersion >= 5) {
currentPos.offset += 8;
currentPos.length -= 8;
}
if (firstPacket &&
getSpecialSeq(&currentPos, &specialSeq) &&
isSeqFrameStart(&specialSeq) &&
@@ -519,4 +528,4 @@ void queueRtpPacket(PRTP_PACKET rtpPacket, int length) {
}
processRtpPayload((PNV_VIDEO_PACKET)(((char*)rtpPacket) + dataOffset), length - dataOffset);
}
}