mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Rename APIs
This commit is contained in:
parent
99496ed24c
commit
d1485c40e4
3 changed files with 9 additions and 9 deletions
|
@ -33,8 +33,8 @@ using namespace std;
|
|||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_kernel_flv.hpp>
|
||||
|
||||
//sn comparison,if current_sn is more than last_sn,return true,else return false
|
||||
bool SnCompare(uint16_t current_sn, uint16_t last_sn) {
|
||||
//sn comparison,if current_sn is more(newer) than last_sn,return true,else return false
|
||||
bool SrsSeqIsNewer(uint16_t current_sn, uint16_t last_sn) {
|
||||
if(current_sn > last_sn) {
|
||||
//current_sn 65533 last_sn 5
|
||||
if(current_sn - last_sn > 0x8000) {
|
||||
|
@ -52,9 +52,9 @@ bool SnCompare(uint16_t current_sn, uint16_t last_sn) {
|
|||
}
|
||||
}
|
||||
|
||||
bool SnRollback(uint16_t current_sn, uint16_t last_sn)
|
||||
bool SrsSeqIsRoolback(uint16_t current_sn, uint16_t last_sn)
|
||||
{
|
||||
if(SnCompare(current_sn, last_sn)) {
|
||||
if(SrsSeqIsNewer(current_sn, last_sn)) {
|
||||
if((last_sn > current_sn)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ bool SnRollback(uint16_t current_sn, uint16_t last_sn)
|
|||
}
|
||||
|
||||
// caculate the difference between sn. If current_sn is more then last_sn, return positive difference, else return negative difference.
|
||||
int32_t SnDiff(uint16_t current_sn, uint16_t last_sn) {
|
||||
int32_t SrsSeqDistance(uint16_t current_sn, uint16_t last_sn) {
|
||||
if(current_sn > last_sn) {
|
||||
//current_sn 65535 last_sn 0
|
||||
if(current_sn - last_sn > 0x8000) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue