Commit Graph
420 Commits
Author SHA1 Message Date
cnderrauberandGitHub 82192f524e fix migration state (#520) 2022-03-16 17:58:25 +08:00
cnderrauberandGitHub 37b76f41b7 set participant to active after subscriber data channel opened (#518) 2022-03-16 12:12:16 +08:00
Raja SubramanianandGitHub ae85e55fd4 Using RTPStats across the board (#515)
* WIP commit

* Clean up
2022-03-15 17:47:19 +05:30
cnderrauberandGitHub 61ac44e5f7 Revert data track change (#513)
* Revert data track change

* clean code
2022-03-15 19:30:10 +08:00
Raja SubramanianandGitHub 9e8594a9b6 More unification of RTPStats (#510)
* WIP commit

* WIP commit

* Tests

* update protocol
2022-03-14 13:00:27 +05:30
Raja SubramanianandGitHub be02611ab7 Locks around data track (#508)
* WIP commit

* Fix migration, thank you Jie
2022-03-12 20:10:46 +05:30
Raja SubramanianandGitHub b0e470cd59 Return time since last PLI properly (#507) 2022-03-12 13:15:01 +05:30
Raja SubramanianandGitHub 4e24df4200 Move RTPStats -> OSS (#506) 2022-03-12 11:21:05 +05:30
Raja SubramanianandGitHub 80bd45f061 Some clean up (#505)
* WIP commit

* Refactor NTP time

* Clean up

* Update lk protocol
2022-03-11 22:40:49 +05:30
Raja SubramanianandGitHub b6975bf7cd Track source based stream tracker config (#503)
* Track source based stream tracker config

* SCREEN_SHARE_AUDIO is an audio source
2022-03-11 12:15:12 +05:30
e4c321de02 add interface filter config (#502)
* add interface filter config

* Update config-sample.yaml

Co-authored-by: David Zhao <david@davidzhao.com>

* better description

Co-authored-by: David Zhao <david@davidzhao.com>
2022-03-11 14:08:41 +08:00
shishirngandGitHub cd2a7c2447 Telemetry: send video layers in TrackPublishedUpdate event (#500)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-03-10 14:49:01 -05:00
cnderrauberandGitHub d31c9f607e fix timing issue for clear receiver (#497) 2022-03-09 21:38:01 +08:00
cnderrauberandGitHub 184fc93c6a fix panic on close channel (#495) 2022-03-09 11:49:27 +08:00
Raja SubramanianandGitHub 5b0f171bef Log actual track IDs during subscription, not just the number of tracks (#493)
* Log actual track IDs instead of just number of tracks

* Log track ids
2022-03-08 19:51:57 +05:30
cnderrauberandGitHub 128199e634 don't send datatrack info to client (#492)
* don't send datatrack info to client
2022-03-08 17:05:26 +08:00
David ZhaoandGitHub d57f76fbef Use trackID consistently as log key (#491)
* Use trackID consistently as log key

* more useful logging for track published
2022-03-07 21:02:08 -08:00
cnderrauberandGitHub 7c0f789316 move CanPublishData check to DataTrack (#490)
* move CanPublishData check to DataTrack

* fix test
2022-03-08 12:02:18 +08:00
cnderrauberandGitHub 608da4ba4b stats for pli and bitrate (#487)
* stats for pli and bitrate

* solve comments

* return 0 if no pli sent
2022-03-07 14:59:01 +08:00
cnderrauberandGitHub 4bc03d8435 Client configuration (#452)
* client configuration

* fix init roommanager
2022-03-03 18:26:14 +08:00
David ZhaoandGitHub 7a5b5dbc69 Pass back serverRegion in when participant's joining (#479)
* Pass back serverRegion in when participant's joining

* fix tests

* protocol update
2022-03-02 13:36:19 -08:00
Raja SubramanianandGitHub bfae13eaa6 Keep track of pending subscription close. (#478)
Introduce a pending close map and fire onNoSubscribers only
when there are not subscribed and no pending close.

There are a couple of paths for down track close
- RemoveSubscriber
- RemoveAllSubscriber
We remove the subscriber from `subscribedTracks` in these.
This is because `AddSubscriber` checks for existing subscription.
If there is a remove followed by an add, the add should not think
there is an existing susbcription if there is a delay in down track
close callback.

But, down track close is also called directly from places like
participant close. So, have to clean up both subscribedTrack
and pendingClose when the down track close fires.

Call onNoSubscribers only when both are empty. This will allow
relay up track to stop properly when all susbcribers have left.
2022-03-01 23:30:13 +05:30
David ZhaoandGitHub 7449175c8e Fix participant update version generation. (#477)
Previously it was stuck at 1
2022-03-01 09:36:11 -08:00
cnderrauberandGitHub 913ef3a646 Datatrack for data channel (#476)
* data track
2022-03-01 15:48:20 +08:00
shishirngandGitHub c3a3fb569d add track publisher info in track subscribed event (#473)
* add track publisher info in track subscribed event

Signed-off-by: shishir gowda <shishir@livekit.io>

* update protocol ver

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-28 13:48:02 -05:00
Raja SubramanianandGitHub 2706dc130f Replace sync/atomic usage with uber/atomic (#471) 2022-02-28 09:57:17 +05:30
cnderrauberandGitHub c2d3e6e33e create data channel from sync state (#469)
* create data channel from sync state

* fix fake type
2022-02-25 18:32:02 +08:00
David ZhaoandGitHub 130decbf1d CI step for static check (#467)
* CI step for static check

* fix staticcheck
2022-02-24 23:07:15 -08:00
Raja SubramanianandGitHub 778d1aa141 utils.AtomicFlag -> atomic.Bool (#466)
* Replacing hand rolled ion-sfu atomic with uber/atomic

* Remove another hand rolled atomic

* utils.AtomicFlag -> atomic.Bool
2022-02-25 12:19:49 +05:30
Raja SubramanianandGitHub 0170cc1cb6 Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck`
Uneaarthed a couple of real bugs
2022-02-25 12:04:08 +05:30
David ZhaoandGitHub 6d88154402 Reduce lock scope, avoid callbacks under lock (#462) 2022-02-24 15:09:34 -08:00
shishirngandGitHub b7aac6cb6b Set track_type to VIDEO for max subscriber video quality change explcitly (#461)
its defaulting to 0 -> AUDIO

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-24 12:45:07 -05:00
David ZhaoandGitHub 7eb2fecadd Close websocket connection upon join failure (#458)
* Close websocket connection on join failure to avoid hang

* fix auto creation bug
2022-02-22 17:43:25 -08:00
shishirngandGitHub 3e7fae96ea Add telemetry method to capture max video_quality (#457)
* Add telemetry method to capture max video_quality

Signed-off-by: shishir gowda <shishir@livekit.io>

* Telemetry fakes

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update go mod dep

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-22 19:08:49 -05:00
Raja SubramanianandGitHub 870190624e Fix no-video with adaptive streaming (#456)
* Fix no-video with adaptive streaming

With a recent change to initialize max quality for subscriber
synchronously, a subsequent update at the same quality was
getting ignored. So, there was no message back to publisher
to start up video layers. Reproducible every time the subscriber
joined after all the layers of publishers was turned off.

While not pretty, for now, disable the check for quality match
on subscriber update. That disabling itself is fine as there is
another check for consolidated quality match before sending
a message to the publisher, but in general this area has shown
some shakiness and needs some work.

* Use notify function to set initial quality also
2022-02-22 10:34:18 -08:00
David ZhaoandGitHub a48cb6d0c4 Avoid deadlock during room close (#451)
* avoid deadlock during room closse

* better fix
2022-02-20 21:14:57 -08:00
Raja SubramanianandGitHub 3f38172139 Types for ConnectionID, NodeID, ParticipantKey (#450)
* Types for ConnectionID, NodeID, ParticipantKey

* latest protocol version
2022-02-21 08:52:11 +05:30
Raja SubramanianandGitHub f209e9319a Reset channel observer in resetState (#449)
* Reset channel observer in resetState

* Spelling fix
2022-02-20 20:52:17 +05:30
David ZhaoandGitHub c20fb237d5 Initialize subscriber quality to default layer (#444) 2022-02-18 09:21:24 -08:00
Raja SubramanianandGitHub f3a6f58006 Use correct publisher id in stream state update (#432) 2022-02-11 12:09:48 +05:30
Raja SubramanianandGitHub a6338992e8 Stop forwarding on congestion (#429)
* WIP commit

* comment out debug stuff
2022-02-11 09:17:53 +05:30
cnderrauberandGitHub f3572d2654 tune speaker detector more sensitive (#427)
* tune speaker detector more sensitive
2022-02-10 16:39:59 +08:00
David ZhaoandGitHub aadfc97b0b Minor cleanup, updated docs to reflect Swift (#428) 2022-02-10 00:31:09 -08:00
Raja SubramanianandGitHub 222b02aa73 RTT (#420)
* Consolidating PLI throttle

Use the throttler in `sfu.WebRTCReceiver`.

Does change shape of config object.

* Move PLIThrottleConfig to sfu.WebRTCReceiver

* fix test compile

* Cleaning up unused stuff

* improve readability

* RTT

- Calculate down track RTT using RTCP Receiver report
- Surface it back to the participant
- Participant updates all its published trackes
  (throttled to limit update to once in 5 seconds)
- That propagates to all the upstream sfu.Buffer and the nacker.
  So, we will have RTT throttled NACKs.

* rtt callback
2022-02-09 09:34:40 +05:30
Raja SubramanianandGitHub 3117547d60 Consolidating PLI throttle (#419)
* Consolidating PLI throttle

Use the throttler in `sfu.WebRTCReceiver`.

Does change shape of config object.

* Move PLIThrottleConfig to sfu.WebRTCReceiver

* fix test compile

* Cleaning up unused stuff

* readability improvement
2022-02-08 22:50:43 +05:30
Raja SubramanianandGitHub d3ca4a37a8 Proper context for down track logger (#416)
It was having two participants (both publisher and subscriber).
Fix it by getting logger from susbcriber and adding track context.
2022-02-08 15:54:45 +05:30
Raja SubramanianandGitHub 941cac8dfc set DTLS retransmit interval to 100 ms (#414) 2022-02-07 23:43:41 -08:00
Raja SubramanianandGitHub 36289bbca7 FPS (#410)
* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* Clean up

* Clean up

* Store RTT in stats

* spelling mistake

* Make tests compile

* Fix test compilation error

* fix tests

* clone

* latest protocol
2022-02-08 12:53:14 +05:30
David ZhaoandGitHub e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
Raja SubramanianandGitHub 7f2a5ae036 latest DTLS to fix long delay connections (#405) 2022-02-05 13:14:06 +05:30