Commit Graph

148 Commits

Author SHA1 Message Date
boks1971 aa85174993 Merge remote-tracking branch 'origin/master' into raja_fr 2024-03-21 15:37:13 +05:30
Raja Subramanian 3e43f75143 Forward publisher sender report. (#2572)
* Forward publisher sender report.

Publisher side RTCP sernfer report is rebased to SFU time base
and used to send sender rerport to subscriber.

Will wait to merge till previous versions are out as this will require a
bunch of testing.

* - Add rebased report drift
- update protocol dep
- fix path change check, it has to check against delta of propagation
  delay and not propagation delay as the two side clocks could be way
  off.
2024-03-13 14:31:39 +05:30
Raja Subramanian d40041d013 Use the correct snapshot id for PPS. (#2528)
* Use the correct snapshot id for PPS.

That caused connection quality to operate on small windows.

* remove debug
2024-02-29 22:48:36 +05:30
cnderrauber a435368278 use dynamic bucket size (#2524) 2024-02-28 16:24:23 +08:00
David Colburn 098b12981f fix pli throttle locking (#2521)
* fix pli throttle locking

* UpdatePliAndTime still used in cloud
2024-02-27 20:22:38 -08:00
boks1971 19cae0e6ad Merge remote-tracking branch 'origin/master' into raja_fr 2024-02-20 09:33:14 +05:30
Raja Subramanian f7b6e915cb Fix return on dropping a padding packet. (#2479)
Had deleted an extra line while cleaning up.
2024-02-13 14:24:31 +05:30
Raja Subramanian 0bcd9a2f8b Remove some noisy logs (#2477) 2024-02-13 12:01:20 +05:30
Raja Subramanian 89a312d259 Ignore duplicate RID. (#2471)
Firefox on Windows 10 seems to be producing simulcast tracks with
duplicate RID. That causes a leak as only one buffer is processed.

Ignore duplicate rid.

NOTE: This is not perfect as the actual layer -> rid is indeterminable
at addition time. It would require looking at packets to determine the
video dimensions and match to rid/layer to figure out which one is
correct and which one is duplicate.

To simplify though, taking the first one and dropping later ones.
This could mean the correct resolution is not streamed, but that should
be okay. The leak is far more destructive.
2024-02-12 11:49:14 +05:30
cnderrauber af0a8fbbbc add log for extpacket accumulated (#2454) 2024-02-06 21:38:36 +08:00
cnderrauber be87a1b6f0 Support rtx for publisher (#2452)
* Support rtx for publisher

* remote log

* solve comment
2024-02-06 21:30:37 +08:00
Raja Subramanian b7147efb87 Close published tracks on participant close (#2446) 2024-02-05 13:41:41 +05:30
boks1971 962138e32c Merge remote-tracking branch 'origin/master' into raja_fr 2024-02-02 12:33:37 +05:30
Raja Subramanian 174e69c81d Restore min score to 30. (#2435)
Was at 20 when LOST was introduced, but was going to 20 even when under
not LOST conditions. When there are packets, want the min to be at 30.
Going down to 20 resulted in reporting LOST quality even when packets
were flowing (although they were experiencing heavy loss and quality
would have been very bad, yet they are not lost).

Also, sample warning about adding packet to bucket even more.
2024-02-02 08:52:52 +05:30
Raja Subramanian ff69c2aa11 Add debug to understand VP9 freezes. (#2434)
* Add debug to understand VP9 freezes.

Have reports of VP9 freezing in some rooms.
Some data indicates that NACKs are received by SFU, but cannot get RTP
packet when that happens. It is possible that the NACKs are all from
dropped packets. Adding some debug to understand drops/NACKs better.

* enable DD debug

* comment out DD debug

* markers

* add back log about diff length mismatch

* add back key frame mismatch logging

* log skipped drops also
2024-01-31 15:33:39 +05:30
cnderrauber e1cc9d6b3c Fix log marshal error (#2295) 2023-12-06 00:08:48 +08:00
David Zhao 3fe124c87f Log cleanup pass (#2285)
* Log cleanup pass

Demoted a bunch of logs to DEBUG, consolidated logs.

* use context logger and fix context var usage

* moved common error types, fixed tests
2023-12-02 15:07:31 -08:00
boks1971 b58ecf6bd4 Merge remote-tracking branch 'origin/master' into raja_fr 2023-11-08 15:51:40 +05:30
Raja Subramanian 440f00bcac Declare audio inactive if stale. (#2229)
* Declare audio inactive if stale.

Stale samples were used to declare audio active.
Maintain last update time and declare inactive if samples are stale.

* correct comment

* spelling

* check level in test
2023-11-08 11:13:39 +05:30
cnderrauber f247b68ed6 Make sure dd selector uses correct keyframe to select packets (#2218)
* Make sure dd selector uses correct keyframe to select packets

* Fix test case

* remove unsed field
2023-11-03 17:49:02 +08:00
Raja Subramanian 0bdfdb0c49 Squelching DD reader error. (#2215)
Squelching Structure is nil error as it can happen on packets
received before a key frame is received.
2023-11-02 11:10:28 +05:30
boks1971 2742b4b7f0 Merge remote-tracking branch 'origin/master' into raja_fr 2023-11-01 16:09:18 +05:30
cnderrauber 1f0ba21854 Fix svc: Drop frame is earlier than current keyframe (#2196)
* Fix svc: Drop frame is earlier than current keyframe

* Log detail of dependencydescriptor
2023-10-27 13:57:03 +08:00
boks1971 04f7e0e1b3 Merge remote-tracking branch 'origin/master' into raja_fr 2023-10-18 22:05:50 +05:30
Raja Subramanian 3e4cd3a161 Accept more range for first packet time adjustment. (#2150) 2023-10-17 23:52:14 +05:30
boks1971 dc091badf7 Merge remote-tracking branch 'origin/master' into raja_fr 2023-10-03 23:05:11 +05:30
Raja Subramanian e6e3e2a729 sligtly easier readability (#2121) 2023-10-02 22:47:40 +05:30
Pingos 4f9467040e Bind() function fails when mime == "audio/red" (#2104) 2023-09-26 13:36:54 +08:00
boks1971 087b999448 Merge remote-tracking branch 'origin/master' into raja_fr 2023-09-13 21:25:55 +05:30
Raja Subramanian a55c50f61d Throttle packet errors/warns a bit. (#2068)
* Throttle packet errors/warns a bit.

In very bad network conditions, it is possible that packets
arrive out-of-order, have choppy behaviour.

Use some counters and temper logs.

* slight change in comment
2023-09-13 15:52:10 +05:30
boks1971 8171aedc9d Merge remote-tracking branch 'origin/master' into raja_fr 2023-09-11 08:42:45 +05:30
Raja Subramanian c09d8d0878 Split RTPStats into receiver and sender. (#2055)
* Split RTPStats into receiver and sender.

For receiver, short types are input and need to calculate extended type.

For sender (subscriber), it can operate only in extended type.
This makes the subscriber side a little simpler and should make it more
efficient as it can do simple comparisons in extended type space.

There was also an issue with subscriber using shorter type and
calculating extended type. When subscriber starts after the publisher
has already rolled over in sequence number OR timestamp, when
subsequent publisher side sender reports are used to adjust subscriber
time stamps, they were out of whack. Using extended type on subscriber
does not face that.

* fix test

* extended types from sequencer

* log
2023-09-11 07:33:39 +05:30
boks1971 4df4be8fa7 Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-31 14:32:39 +05:30
Raja Subramanian bc5b4d68af Do NACKs and reports always. (#2022)
* Do NACKs and reports always.

With padding packet drops, it is possible that a lot of packets
go by without RTCP RR.

Do NACKs and RTCP RR always.

* remove local variable
2023-08-31 12:41:25 +05:30
boks1971 c4da8dfd96 Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-31 11:55:35 +05:30
Raja Subramanian 790954bbe9 Use RTCP SR to resync. (#2021)
Remove packet debug code that was added temporarily.
2023-08-31 11:45:42 +05:30
Raja Subramanian 6e3a20ebf4 Temporary packet debug (#2018) 2023-08-31 00:33:00 +05:30
Raja Subramanian da52167cd9 Adjust extended sequence number to account for dropped packets (#2017) 2023-08-30 23:08:53 +05:30
Raja Subramanian 9afb0873ae Do not process packets not processed by RTPStats. (#2015)
Seeing the case of a stream starting with padding packets
on migration. As publisher in that case is always sending packets.
it is possible that the new node gets padding packets at the start.
Processing them in buffer leads to trying to drop that padding packet
and adding an exclusion range. That fails because the extended
sequence number is not available for unprocessed packets.

It is okay to drop them as they will be dropped anyway.
But, they are useful for bandwidth estimation. So, headers are processed
even if the packet is RTPStats unprocessed.
2023-08-30 19:43:24 +05:30
boks1971 30245522bc Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-30 16:49:11 +05:30
Raja Subramanian 126872047d Handle duplicate padding packet in the up stream. (#2012)
* Handle duplicate padding packet in the up stream.

The following sequence would have produce incorrect results
- Sequence number 39 - regular packet - offset = 0
- Sequence number 40 - padding only - drop - offset = 1
- Sequence number 40 - padding only duplicate - was not dropped (this is
  the bug) - apply offet - sequence number becomes 39 and clashes with
  previous packet
- Sequence number 41 - regular packet - apply offset - goes through as 40.
- Sequence number 40 again - does not get dropped - will pass through as 39.

* fix duplicate dropping

* fix tests

* accept repeat last value as padding injection could cause that

* use exclusion ranges

* more UT and more specific errors
2023-08-30 16:46:39 +05:30
boks1971 c78e5ac9d7 Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-27 21:52:13 +05:30
Raja Subramanian a48660fa77 Make extended sequence number 64-bit. (#2003) 2023-08-27 21:26:31 +05:30
Raja Subramanian 3b30f49ad5 Extended type for RTP timestamp. (#2001) 2023-08-27 17:28:44 +05:30
boks1971 9cec13d68c Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-27 11:06:42 +05:30
Raja Subramanian 55d5edcf73 Use range map in RTPMunger. (#2000)
* WIP commit

* Make lastSN 32-bit

* Remove unused TSCycles
2023-08-27 10:49:17 +05:30
boks1971 bf074562a3 Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-25 14:46:04 +05:30
Raja Subramanian 36dadbacb2 Drop padding only packets on publisher side. (#1990)
* Drop padding only packet on publisher side.

* add UT

* update deps

* remove debug

* add fast path short cut

* correct comment

* fix test

* fix for Linux
2023-08-24 09:09:42 +05:30
boks1971 7ba70cdde9 Merge remote-tracking branch 'origin/master' into raja_fr 2023-08-09 18:56:16 +05:30
Raja Subramanian 0e9ec9a21e Ignore lagging layer switches. (#1948) 2023-08-09 17:42:33 +05:30