Commit Graph
2048 Commits
Author SHA1 Message Date
Paul Wells 680a07e896 update pion deps (#2667)
* update pion deps

* deps
2024-04-19 19:21:55 -07:00
Raja Subramanian f4745b8437 Do codec munging when munging RTP header. (#2665)
* Do codec munging when munging RTP header.

It was possible for probe packets to get in between RTP munging and
codec munging and throw off sequence number while dropping packets.
Affected only VP8 as it does codec munging.

* do not pass in buffer as it is created anyway

* flip fields

* flip order

* fix test

* call translate for all tracks

* simplify
2024-04-19 22:32:13 +05:30
cnderrauber 8eb86f1077 Don't log dd invalid template index (#2664)
If the first packet of keyframe has template structure is lost then
subsequent packets rely on it will report invalid tempalte error which
is expected.
2024-04-19 16:48:36 +08:00
cnderrauber 0b3587b10d Disable dynamic playout delay for screenshare track (#2663)
Screenshare video has inaccuracy jitter due to its low frame rate and bursty traffic
2024-04-19 15:25:48 +08:00
Paul Wells 483aafcfc0 fix key frame timer (#2662) 2024-04-18 01:24:45 -07:00
Paul Wells 0974f3d961 replace keyframe ticker with timer (#2661) 2024-04-17 22:14:17 -07:00
David Colburn 8f8825cb88 fix participant, ensure room name matches (#2660) 2024-04-17 13:12:57 -07:00
Raja Subramanian e96e8de725 Debug logging addition of ICE candidate (#2659) 2024-04-17 11:14:40 +05:30
Raja Subramanian 14b934a780 Log ICE candidates to debug TCP connection issues. (#2658) 2024-04-17 09:45:10 +05:30
Benjamin Pracht 6afa63ded3 Use the ingress state updated_at field to ensure that out of order RPC do not overwrite state (#2657) 2024-04-16 18:10:14 +02:00
Paul Wells b77f0256c7 use typed ops queue in pctransport (#2656) 2024-04-16 03:23:08 -07:00
Raja Subramanian 1ab0879d28 ICE config cache module. (#2654)
* ICE config cache module.

* generic key type

* no ICEConfig in StartSession

* clean up
2024-04-16 15:49:45 +05:30
Paul Wells 5c38d58987 add typed ops queue (#2655)
* add typed ops queue

* tidy
2024-04-16 02:51:49 -07:00
Raja Subramanian 04d193e0b2 Update mediatransportutil. (#2652)
Also, use adjusted time of sender report for drift logging.
2024-04-16 10:10:06 +05:30
Paul Wells 7d5c991d8d add disconnected chan to participant (#2650) 2024-04-14 12:49:13 -07:00
Raja Subramanian ec41d20f81 Reduce RED weight in half. (#2648) 2024-04-12 20:39:53 +05:30
David Colburn 990cf6877b backwards compatability for IsRecorder (#2647)
* backwards compatability for IsRecorder

* regenerate fakes
2024-04-11 11:14:15 -07:00
Raja Subramanian d55948f761 Add PropagationDelay API to sender report data (#2646) 2024-04-11 20:00:13 +05:30
Raja Subramanian ad1f508680 Add support for "abs-capture-time" extension. (#2640)
* Add support for "abs-capture-time" extension.

Currently, it is just passed through from publisher -> subscriber side.

TODO: Need to store in sequencer and restore for retransmission.

* abs-capture-time in retransmissions

* clean up

* fix test

* more test fixes

* more test fixes

* more test fixes

* log only when size is non-zero

* log on both sides for debugging

* add marshal/unmarshal

* normalize abs capture time to SFU clock

* comment out adding abs-capture-time from registered extensions
2024-04-11 15:25:10 +05:30
Raja Subramanian 21fbda3470 Silence some noisy debug logs (#2643) 2024-04-11 10:58:19 +05:30
David Colburn 407614b28e fix jobRequestAffinity (#2641) 2024-04-10 12:44:46 -07:00
wanshuangcheng e1b68012a1 chore: fix typos in comment (#2634)
Signed-off-by: wanshuangcheng <wanshuangcheng@outlook.com>
2024-04-10 09:27:48 -07:00
Raja Subramanian c6ee34d083 Cleaning up stream allocator data. (#2639)
* Cleaning up stream allocator data.

Marking it with STREAM-ALLOCATOR-DATA for easier use later if needed.

* clean up a bit more

* wire_gen

* wire_gen
2024-04-10 13:31:25 +05:30
Paul Wells 4b7e5dc1cc reduce gc from stream allocator rate monitor (#2638)
* reduce gc from stream allocator rate monitor

* deps

* comment out rate monitor
2024-04-09 23:14:15 -07:00
Raja Subramanian 6b0f7403ef Log fix. (#2637)
Else, it was logging something like
`candidateError: json: unsupported type: func() interface {}`
2024-04-09 11:19:41 +05:30
Mathew Kamkar 10c8582a6b get cpu stats from cgroup, remove env (#2636)
* get cpu stats from cgroup, remove env

* undo rand seed removal

* tests
2024-04-08 21:15:17 -07:00
cnderrauber 196fed605e Limit playout delay change for high jitter (#2635)
* Limit playout delay change for high jitter

* fix test
2024-04-08 21:50:50 +08:00
Raja Subramanian ddece1fbb0 Use aarival time in cached packets. (#2633) 2024-04-08 11:29:55 +05:30
David Zhao 0712719c2f Fix deadlock in IncrementalDispatcher (#2632) 2024-04-06 10:36:02 -07:00
Raja Subramanian 8852d71a8a Disable audio loss proxying. (#2629)
* Disable audio loss proxying.

Added a config which is off by default.
With audio NACKs, that is the preferred repair mechanism.
With RED, repair is built in via packet redundancy to recover from
isolated losses.
So, proxying is not required. But, leaving it in there with a config
that is disabled by default.

* fix test
2024-04-06 11:28:04 +05:30
David Zhao f4314686d1 Improve Agent logging (#2628) 2024-04-05 20:32:29 -07:00
David Colburn 4603b5c053 make IsDependent backwards compatible (#2627) 2024-04-05 14:24:34 -07:00
David Colburn fff937a89c participant kinds (#2626) 2024-04-05 12:59:06 -07:00
Raja Subramanian e93611eafa Log sender reports. (#2625) 2024-04-05 18:21:38 +05:30
Raja Subramanian d3f0436d25 Fix reference time stamp layer. (#2623)
- Had arguments reversed.
- Also, cannot take away reference layer from state as a new layer
  as reference could have a time stamp that is widely different from
  expected. So, put that back.
2024-04-04 21:09:11 +05:30
Raja Subramanian 5cfcbc0ca6 Move caching of publisher sender report to subscriber side. (#2622)
* Move caching of publisher sender report to subscriber side.

Please see inline for descriptive comments on why. Basically,
pause/unpause using replaceTrack(null)/replaceTrack(actualTrack) can
cause time stamp in sender report sent to subscribers jump ahead.
This prevents that.

With the caching on subscriber side, cleaning up the caching on
publisher side.

* fix compile, test still failing, need to debug

* skip reference TS for testing
2024-04-04 18:23:30 +05:30
dc67f505a5 agent service: new protocol & namespaces (#2545)
* initial worker impl

* fix test

* fix build

* TestAgentNamespaces

* log err

* nit cmt

* TestAgentMultiNode

* Update pkg/agent/worker.go

Co-authored-by: David Zhao <dz@livekit.io>

* retry on worker selection & fix review comments

* Update roommanager.go

* license

* use testutils.WIthTimeout

* abstract namespace/enabled logic into agent.Client, incrementally dispatch

* typos and dates

* lock

* timeout is now optional

* pass in topics instead of fixed

* handler handles connections

* onIdle, numConnections

* fix WithGrants

* update protocol

* check agent client

* broadcast after unlock

* fix data race

* remove ReadChan, fix dispatcher

---------

Co-authored-by: David Zhao <dz@livekit.io>
Co-authored-by: David Colburn <xero73@gmail.com>
2024-04-03 15:25:42 -07:00
Raja Subramanian 63b1fba082 Add start/end time to AnalyticsStream. (#2618)
* Add start/end time to AnalyticsStream.

* fix test
2024-04-03 12:23:18 +05:30
Raja Subramanian 860702e9dc Prevent large spikes in propagation delay (#2615)
* Prevent large spikes in propagation delay

A few tweaks
- Large spike in propagation delay due to congested channel results in
  long term estimate getting high value. Ignore outliers in long term
  estimate.
- Introduce a new field for adjusted arrival time as adjusting the
  arrival time in place meant it got applied again across the relay and
  that caused different propagation delay on remote nodes.
- Reset path change counters as long as there is any sample that is not
  higher than the multiple of long term. There was a case of
  o Sample with high value that triggered path change start.
  o Then some samples with high enough delta, but did not meet the
    criteria for increasing counter further.
  o Some time later, another sample met the threshold and that triggered
    a path change re-init.

* do not adapt to large delta
2024-04-02 14:21:20 +05:30
Raja Subramanian 3c8980b443 Fix media track close check. (#2614)
With the change in https://github.com/livekit/livekit/pull/2611,
the dummy receiver was replaced with real receiver. But, the close check
was using the dummy receiver.

Doing two things
- Use the dummy receiver post upgrade also
  (NOTE: this is not needed, but just keeping old behaviour)
- Fix the close check to count number of open receivers.
2024-04-02 11:03:50 +05:30
Denys Smirnov 19326a7162 Pass ringtone flag for SIP outbound. (#2613) 2024-04-01 19:20:51 +03:00
Raja Subramanian 3ed0527ef5 Reduce chances of missing layer post migration. (#2612)
When migrating out, it is possible that a published layer is not
notified to the migrating in node. Reduce chances of that layer not
getting published to the new node by curbing RTCP during migration.
It could still happen if stars line up, but this should reduce the
window to a much smaller one.
2024-04-01 18:53:54 +05:30
Raja Subramanian b1a4d00fa9 Replace receiver when there is an existing one. (#2611)
The receiver should not change, but code wise, the option of replacing
receiver object makes more sense, i.e. otherwise, it could look like we
are leaving the stale object in there without replacing with new
receiver of same type.
2024-04-01 16:14:30 +05:30
Raja Subramanian 278ae72f70 Avoid duplicate receivers on migration. (#2608)
* Avoid duplicate receivers on migration.

When migrating, post migration call to set up could add duplicate
receivers.

* don't need to check upgraded
2024-03-31 11:15:50 +05:30
Raja Subramanian 4c9e59dc25 Small tweaks to propagation delay adaptation. (#2607) 2024-03-30 21:53:18 +05:30
Raja Subramanian b5de646073 Remove redundant check. (#2605)
* Remove redundant check.

That check is already at the ouside check.

* print string

* space
2024-03-30 00:31:26 +05:30
Paul Wells f1c991c547 skip logging retry message when ws disconnections before signal finishes (#2604) 2024-03-29 06:30:12 -07:00
cnderrauber 0a35e59ebd Replace sleep with sync.Cond to reduce jitter (#2603) 2024-03-29 17:24:31 +08:00
cnderrauber 95df9737a6 Fix twcc has chance to miss for firefox simulcast rtx (#2601) 2024-03-29 09:05:53 +08:00
cnderrauber bc5fc17bdc Log high jitter case (#2602) 2024-03-28 15:59:03 +08:00