Commit Graph

710 Commits

Author SHA1 Message Date
David Zhao 130aefa597 Use type-specific track prefixes. (#586)
* Use type-specific track prefixes.

Making it easier to identify track type from its ID

* also include track source
2022-03-31 12:35:15 -07:00
Raja Subramanian 4696503790 Include region in ParticipantInfo (#585) 2022-03-31 14:57:55 +05:30
cnderrauber ffb45f7fe2 change client resume condition to disconnected, not failed (#583) 2022-03-31 13:43:22 +08:00
David Colburn 7dc90e805c Update protocol (#582) 2022-03-30 16:38:38 -07:00
David Colburn 0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -07:00
David Colburn 26f7bb498a Identity cannot be empty (#580) 2022-03-30 12:53:32 -07:00
cnderrauber 3f5d4df65d fix subscribe only client migrate with data channel (#579) 2022-03-30 18:45:03 +08:00
Raja Subramanian f694dad105 Reset available layers when removing all trackers (#575) 2022-03-29 08:16:18 +05:30
cnderrauber e35d75f7d7 disable av1 and vp9 support (#576) 2022-03-29 10:29:54 +08:00
cnderrauber 3959251837 add support for vp9 and av1 (#574) 2022-03-28 22:22:48 +08:00
cnderrauber 75ca70aef7 add ipv6 support (#571) 2022-03-28 14:23:48 +08:00
David Zhao f2556483a3 Re-issue tokens when clients initially connect. (#569)
This ensures if they are disconnected before token is refreshed, they
could reconnect back with a valid token.
2022-03-25 23:55:19 -07:00
David Zhao 51cf626a70 Dump goroutines when possible deadlock is detected (#568) 2022-03-25 23:54:35 -07:00
shishirng a6bb59b159 handle deltas being null leading to crash (#567)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-03-25 19:18:32 -04:00
cnderrauber 3352ee6b79 add size limit to metadata of room & participant (#566)
* add size limit to metadata of room & participant

* description in config-sample

* solve comments
2022-03-25 12:48:11 +08:00
cnderrauber 61655c6ff0 fix firefox reconnect with ice-lite enabled (#565) 2022-03-24 17:38:44 +08:00
Raja Subramanian f293de054d Fix large reported loss in RTPStats (#564)
Had to check for half the range to see if start needed to be moved back.
2022-03-24 12:17:36 +05:30
Raja Subramanian ab7c63a08a Remove padding double counting (#562) 2022-03-24 06:36:17 +05:30
shishirng 579d3d1a19 Check if current stats < prev and guard against underflow (#563)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-03-23 15:16:59 -04:00
Raja Subramanian ed9234f71b Removing unused functions and adding more logs (#560)
* Removing unused functions and adding more logs

* Do not include padding packets in Packets
2022-03-23 22:26:34 +05:30
Raja Subramanian 06ea1d2ad3 Log rtp stats for debugging large gaps or all packets getting reported lost (#559) 2022-03-23 15:12:45 +05:30
cnderrauber 534cc01b85 refine dynacast pause delay (#558)
* refine dynacast pause delay

* fix test
2022-03-23 16:52:40 +08:00
Raja Subramanian 757a59fbcd Use windowing for NACK monitoring (#557)
* Use windowing for NACK monitoring

* Fix test
2022-03-23 13:42:29 +05:30
cnderrauber b98b828618 throttle quality come down (#556) 2022-03-23 15:27:00 +08:00
David Zhao dfd3dade00 Disallow pause by default (#554) 2022-03-22 22:07:01 -07:00
sibi adc20649ce limit speaker events to microhpone track (#553)
* limit speaker events to microhpone track

* PR suggestion
2022-03-22 13:55:06 -07:00
David Colburn 13c91678bf Remove egress store (#552)
* Remove egress store

* fix imports
2022-03-22 12:37:31 -07:00
Raja Subramanian 076eb1c8ae Dampen stream allocator (#551)
* WIP commit

* WIP commit

* WIP commit

* format

* NACK window

* Remove layer when it is expected to stop

* Remove debug
2022-03-22 22:23:22 +05:30
cnderrauber 779fe0f549 revert network cost change (#550) 2022-03-22 19:04:13 +08:00
Raja Subramanian 0a88dee95e A minimum channel capacity config (#549) 2022-03-22 13:13:48 +05:30
David Zhao 825d3cdbea Cleanup after disconnected participants. Follow up to #537 (#548) 2022-03-21 20:48:06 -07:00
cnderrauber 63d6b49668 make migrated node has higher candidate priority (#546) 2022-03-22 09:47:43 +08:00
Mathew Kamkar cf63da2e64 prometheus livekit_room_total node_id label 2022-03-21 16:43:01 -07:00
Raja Subramanian 641858832a Address edge case stream allocation (#544)
* Handle an edge in layer lock.

A very edge case
- Available layer: [0, 1, 2], but bitrate is not yet available.
We set it to layer 2 awaiting measurement.
- Measurement for layers 0 and 1 come through.
- Still no key frame for layer 2.
- Finalize layers runs and sees that bitrate is available for 0 and 1.
It finalizes layer 1.
- Layer 1 key frame comes (because we asked key frame of layer 2,
publisher sends key frame for all layers). Locks to layer 1.
- No more events happen to switch to layer 2.

Changes
-------
- Move bit rate measurement to StreamTrackerManager. Allows re-use
in relay.
- Make bit rate availability (from zero -> non-zero) an event
and let it flow through the stream allocation flow so that we
always have an event when bit rate measurement becomes available.
This gets rid of finalization which I was unhappy with it anyway as
it was polling every second.
- Removing REMB stuff from buffer. We do not use it.
It is incorrect anyway. REMB should be ay peer connection level.

* Fix test

* fix test

* Simplify allocate

* Simplify/clean up
2022-03-21 14:53:31 +05:30
David Zhao 5920672802 feat: unpublish tracks after publish permissions are revoked. (#545)
* feat: unpublish tracks after publish permissions are revoked.

Uses protocol 7 to indicate client support, otherwise it attempts to
mute the tracks.

Also sends back permissions objects of all participants, and cleaned up
our handling of various permissions attributes.

* fix static check
2022-03-21 00:20:48 -07:00
Raja Subramanian 82e1c391a4 Fix time stamp jump on layer switch (#543) 2022-03-20 13:36:29 +05:30
Raja Subramanian 1d03a5a3b6 Lock temporal layers to target for non-temporal layer codecs also (#542) 2022-03-20 11:11:49 +05:30
Raja Subramanian 8c9c1fe837 Always do stats update and header extension processing (#540)
Also, use Errorw for tracking large gap to get a back trace.
2022-03-19 21:29:10 +05:30
David Zhao 2155405736 Handle non-primary peerconnection if/when it becomes disconnected (#537)
* Handle non-primary peerconnection if/when it becomes disconnected

* avoid storing nil
2022-03-19 00:31:45 -07:00
David Zhao f14c452f8c Telemetry and webhook improvements. (#535)
* Telemetry and webhook improvements.

* avoid blocking on telemetry channel - increase channel size and drop when full
* send ParticipantJoined webhook when fully joined (i.e. on ParticipantActive)
* send TrackPublished & TrackUnpublished webhooks
* increase number of parallel webhook workers to 50

* update protocol
2022-03-18 23:20:33 -07:00
Raja Subramanian 5a9da8bee2 Do not double count NACK miss in sfu.DownTrack (#536) 2022-03-19 11:10:58 +05:30
Raja Subramanian ed00146937 Fix packets/packetRate mismatch (#534)
This still does not address root cause of large loss, but at least
does not display crazy thing like packets = 0, but packet rate is 45/s.

Also, RLock in ToString() as there are bits of structure used in
stringification.
2022-03-19 01:06:52 +05:30
Raja Subramanian 13083a143f More logs (#533) 2022-03-19 00:38:22 +05:30
Raja Subramanian d738424173 Catch a few edge cases in stream allocator. (#532)
* Catch a few edge cases in stream allocator.

- More useful logging

* fire probe cluster done callback only when there is an active cluster
2022-03-18 20:42:15 +05:30
Raja Subramanian 3ce4010e89 Fix bracket (#531) 2022-03-18 11:25:20 +05:30
Raja Subramanian a709cc0ad7 Exempt layers in stream tracker (#530)
For now, exempt layer 0 from stream tracker declaring it stopped.
2022-03-18 11:17:48 +05:30
cnderrauber 832f3fd124 filter unused candidate and refine log (#528)
* filter unused candidate and refine log

* fix test
2022-03-18 12:57:33 +08:00
Raja Subramanian 64f82a6a73 Fix off by one packets expected (#529) 2022-03-18 10:03:09 +05:30
shishirng 4fb5076807 Check cloudflare headers for real client ip first, default to X-Forwarder-For (#523)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-03-17 08:10:44 -04:00
cnderrauber c6a35d3ff1 fix keyFrameRequestGeneration not exit after close (#527)
* fix keyFrameRequestGeneration not exit after close

* change to bound check

* Refactor stop key frame requester into a function

* Remove redundant key frame requester stop

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2022-03-17 18:50:07 +08:00