GetExpectedPackets

13 views
Skip to first unread message

Bepartofyou

unread,
Jul 2, 2019, 2:41:43 AM7/2/19
to mediasoup

inline uint32_t RtpStream::GetExpectedPackets() const

{

return (this->cycles + this->maxSeq) - this->baseSeq + 1;

}


        or


inline uint32_t RtpStream::GetExpectedPackets() const

{

return (this->cycles * 65535 + this->maxSeq) - this->baseSeq + 1;

}


        ?


Iñaki Baz Castillo

unread,
Jul 2, 2019, 5:47:54 AM7/2/19
to medi...@googlegroups.com
AFAIS it's ok as it is.

this->cycles is not 0, then 1, then 2 but 65536, 131072, 196608. Note
that this->cycles is written in RtpStream.cpp as follows:

// In order, with permissible gap.
if (seq < this->maxSeq)
{
// Sequence number wrapped: count another 64K cycle.
this->cycles += RtpSeqMod;
}

where:

static constexpr uint32_t RtpSeqMod{ 1 << 16 };


--
Iñaki Baz Castillo
<i...@aliax.net>

José Luis Millán

unread,
Jul 2, 2019, 5:49:17 AM7/2/19
to medi...@googlegroups.com
Correct, it's already OK as it is.
 


--
Iñaki Baz Castillo
<i...@aliax.net>

--
mediasoup
Cutting Edge WebRTC Video Conferencing

https://mediasoup.org

NOTE: This group is deprecated. Use the mediasoup Discourse Group instead:

https://mediasoup.discourse.group
---
You received this message because you are subscribed to the Google Groups "mediasoup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mediasoup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mediasoup/CALiegfnBYMRiKkE7RKP8Q01wSjgV%2BET9shNFqT3icwCUfJPDRg%40mail.gmail.com.


--
José Luis Millán

Bepartofyou

unread,
Jul 2, 2019, 5:57:33 AM7/2/19
to mediasoup
Yes, it's ok.  Sorry for not see the realization, I thought it as 0,1,2

在 2019年7月2日星期二 UTC+8下午5:47:54,Iñaki Baz Castillo写道:

Iñaki Baz Castillo

unread,
Jul 2, 2019, 6:06:47 AM7/2/19
to medi...@googlegroups.com
It was a good observation anyway, so thanks :)

--
mediasoup
Cutting Edge WebRTC Video Conferencing
 
https://mediasoup.org
 
NOTE: This group is deprecated. Use the mediasoup Discourse Group instead:
 
https://mediasoup.discourse.group
---
You received this message because you are subscribed to the Google Groups "mediasoup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mediasoup+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages