Commit Graph

1973 Commits

Author SHA1 Message Date
David Zhao
debd75fa15 Integrate logger components (#1933)
* Integrate logger components

Dividing into the following components
* pub - publisher
* pub.sfu
* sub - subscriber
* transport
* transport.pion
* transport.cc
* api
* webhook

* update go modules
2023-08-03 13:31:17 -07:00
Raja Subramanian
adf971f5b1 Do not post max layer event for audio. (#1932)
* Do not post max layer event for audio.

A bunch of event queue full warnings on audio tracks :-()

* Don't need a deep channel
2023-08-03 14:04:10 +05:30
cnderrauber
eadc910bff Add PlayoutDelay to CreateRoomRequest (#1930)
* Add PlayoutDelay to CreateRoomRequest

* Remove max delay from palyoutdelay
2023-08-03 16:32:59 +08:00
Raja Subramanian
03ab242fb8 Reduce another noisy log to Debugw (#1931)
* Reduce another noisy log to Debugw

* update deps
2023-08-03 12:53:10 +05:30
Raja Subramanian
dbbf2f886f Skip video layer update if sub muted (#1929)
Previous change to check for non-zero width caused test failures
as subscribed track settings can use the quality field and not
necessarily width/height.
2023-08-02 16:33:58 +05:30
Raja Subramanian
0dc92ef273 Remove parked layer feature. (#1927)
* Remove parked layer feature.

Not worth the added complexity.

Several reasons
- Not seeing black frames on pub mute always.
- If they are there, it can consume more than 30kbps if the parked layer
  is high res. That is wasted bandwidth downstream when pub is muted.
- On resume, client some time sends PLI and that triggers a key frame
  request.

But, leaving the separate `PubMuted` flag in forwarder in case we can
use it for better handling.

* need the request spatial
2023-08-02 14:02:29 +05:30
Raja Subramanian
f3a0e3e71c skip logging when stream closed (#1928) 2023-08-02 14:00:58 +05:30
cnderrauber
f7a1776f4c Add control of playout delay (#1838)
* Add control of playout delay

Add config to enable playout delay. The delay will be limited by
[min,max] in the config option and calculated by upstream & downstream
RTT.

* check protocol version to enable playout delay

* Move config to room, limit playout-delay update interval, solve comments

* Remove adaptive playout-delay

* Remove unused config
2023-08-02 16:12:23 +08:00
renovate[bot]
0c5161e9ab Update golang.org/x/exp digest to d63ba01 (#1924)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-01 20:36:23 -07:00
Raja Subramanian
0c34f12fa1 Demote some high frequency logs to Debugw (#1925) 2023-08-02 00:03:38 +05:30
Raja Subramanian
db3fbb57ae Do not log as error on connection reset by peer (#1923) 2023-08-01 19:04:54 +05:30
Raja Subramanian
a595c09bd2 Log the 32-bit RTP timestamp (#1921) 2023-08-01 00:18:05 +05:30
Raja Subramanian
11bdda0779 Temper stream allocator more (#1920)
* Temper stream allocator more

* gofmt

* AllowPause default
2023-07-31 12:45:21 +05:30
Raja Subramanian
eecddbb65a Issue full reconnect if subscriber PC is closed on ICERestart (#1919)
Server could have closed subscriber PC to aid migration.
But, if a resumes lands back on that node, a resume of
the participant session is not possible as subscriber PC is already
closed. While theoretically possible to form a new subscriber
peer conenction, reducing complexity and issuing a full reconnect
as this should be a rare case.
2023-07-31 11:43:47 +05:30
Raja Subramanian
872b86da3b Delay retransmission after first send. (#1918)
* Delay retransmission after first send.

* test tweak

* english
2023-07-30 12:24:58 +05:30
Raja Subramanian
b6394d5aa6 De-dupe ICE candidates, makes logging cleaner. (#1916) 2023-07-29 18:26:57 +05:30
renovate[bot]
cfee506f51 Update golang.org/x/exp digest to b0cb94b (#1877)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-28 16:39:58 -07:00
cnderrauber
a87232f42a Frame integrity check for svc codec (#1914)
* Frame integrity check for svc codec

* Fix test

* Spell
2023-07-28 14:40:33 +08:00
David Zhao
981fb7cac7 Adding license notices (#1913)
* Adding license notices

* remove from config
2023-07-27 16:43:19 -07:00
Raja Subramanian
887f6580ec Cache marker in sequencer and use it while retransmit. (#1912)
With SVC codecs, input marker and fowarded marker could be different.
So, cache it in sequence and use it on retransmit.

@cndderrauber - this could have affected SVC under packet loss.
2023-07-27 17:08:14 +05:30
Raja Subramanian
fc7d4bd01e E2EE trailer for server injected packets. (#1908)
* Ability to use trailer with server injected frames

A 32-byte trailer generated per room.
Trailer appended when track encryption is enabled.

* E2EE trailer for server injected packets.

- Generate a 32-byte per room trailer. Too reasons for longer length
  o Laziness: utils generates a 32 byte string.
  o Longer length random string reduces chances of colliding with real data.
- Trailer sent in JoinResponse
- Trailer added to server injected frames (not to padding only packets)

* generate

* add a length check

* pass trailer in as an argument
2023-07-27 16:50:18 +05:30
Raja Subramanian
38c4eba5a3 Fix spelling (#1911) 2023-07-27 12:02:12 +05:30
Raja Subramanian
ee1c23eb02 Move congestion controller channel observer params to config (#1910) 2023-07-27 11:48:22 +05:30
Raja Subramanian
7a10f60be7 Remove packet debug. (#1909)
Not showing anything too useful.
2023-07-27 10:04:04 +05:30
Jonas Schell
886e7b024c update readme (#1907) 2023-07-26 15:43:52 +05:30
Raja Subramanian
9702d3b541 A couple of more opportunities in stream allocator. (#1906)
1. When re-allocating for a track in DEFICIENT state, try to use
   available headroom to accommodate change before trying to steal
   bits from other tracks.
2. If the changing track gives back bits (because of muting or
   moving to a lower layer subscription), use the returned bits
   to try and boost deficient track(s).
2023-07-26 15:35:07 +05:30
Raja Subramanian
0484a68342 Plug a couple of holes in stream transitions. (#1905)
* Plug a couple of holes in stream transitions.

1. Missed negative sign meant stealing bits from other tracks was not
   working.
2. When a track change (mute, unmute, subscription change) cannot be
   allocated, explicitly pause so that stream state update happens.

Refactor stream state update a bit to make it a bit cleaner.

* correct comment
2023-07-26 13:36:58 +05:30
taegu.kang
34a7b60991 Update config-sample.yaml (#1904)
fix typo
2023-07-25 22:12:26 -07:00
Raja Subramanian
5ae1387c68 Return a copy of down tracks from spreader. (#1902)
As shadow copy can change, do not return as is.
Also use the broacast function to broadcast up track changes to down
tracks.
2023-07-25 19:00:43 +05:30
Raja Subramanian
ffd6dc2210 Packet level ddebug logs. (#1900)
Only for debugging for a bit. Not for deploy.
2023-07-25 13:53:21 +05:30
Raja Subramanian
43fa6f57d1 A very simple leaky bucket pacer. (#1899) 2023-07-23 10:11:35 +05:30
Raja Subramanian
7e6aa00426 Remove unused fields left over from refactor (#1897) 2023-07-21 16:23:00 +05:30
Paul Wells
6c20c7eb15 add test for removing disconnected participants on signal close (#1896)
* add test for removing disconnected participants on signal close

* cleanup
2023-07-20 21:21:40 -07:00
Paul Wells
3980d049c9 close disconnected participants when signal channel fails (#1895)
* close disconnected participants when signal channel fails

* fix typefake

* update reason
2023-07-20 19:23:35 -07:00
Paul Wells
6ad1e1598d move signal server start to server start (#1894)
* move signal server start to server start

* fix test
2023-07-20 19:13:27 -07:00
kannonski
cf4801064d changing key file permissions control (#1893) 2023-07-19 14:23:30 -07:00
Raja Subramanian
dd995899bf Handle extreme case of sender report lagging. (#1892) 2023-07-19 12:50:03 +05:30
Raja Subramanian
cf8cf1a87f Forgot to log important bits :-( (#1891) 2023-07-19 10:22:51 +05:30
Raja Subramanian
66de9ff4a0 Add debug log for RTCP sender report. (#1890)
* Add debug log for RTCP sender report.

Temporary to collect more data. Hitting scenarios under congestion
where the sender report gets off sync. Need some data to pore through
and understand and implement changes.

* Debugw
2023-07-18 23:21:06 +05:30
Raja Subramanian
f41b93657e Log a bit more in sender report warp report. (#1888) 2023-07-18 09:14:41 +05:30
Paul Wells
9f3c975b1c leave signal context open after stream closes (#1887) 2023-07-16 20:24:11 -07:00
David Zhao
5d1d454a98 Fix missed label arg in logger (#1886) 2023-07-16 20:05:41 -07:00
Paul Wells
5535916ff2 prevent signal context from closing before room setup finishes (#1885) 2023-07-16 19:01:53 -07:00
Paul Wells
8784449fc6 manually cancel signal relay context (#1884) 2023-07-16 15:03:47 -07:00
Paul Wells
7dc60bb1bf start reading signal messages before session handler finishes (#1883)
* start reading signal messages before session handler finishes

* fix err scope
2023-07-16 13:40:53 -07:00
renovate[bot]
e6a47a24a7 Update livekit deps (#1869)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-16 13:24:06 -07:00
Raja Subramanian
11e1eb00fa Attempt to avoid out-of-order max subscribed layer notifications. (#1882)
* Check for request layer lock only in the goroutine

* check before sending PLI

* max layer notifier worker

* test cleanup

* clean up

* do notification in the callback
2023-07-16 23:28:20 +05:30
Raja Subramanian
06d8459234 Pick up proto proxy no update on no change (#1881) 2023-07-15 14:09:22 +05:30
Raja Subramanian
469f1cd073 Minor changes to publisher bool. (#1880)
* Minor changes to publisher bool.

* address feedback
2023-07-15 12:43:05 +05:30
Raja Subramanian
4c02a6d717 Time stamp adjustments v2 (I think) (#1875)
* WIP commit

* WIP commit

* WIP commit

* Some clean up
- Removed a chatty debug log
- some spelling, punctuation correction in comments
- missed an `Abs` in check, add it.
2023-07-14 11:47:07 +05:30