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

Method getFirstValidPacketInfo

srtcore/buffer_rcv.cpp:677–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677CRcvBuffer::PacketInfo CRcvBuffer::getFirstValidPacketInfo() const
678{
679 const int end_pos = incPos(m_iStartPos, m_iMaxPosOff);
680 for (int i = m_iStartPos; i != end_pos; i = incPos(i))
681 {
682 // TODO: Maybe check status?
683 if (!m_entries[i].pUnit)
684 continue;
685
686 const CPacket& packet = packetAt(i);
687 const PacketInfo info = { packet.getSeqNo(), i != m_iStartPos, getPktTsbPdTime(packet.getMsgTimeStamp()) };
688 return info;
689 }
690
691 const PacketInfo info = { -1, false, time_point() };
692 return info;
693}
694
695std::pair<int, int> CRcvBuffer::getAvailablePacketsRange() const
696{

Callers 3

tsbpdMethod · 0.80
recv_WaitForReadReadyMethod · 0.80
TEST_FFunction · 0.80

Calls 2

getSeqNoMethod · 0.80
getMsgTimeStampMethod · 0.80

Tested by 1

TEST_FFunction · 0.64