Commit Graph
789 Commits
Author SHA1 Message Date
Raja Subramanian ac8082fffb Use older SDP module to accommodate bad SDP. (#3578) 2025-04-05 12:55:39 +05:30
Raja Subramanian 1c8307c72c Use cgroup for memstats. (#3573)
* Use cgroup for memstats.

* deps
2025-04-05 11:54:36 +05:30
Raja Subramanian e9be0fca54 log SDP offer on error (#3577)
* log SDP offer on error

* use util
2025-04-05 02:07:00 +05:30
Raja Subramanian 3238ab8d77 Calculate rates for memory used and total. (#3570)
Calculating rate for total does seem odd, but keeping it consitent/lined
up with used memory calculation.
2025-04-02 10:23:38 +05:30
Anunay Maheshwari 52ce18d56e fix: revert recent changes to determine simulcast from sdp (#3565)
* Revert "Audio uses signal SignalCid and SdpCid. (#3564)"

This reverts commit cdfbb106d1.

* Revert "Keep simulcast information tied to receiver. (#3563)"

This reverts commit ed5e2f16b2.

* Revert "chore(logs): log VLS type for VP9/AV1 (#3561)"

This reverts commit ad010cfc43.

* Revert "fix(video): determine svc/simulcast from SDP for advanced codecs (#3549)"

This reverts commit 15f565510c.

* chore(deps): update protocol
2025-03-31 23:15:44 +05:30
Raja Subramanian ed5e2f16b2 Keep simulcast information tied to receiver. (#3563)
* Keep simulcast information tied to receiver.

`simulcast` flag in `TrackInfo` is at track lavel. With codec simulcast,
the primary codec (in most cases) is SVC and the backup codec is
simulcast. Back up codec publish changing the track info setting to true
meant that the primary receiver was treated as simulcast if a subscriber
for primary codec joined after the backup codec was published.

Keep track of simulcast flag in receiver.

Also, TrackInfo Cids are from signal. So, keep track of SDP cids
separately. The `simulcastTrackIds` map uses SDP cid. Clean up by all
the SDP cids of a track

* clean up

* clean up

* clean up

* clean up

* test

* Store SdpCid and IsSimulcast in Trackinfo

* clean up

* mock
2025-03-31 19:25:57 +05:30
Raja Subramanian 8cc17f8f8b Rework node stats a bit. (#3555)
* Rework node stats a bit.

Related protocol PR - https://github.com/livekit/protocol/pull/1023

- Make a config for node stats measurements. Wanted to put the config in
  `routing` package, but a circular dependency forced me to put in
   config.go
- Make rate calculations explicit, i. e. requested via config.
  Previously, it had some odd checks to decide when to calculate rate
  and it would have been calculating over different windows.
- Report signal/data channel bytes every 5 seconds to stats collection
  module. Previously, it was doing it every 30 seconds and that meant
  some windows could have had a large spike
  NOTE: Still need to think about this for load calculations as a large
  number of participants leaving could flush in a small window and that
  could report a large spike in bytes/packets. Maybe need to ignore
  signal bytes for load calculation?

* deps

* use default node stats config if given config is nil

* split out node stats into a struct for re-use

* update config
2025-03-27 12:42:19 +05:30
cnderrauber 2b6a46f402 Handle prefer_regression for backup codec (#3554) 2025-03-26 16:27:50 +08:00
Soungmin Son (Eddy)andPaul Wells 97fcb82a77 Fix: Return NotFoundErr instead of Unavailable when the participant does not exist in UpdateParticipant. (#3543)
* Check if Participant exists when update metadata

* Change Test cases

* type smuggle oss participant check into roomstore

* tidy

---------

Co-authored-by: Paul Wells <paulwe@gmail.com>
2025-03-20 23:56:34 -07:00
Denys Smirnov 75d0e18e4a Implement SIP update API. (#3141) 2025-03-20 18:37:33 +02:00
Denys Smirnov 7f4c4597f1 Stubs for SIP update API. (#3533) 2025-03-19 14:58:40 +02:00
Raja Subramanian b3779a9086 WebHookConfig (#3517)
* default webhook config

* WebHookConfig

* fix test

* protocol with yaml tags
2025-03-11 13:49:29 +05:30
Raja Subramanian 9a7c944252 mediatransportutil update (#3511) 2025-03-10 21:28:03 +05:30
cnderrauber 139d1b139c Add ForwardParticipant method to room service (#3507)
It returns unimplemented error now.
2025-03-10 14:08:38 +08:00
Denys Smirnov 47896f50e3 Update protocol and IO service. (#3499) 2025-03-08 01:19:42 +05:30
dependabot[bot] 1dc42eef9c Bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (#3497)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.3...v3.0.4)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 19:33:03 +05:30
renovate[bot] 30786aef4d Update module github.com/livekit/protocol to v1.34.0 (#3460)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-01 01:51:19 -06:00
cnderrauber 900da73e6d Add ice candidates logs for failed peerconnection (#3473) 2025-02-27 14:47:28 +08:00
Denys Smirnov 60a09cb4be Implement SIP iterators. (#3332) 2025-02-20 13:13:21 +02:00
Paul Wells f49103a003 add participant job type (#3443)
* add participant job type

* cleanup

* deps
2025-02-18 00:40:56 -08:00
cnderrauber b2a54729f5 Don't drop message if calculate duration is too small (#3442)
* Don't drop message if calculate duration is too small

* fix test
2025-02-18 14:41:41 +08:00
Raja Subramanian 1ae2e48c2e Webhook analytics event. (#3423)
* Webhook analytics event.

* deps

* generate

* nil notifier
2025-02-13 10:39:45 +05:30
Raja Subramanian 99afbf587b Use a Twirp server hook to send API call details to telemetry. (#3401)
* Use a Twirp server hook to send API call details to telemetry.

* mage generate and clean up

* Add project_id

* deps

* - Redact requests
- Do not store responses
- Extract top level fields room_name, room_id, participant_identity,
  participant_id, track_id as appropriate
- Store status as int

* deps
2025-02-07 16:16:41 +05:30
renovate[bot] 7ebe528792 fix(deps): update go deps (#3341)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 01:42:05 -06:00
Denys Smirnov ccbc988824 Pass error details and timeouts. (#3402) 2025-02-06 13:53:44 +02:00
cnderrauberandboks1971 aeec75edeb H265 supoort and codec regression (#3358)
* H265 supoort and codec regression

Support H265 codec.
Add optional codec regression for subscribers don't
support advanced codecs like H265, AV1, VP9.

* restart forwarder on upstream codec change

* tests

* Reneogitate new codec if client doesn't support change

* Add option to disable codec regression

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2025-02-06 11:56:49 +08:00
Raja Subramanian 14e65f1459 AnalyticsEvent for generic reports (#3400)
* AnalyticsEvent for generic reports

* deps
2025-02-05 10:13:43 +05:30
renovate[bot] eb2b7a2271 fix(deps): update livekit deps (#3392)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-02 22:54:36 -06:00
Raja Subramanian db75092aa6 Use nonce in data messages to de-dupe SendData API. (#3366)
* Use nonce in data messages to de-dupe SendData API.

With API retries, it is possible that some data messages are sent
multiple times. Check the nonce (if present) to de-dupe data messages
before forwarding it to the clients.

* add nonce to UserPacket

* defer unlock

* 128-bit UUID as nonce

* - UUID nonce
- make a UserPacketDeduper module for easier re-use.

* deps

* feedback
2025-01-27 15:35:37 +05:30
Raja Subramanian 524441446f Room creation time with ms resolution (#3362) 2025-01-23 09:42:30 +05:30
Raja Subramanian b4cf055c1c Resolve newer participant using higher precision join time. (#3360)
* Resolve newer participant using higher precision join time.

Also, keep it consistent based on participant SID if everything else is
the same.

* switch to compare semantics

* fix
2025-01-22 15:24:34 +05:30
Raja Subramanian eca6ffa9e2 Update pion/webrtc to pick up data channel detach unlock change. (#3342) 2025-01-17 10:22:56 +05:30
renovate[bot] 9c462aef08 Update pion deps (#3242)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 12:10:25 -06:00
renovate[bot] 24361768a1 Update module google.golang.org/protobuf to v1.36.3 (#3315)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 16:26:27 -06:00
renovate[bot] 8c62f9b2fa Update module github.com/livekit/protocol to v1.31.0 (#3314)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 00:54:29 -06:00
Raja Subramanian 53d300ba71 Use nano time for easier (and hopefully) faster checks/calculations. (#3323) 2025-01-12 00:56:46 +05:30
David Zhao ca767a988e bump to v1.8.2 (#3310) 2025-01-06 19:55:24 -08:00
renovate[bot] ec54d357e4 Update golang.org/x/exp digest to 7588d65 (#3309)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 14:49:07 -06:00
renovate[bot] c792d15244 Update golang.org/x/exp digest to 7d7fa50 (#3303)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 18:20:12 -06:00
renovate[bot] 4f6d44c258 Update module github.com/elliotchance/orderedmap/v2 to v2.7.0 (#3299)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-02 11:26:20 -06:00
renovate[bot] cffedb2c1f Update go deps (#3071)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-28 19:50:03 -06:00
renovate[bot] 8ab65a3ea8 Update module github.com/livekit/protocol to v1.30.0 (#3211)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-25 21:28:59 -06:00
Raja Subramanian 8cf6cbb826 Structured logging of ParticipantInit (#3279)
* Structured logging of ParticipantInit

* use pointer
2024-12-20 11:12:50 +05:30
Raja Subramanian c8b644934f Update deque and friends. (#3276) 2024-12-20 07:16:14 +05:30
cnderrauber 713e67cd52 Thottle the publisher data channel sending when subscriber is slow (#3255)
* Thottle the publisher data channel sending when subscriber is slow

Avoid the publisher overwhelm the sfu data channel buffer when
the subscriber has lower receive bitrates. It will drop message
if the subscriber is considered too slow to block the entire room.

* Enable nack in mediaengine and disable it in transceiver as need

pion doesn't support per transciver codec configuration, so the nack of this session will be disabled
forever once it is first disabled by a transceiver.
https://github.com/pion/webrtc/pull/2972
2024-12-18 10:51:34 +08:00
dependabot[bot] 1bacbfcbe9 Bump golang.org/x/crypto from 0.29.0 to 0.31.0 (#3260)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.29.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-17 11:08:57 +05:30
Denys Smirnov dc6fe3aae5 Support SIP list filters. (#3240) 2024-12-09 22:57:47 +02:00
cnderrauber c76fb0bcf4 Disable close by dtls to fix migration (#3220)
Pion v4 imports new feature that will close
peerconnection on dtls.close to detects
remote peer closed quickly, it breaks the
session migration.
2024-11-30 09:20:45 +08:00
cnderrauber 3372e6e285 pion v4.0.4 (#3217) 2024-11-29 10:37:12 +08:00
lukasIO 1c940af8c0 Add datastream packet type handling (#3210)
* Add datastream packet type handling

* point to main in protocol

* Revert "point to main in protocol"

This reverts commit 2cc6ed652034036fe9459795b9e67d631f3929bf.

* Update protocol
2024-11-28 12:23:40 +01:00