Commit Graph

385 Commits

Author SHA1 Message Date
David Zhao
89ae0ca054 more logs 2022-02-18 17:52:29 -08:00
David Zhao
a6fff57b94 log participant closure 2022-02-18 17:51:34 -08:00
David Zhao
b891e78d41 leave logging 2022-02-18 17:43:29 -08:00
David Zhao
c20fb237d5 Initialize subscriber quality to default layer (#444) 2022-02-18 09:21:24 -08:00
Raja Subramanian
f3a6f58006 Use correct publisher id in stream state update (#432) 2022-02-11 12:09:48 +05:30
Raja Subramanian
a6338992e8 Stop forwarding on congestion (#429)
* WIP commit

* comment out debug stuff
2022-02-11 09:17:53 +05:30
cnderrauber
f3572d2654 tune speaker detector more sensitive (#427)
* tune speaker detector more sensitive
2022-02-10 16:39:59 +08:00
David Zhao
aadfc97b0b Minor cleanup, updated docs to reflect Swift (#428) 2022-02-10 00:31:09 -08:00
Raja Subramanian
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 Subramanian
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 Subramanian
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 Subramanian
941cac8dfc set DTLS retransmit interval to 100 ms (#414) 2022-02-07 23:43:41 -08:00
Raja Subramanian
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 Zhao
e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
Raja Subramanian
7f2a5ae036 latest DTLS to fix long delay connections (#405) 2022-02-05 13:14:06 +05:30
Raja Subramanian
9c3794144e Force DTLS role client for the simulated client side peer connection (#403)
* Force DTLE role client for the simulated client side peer connection
during migration.

Without that, with remote side being ice-lite (i. e. server offer
is subscriber peer connection), pion chooses the server DTLS role
and both side end up being servers.

* pion/webrtc -> 3.1.21

* remove local reference

* Use setup from previous answer

* more comments
2022-02-04 23:11:27 +05:30
David Zhao
6f6d55345b Use ParticipantInfo version to ensure consistency (#399)
* Use ParticipantInfo version to ensure consistency

Deprecating time.Time and avoid locking unnecessarily

* properly adjust ulimit. update protocol

* Save initial version from params

* get rid of metadata field, use grants copy

* fix test
2022-02-03 17:10:52 -08:00
David Colburn
7bbd238188 clean up logs and imports (#400) 2022-02-03 14:20:19 -07:00
David Zhao
a8d43aab67 Uses IceLite only for protocol 6 clients (#397)
* Update to Pion v3.1.20, with fixes DTLS role ambiguity

* Gate ice-lite on protocol version

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2022-02-02 21:16:08 -08:00
Raja Subramanian
ede39fe87f Disable SRTP replay protection (#396) 2022-02-02 16:31:07 +05:30
Raja Subramanian
9db2bd22df LK logger with context in SFU (#391)
* LK logger with context in SFU

* Move buff.SetLogger into sfu.WebRTCReceiver
2022-02-01 08:57:09 +05:30
Raja Subramanian
745939ec24 Smoother dynacast transition (#390) 2022-01-31 07:47:24 +05:30
Raja Subramanian
a1f88faed1 Add a resync API to sfu.DownTrack (#389)
* Add a resync API to sfu.DownTrack

Also passing in logger with context into sfu package. More to do here
with proper logging context in all modules, but this is a start

* Remove debug code

* fix tests
2022-01-30 10:59:47 +05:30
Raja Subramanian
3bfdb2523e Catch some instances of traversing map outside lock (#388)
* one more place, do not range over map outside lock

* Catch one more location

* Catching a couple of more places
2022-01-29 20:14:36 +05:30
David Zhao
6af6eefb8c Improve readability of test failures (#386) 2022-01-28 21:34:21 -08:00
Raja Subramanian
5b57522c05 Refactoring connection stats (#384) 2022-01-29 00:55:00 +05:30
David Zhao
9747243ce2 Honor autoSubscribe when subscription permissions are granted later (#381)
* Ensure autosubscribe is honored when subscription permissions were granted later

* negotiate even if no media has been added

* don't double-negotiate
2022-01-28 09:55:10 -08:00
Raja Subramanian
f962fef2c8 Apply subscribed track settsings on add (#379) 2022-01-28 08:34:13 +05:30
shishirng
26eea78b54 Telemetry connection scores (#377)
* octets - total bytes needs to be uint64

uint32 wraps at 4GB

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

* Cleanup stats handler to use connectionQuality stats

remove per packet rtcp handlers, buffer stats

* cleanup connection stats

* Update mediatrack to store rtcp stats in connection stats

* Update downstream handling of connection stats and telemetry

* Update telemetry tests

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

* Misc fixes

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

* Minor fix to avoid accessing buffer before its allocated

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

* start updateStats worker in AddReciever()

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

* Use previous score to calculate avg scores

* Restructure connectionStats

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-27 11:24:54 -05:00
Raja Subramanian
45b07e2b3f Add trackID to logger context (#375) 2022-01-26 13:23:38 +05:30
David Colburn
c92e0e38d5 Room closed fix (#370)
* Room closed fix

* switch to uber/atomic

* release after err check
2022-01-25 09:23:22 -07:00
Raja Subramanian
bb26109096 Add a method to clear receiver. (#372)
With remote media track receiver starting/stopping/restarting possibly,
receiver should be cleared when stopped and will be re-initialized when
it is restarted.
2022-01-25 18:08:41 +05:30
cnderrauber
b2cb93d9a4 fix concurrency problem (#369) 2022-01-25 16:13:52 +08:00
David Colburn
e7e3fcac43 remove duplicate IsRecorder 2022-01-24 20:51:57 -07:00
David Colburn
627a93298e IsRecorder (#368)
* IsRecorder

* regenerate fakes
2022-01-24 18:22:10 -07:00
shishirng
56ebd521f9 Telemetry capture published track updates (#367)
* Telemetry capture published track updates

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

* Updated OnVideoLayerUpdate to take slice of layers

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

* Update proto dep

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-24 14:38:04 -05:00
cnderrauber
90b97137c9 fix migrate state of subscribe only client (#366) 2022-01-24 17:03:24 +08:00
David Zhao
52fc53d325 Issue updated tokens to clients. (#365)
This ensures client reconnect attempts would be successful for long running rooms. It also fixes inaccurate permissions that were set incorrectly when full reconnections take place.
2022-01-23 23:15:49 -08:00
Raja Subramanian
6a46958870 Some receiver clean up (#364) 2022-01-23 08:22:39 +05:30
Raja Subramanian
d1848ab218 Rename UpdateSubscriptionPermissions -> SubscriptionPermission and other renaming (#363)
* Store subscription permission in DB

* Comment out subscription permission to DB

* WIP commit

* Clean up

* clean up

* Latest protocol
2022-01-22 12:16:15 +05:30
Raja Subramanian
7f4ead9b25 Fire onNoSubscribers callback in only one place. (#360)
While reworking some cloud code, this is getting fired multiple times
(in RemoveAllSubscriber and in the callback). So, it causes some
errors in the logs. Fire it only from one place.
2022-01-21 11:16:54 +05:30
cnderrauber
2886ab1e39 RemoveSubscriber through pariticipant (#359) 2022-01-21 12:32:26 +08:00
Raja Subramanian
3d56b7c7f3 Adjustments to allow permissions migration. (#356)
* Adjustments to allow permissions migration.

* Fix tests
2022-01-21 09:43:59 +05:30
Raja Subramanian
4e4ad102f7 move stop timer in mediatracksubscriptions module where it belongs (#357)
* move stop timer in mediatracksubscriptions module where it belongs

* Correct my screw up
2022-01-21 00:50:48 +05:30
Raja Subramanian
e4e292d988 Do not send connection quality when participant is not active. (#354)
* Do not send connection quality when participant is not active.

Some times when the connection takes a while (in a long delay network
on Safari for example), connection quality arrives before connectivity.

* Do not calculate connection quality of unconnected participants
2022-01-19 23:18:55 +05:30
Raja Subramanian
0178a004dd Compile in send-side bandwidth estimation. (#351)
Still not using it. But, now that Pion has merged the initial
version of GCC (Google Congestion Control) for send side bandwidth
estimation, we can integrate it.

We will enable once we have tested and feel comfortable.
2022-01-19 22:36:41 +05:30
cnderrauber
0acb0a9d66 don't send black screen when Track be resumed (#352)
* don't send black screen when Track be resumed

* default flush
2022-01-19 18:14:38 +08:00
David Colburn
5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
Raja Subramanian
10714b3f6d Adjust interfaces to better work with cloud (#349)
* Adjust interfaces to better work with cloud

* force argument to quality update
2022-01-19 10:28:55 +05:30
cnderrauber
8a5f26b064 refine reuse transceiver (#348) 2022-01-19 10:24:29 +08:00