VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/local/lib/node_modules/mediasoup/doc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/node_modules/mediasoup/doc/Consumer.md
# Consumer


## RTP sequence number handling

------------------------------------------------

INIT:

* rtpLastSeq: 1000
* rtpPreviousBaseSeq: 0
* rtpBaseSeq: 0

------------------------------------------------

packet (SYNC):
* seq: 3000
* rtpPreviousBaseSeq: 1000
* rtpBaseSeq: 3000

out:
* rtpLastSeq: 3000 - 3000 + 1000 + 1 = 1001

------------------------------------------------

packet:
* seq: 3001

out:
* rtpLastSeq: 3001 - 3000 + 1000 + 1 = 1002

------------------------------------------------

packet:
* seq: 3003

out:
* rtpLastSeq: 3003 - 3000 + 1000 + 1 = 1004

------------------------------------------------

packet (SYNC):
* seq: 4050
- rtpPreviousBaseSeq: 1004
- rtpBaseSeq: 4050

out:
* rtpLastSeq: 4050 - 4050 + 1004 + 1 = 1005

------------------------------------------------

packet:
* seq: 4051

out:
* rtpLastSeq: 4051 - 4050 + 1004 + 1 = 1006

------------------------------------------------

packet (DROP):
* seq: 4052

if (seq > rtpLastSeq)
* rtpBaseSeq++: 4051

------------------------------------------------

packet:
* seq: 4053

out:
* rtpLastSeq: 4053 - 4051 + 1004 + 1 = 1007

------------------------------------------------

probation packet:
* rtpLastSeq++ = 1008

out:
* rtpLastSeq: 1008
* rtpBaseSeq--: 4050

NOTE: probation packets should just be sent (assuming same RTP timestamp) **after** a video packet with `marker` bit set to 1.

------------------------------------------------

packet:
* seq: 4054

out:
* rtpLastSeq: 4054 - 4050 + 1004 + 1 = 1009


VaKeR 2022