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

Method countBytes

srtcore/buffer_rcv.cpp:769–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769void CRcvBuffer::countBytes(int pkts, int bytes)
770{
771 ScopedLock lock(m_BytesCountLock);
772 m_iBytesCount += bytes; // added or removed bytes from rcv buffer
773 m_iPktsCount += pkts;
774 if (bytes > 0) // Assuming one pkt when adding bytes
775 {
776 if (!m_uAvgPayloadSz)
777 m_uAvgPayloadSz = bytes;
778 else
779 m_uAvgPayloadSz = avg_iir<100>(m_uAvgPayloadSz, (unsigned) bytes);
780 }
781}
782
783void CRcvBuffer::releaseUnitInPos(int pos)
784{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected