* WIP commit
* SubscribedQualityUpdate message to send list of currently subscribed
qualities for a simulcast video publisher
* Correct subscriberID
* goimports
* Do quality update on add/remove of subscribed track
* do not update quality when admin mute is active
* update quality on admin unmute
* Update protocol version
* Simplify max subscribed quality loop per David's suggestion
* Stream Allocator Try 3
Making an intermediate PR to do
- Special treatment for screen share tracks
- When allocating all tracks,
o try to stream all tracks by starting with the lowest layer
o multi-pass across tracks to get a more even distribution
Not yet done:
-------------
In deficient state,
o Allocate a specific track on a change
o Steal from other tracks
* Correct sense of managed track
* have to range to copy
* generate
* fix VideoLayers compare
* Use t.simulcasted
* Allow participants to create new connection for publishing new tracks
new param 'publish=<name>' enables publishing new connection with publish
only grants. Also, identity is appended with '#<name>'
* Add integration test to duplicate publish only connection
Signed-off-by: shishir gowda <shishir@livekit.io>
* Reuse token in test and set subscribeGrant to false on publish param
Signed-off-by: shishir gowda <shishir@livekit.io>
* create auth token with grants
Signed-off-by: shishir gowda <shishir@livekit.io>
* Signal ice on negotiate in test client
Signed-off-by: shishir gowda <shishir@livekit.io>
* Update pkg/service/rtcservice.go
Co-authored-by: David Zhao <david@davidzhao.com>
Co-authored-by: David Zhao <david@davidzhao.com>
* configurable node track limit
* sample config
* todos
* end of file new line
* default max num tracks
* bandwidth limit
* client message for limit exceeded node
* 10 Gbps default network limit
Small step on the way to making StreamAllocator prioritization of tracks.
With the new callback into StreamAllocator, the idea is to use the
max layer information to do track prioritization.
Testing:
--------
Sanity check that sample app works
* track numParticipants in room
* only track participant if not a hidden participant
* adjust coding style to use ++
* fix typo
* fix missing nil check
* update roomstore with new numParticipants on participantChanged
* only update roomstore if participant is not hidden
* call StoreRoom directly after StoreParticipant when joining/leaving
When we RLock during write cycles, the mutex spends the majority of its time
staying locked. As new participants join, they have to acquire the WLock
before downtracks could be add it.
In load test scenarios (25 participants joining together), it's common to see
goroutine dump showing MediaTrack.AddSubscriber -> DownTrack.storeDownTrack trying to acquire mutex, and never able to acquire it.
* Fix faulty participant update buffering.
* Fix bug with broadcasting out of order
* dedicated participant update worker, without locks
* use tracker to drop duplicate/out of date messages
* additional lock around filter logic
Got the following error on a fresh install
```
wire: /root/ws/livekit-server/pkg/service/interfaces.go:35:2: DeleteRoom redeclared
wire: /root/ws/livekit-server/pkg/service/interfaces.go:38:2: other declaration of DeleteRoom
wire: generate failed
Error: exit status 1
```
Probably something from the latest `wire` version.
After consulting David, removing the duplicate.
Testing:
--------
- Server builds and runs. Client is able to connect.
- Update ion-sfu to v1.20.14
- Enable `abs-send-time` for video tracks
Reference: ion-sfu PR - https://github.com/livekit/ion-sfu/pull/12
Testing:
--------
- Look at SDP offer in subscriber PC and ensure that abs-send-time is negotiated.
- Ensure that downstream packets have `abs-send-time` extension for video packets.
TODO:
-----
- Not yet setting this for audio tracks. Eventually we want to move
to TWCC. This is just a step along the way.
* small refactor
* extra line
* fix room allocator test
* selector fakes not used
* keep decisions out of router
* put nodeId logic back
* fix room allocator test
* more generic turn server
* public turn realm name
* support turn cert itself in config
* remove cert/key from config
* double auth handler
* generate
Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
* cli: Allow setting the current node region with flag or env variable
Also add region to "starting LiveKit server" log.
* routing: Add region to node registration
Register the node's region on the selected router so it can be used for
region aware node selection.
Also add the region to the list-nodes output.
* regionaware: Set minDist to zero for the current node
If you don't set the minDist when leaving the loop early for a node that
matches the current region, the minDist value with still be at max. This
causes the the wrong node to be selected if the current node is the
first one the loop passes through.
Add a test that validates this change. The new test fails if this new
change is not in place.