Commit Graph
2142 Commits
Author SHA1 Message Date
boks1971 ad3daf97e1 Merge remote-tracking branch 'origin' into raja_1833 2023-09-19 19:59:43 +05:30
Raja SubramanianandGitHub d0bfb349aa Set packet time for padding packets (#2091) 2023-09-19 19:54:54 +05:30
boks1971 ae60d7456c Merge remote-tracking branch 'origin' into raja_1833 2023-09-19 15:37:32 +05:30
cnderrauberandGitHub e46da0705a Add max playout delay config (#2089)
* Add max playout delay

* config sample
2023-09-19 11:30:38 +08:00
David ColburnandGitHub 8a0d417a8c Participant egress (#2070)
* participant egress

* remove hasPublished when participant leaves room
2023-09-18 12:47:57 -07:00
Raja SubramanianandGitHub dd2427bf05 Stop writing packets in sysnthesize on track close. (#2086) 2023-09-18 22:25:48 +05:30
boks1971 a1d8b557fc Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-18 18:46:48 +05:30
Raja SubramanianandGitHub e0d98eebb6 Do stats update in line. (#2085) 2023-09-18 18:42:39 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ffc8aaef91 Update pion deps (#1975)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-18 12:00:33 +05:30
boks1971 510af76c0d Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-18 10:19:41 +05:30
Raja SubramanianandGitHub ca2f8fedab Fix out-of-range access. (#2082)
Happens when converting quality in subscibed settings to layer.
Looks like it can happen only if the provided quality is OFF.
Don't know of any client that does that. Anyhow, prevent out-of-range
access which causea a panic.
2023-09-18 10:03:22 +05:30
boks1971 057908abbf Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-18 09:36:05 +05:30
David ZhaoandGitHub 0b0431b765 Per-session TURN credentials (#2080)
Switching to using session specific TURN credentials instead of shared
credentials per Room. Also eliminates need to load Room from Redis
during TURN authentication
2023-09-17 10:08:35 -07:00
Raja SubramanianandGitHub 019ad88b08 Do not force reconnect on resume if there is a pending track (#2081)
* Do not force reconnect on resume if there is a pending track

* move GetPendingTrack -> LocalParticipant
2023-09-17 14:00:09 +05:30
Raja SubramanianandGitHub 97048a923c Reducing rtp stats memory consumption - part 2 (#2078)
* WIP commit

* move a struct to sender only

* Snapshot intervals

* make receiver history 4K too
2023-09-16 18:54:18 +05:30
David ZhaoandGitHub 340906267f Reduce ghost participant disconnect timeout (#2077)
It's been reported that "ghost" participants, those that did not terminate
cleanly, hang around the room for too long after they disappear.

Evaluating our timeouts a bit, it seems that we are really conservative
in waiting for participants to disconnect. This PR cuts down the disconnect
timeout from 50s to 20s, a 30s reduction.
2023-09-16 00:15:04 -07:00
Raja SubramanianandGitHub f29887dcd0 Use bit map. (#2075)
* Use bit map.

Also, duplicate packet detection is impoetant for dropping padding
only packets at the publisher side itself. In the last PR, mentioned
that it is only for stats.

* clean up

* Update deps
2023-09-16 02:03:50 +05:30
Raja SubramanianandGitHub 9c2ad54146 Clean up debug logs (#2076) 2023-09-16 01:57:34 +05:30
David ZhaoandGitHub 2113557842 Skip SendDataPacket logging on transport failure (#2074)
That's a sign of peer connection failure, we do not need to log these
2023-09-15 12:55:54 -07:00
Raja SubramanianandGitHub 044f6cec40 Reduce packet meta data cache - part 1 (#2073)
* Reduce packet meta data cache - part 1

Packet meta data cache takes a good amount of space.
That cache is 8K entries deep and each entry is 8 bytes.
So, that takes 64KB per RTP stream.

It is mostly needed for down stream to line up with receiver reports.

So, removing cache from up stream (RTPStatsReceiver) as part 1.
Will look at optimising the down stream in part 2.

* Remove caching from RTPStatsReceiver

* clean up a bit more

* maintain history and fix test
2023-09-15 21:39:03 +05:30
boks1971 dee6c161f8 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-15 13:14:56 +05:30
Raja SubramanianandGitHub 7ac0abdf1b Decrement value when end is in open range. (#2072)
* Decrement value when end is in open range.

Not an error when end is in open range.

* change API call
2023-09-14 14:31:39 +05:30
Raja SubramanianandGitHub 69177b8b6e Debug logs to check on sequencer missing offset. (#2071)
* Debug logs to check on sequencer missing offset.

* spelling

* close range on value decrement
2023-09-14 12:20:33 +05:30
boks1971 c5ba99f335 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-13 21:23:52 +05:30
Raja SubramanianandGitHub 68aebb0106 Do not mute when stream is paused. (#2069) 2023-09-13 19:59:24 +05:30
Raja SubramanianandGitHub 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
Raja SubramanianandGitHub 3f9f3adf91 Fix init. (#2067)
Stupid me.
2023-09-13 12:53:16 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1a21dcb4f2 Update github workflows (#2062)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-12 21:51:42 -07:00
Raja SubramanianandGitHub 2cf751d261 Use timer in scorer lock scope. (#2066)
Using time from outside make anachronous samples in expected
distance/bit rate measurement. So, have to let the time be
snap shotted in scorer lock scope.
2023-09-13 01:38:34 +05:30
Raja SubramanianandGitHub 5f701ece34 Include top bits from start in highest sequence number from RR. (#2064)
Streaming could start after 16-bits has rolled over. So, have to add
that base back to what is received in receiver report.

Otherwise, it looks like there are not packets received in window
leading to poor quality.
2023-09-12 14:36:25 +05:30
Raja SubramanianandGitHub 254a35543d Fix down stream stats. (#2063)
Need to pass in the correct time. Previously streaming start was
determined by another delta snap shot which as removed for efficiency.
Did not realise that we were passing in zero time for stats.

Also, revert of the change (the part which did not re-pause) from this
PR (https://github.com/livekit/livekit/pull/2037). That change affects
other paths. The edge it was trying to fix is more rare. Need to think
about a way which covers all cases.
2023-09-12 08:34:28 +05:30
Raja SubramanianandGitHub 463c62b99a Update deps (#2061) 2023-09-11 22:16:02 +05:30
Raja SubramanianandGitHub f333ce05ed fix start (#2060) 2023-09-11 20:59:47 +05:30
cnderrauberandGitHub 696798279e Check destination identites of data message if sid is empty (#2058) 2023-09-11 14:42:48 +08:00
Raja SubramanianandGitHub be4ea44425 Log ClientInfo on participant close. (#2057)
Want to check client distribution for negotiation failed induced closes.
2023-09-11 10:29:09 +05:30
boks1971 e8e444fd64 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-11 08:42:20 +05:30
Raja SubramanianandGitHub 1b20b8f1ac Make interface for connection stats. (#2056)
* Make interface for connection stats.

Implement suggestion from @paulwe to clean that up a bit.

* fix test
2023-09-11 08:39:33 +05:30
Raja SubramanianandGitHub 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
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
820730a385 Update magefile/mage-action action to v3 (#2054)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-10 14:44:59 -07:00
Raja SubramanianandGitHub b5f2f83278 Fix time stamp adjustment when starting with dummy packets. (#2053)
* Fix time stamp adjustment when starting with dmummy packets.

- Populated extended values in ExtPacket on dummy packet.
- Have to pass reference time stamp offset to first packet time
  adjustment.

* display participant version info
2023-09-09 17:33:26 +05:30
Raja SubramanianandGitHub d24f409354 Simplify SN cache a bit. (#2052) 2023-09-09 13:00:59 +05:30
David ZhaoandGitHub f351f9b2ed Allow RoomService.SendData to use participant identities (#2051)
* Allow RoomService.SendData to use participant identities

* update protocol

* update webrtc to 3.2.19
2023-09-08 16:22:56 -07:00
boks1971 a94be216e4 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-08 23:49:31 +05:30
Raja SubramanianandGitHub 492eb3bf18 Sequencer small optimisations (#2049)
* Sequencer small optimisations

1. Use range map to exclude padding only packets. Should take lesser
   space as we are not using slice to hold pointer to actual data.
2. Avoid `time.Now()` when adding each packet. Just use the arrival time
   as it should be close enough. `time.Now()` was showing up in
   profile.

* remove debug

* correct comment
2023-09-08 23:48:54 +05:30
boks1971 74246e7466 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-08 21:16:12 +05:30
Raja SubramanianandGitHub 83353d821c Make a config option to skip unmanaged tracks in bandwidth estimation (#2050)
* WIP commit

* Make a config option to skip unmanaged tracks in bandwidth estimation
2023-09-08 20:59:58 +05:30
boks1971 49e2aeb750 Merge remote-tracking branch 'origin/master' into raja_1833 2023-09-07 22:24:13 +05:30
Raja SubramanianandGitHub b95670f56b Removing one snapshot in down track. (#2047)
Profiling showed updating jitter going through the snapshot maps.
With the reduction of one, there should only be one snapshot
and hopefully that should gain some cycles back.
2023-09-07 22:22:00 +05:30
Raja SubramanianandGitHub 3babb432c6 Missed an SN offset update in the previous round (#2044) 2023-09-07 15:58:42 +05:30
Raja SubramanianandGitHub 6c94719487 Cache extended highest. (#2043)
* Cache extended highest.

Prevents calculating extended highest on every update to populate
PreExtendedHighest in the result.

* remove incorrect comment
2023-09-07 14:59:22 +05:30