MCPcopy Create free account
hub / github.com/Haivision/srt / checkFirstReadableOutOfOrder

Method checkFirstReadableOutOfOrder

srtcore/buffer_rcv.cpp:919–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919bool CRcvBuffer::checkFirstReadableOutOfOrder()
920{
921 if (m_numOutOfOrderPackets <= 0 || m_iFirstReadableOutOfOrder < 0 || m_iMaxPosOff == 0)
922 return false;
923
924 const int endPos = incPos(m_iStartPos, m_iMaxPosOff);
925 int msgno = -1;
926 for (int pos = m_iFirstReadableOutOfOrder; pos != endPos; pos = incPos(pos))
927 {
928 if (!m_entries[pos].pUnit)
929 return false;
930
931 const CPacket& pkt = packetAt(pos);
932 if (pkt.getMsgOrderFlag())
933 return false;
934
935 if (msgno == -1)
936 msgno = pkt.getMsgSeq(m_bPeerRexmitFlag);
937 else if (msgno != pkt.getMsgSeq(m_bPeerRexmitFlag))
938 return false;
939
940 if (pkt.getMsgBoundary() & PB_LAST)
941 return true;
942 }
943
944 return false;
945}
946
947void CRcvBuffer::updateFirstReadableOutOfOrder()
948{

Callers

nothing calls this directly

Calls 3

getMsgOrderFlagMethod · 0.80
getMsgBoundaryMethod · 0.80
getMsgSeqMethod · 0.45

Tested by

no test coverage detected