Commit Graph

731 Commits

Author SHA1 Message Date
renovate[bot]
24dd563dde Update github workflows
Generated by renovateBot
2026-04-22 03:16:41 +00:00
He Chen
fe7af253c4 TEL-522: JoinWithToken accepts a context to be cancelled or timed out early (#886)
* TEL-522: JoinWithToken accepts a context to be cancelled or timed out early

* add JoinWithContextAndToken
2026-04-21 20:16:03 -07:00
Andrew Nitu
677c01ec5a bump version to 2.16.2 (#885) v2.16.2 2026-04-14 09:33:16 -07:00
renovate[bot]
e74087ae45 Update go deps (#814)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-12 13:00:18 -07:00
David Zhao
a23b81de61 chore: pin GHA by commit, switch to golangci-lint (#884)
* chore: pin GHA by commit, switch to golangci-lint

* fix
2026-04-12 12:53:40 -07:00
Dan McFaul
1a80e8d805 support byoc for cloud agents (#875) 2026-04-12 13:02:38 -06:00
Andrew Nitu
36135a79a9 fix bug where projects with "localhost" in the URL are misrouted (#882)
* z

* test
2026-04-10 09:19:18 -07:00
cnderrauber
520301008e Skip nil backupcodec when unpublishing track (#883)
Fix #861
2026-04-09 11:24:13 +08:00
Anunay Maheshwari
5d1134a5dc feat(PCMLocalTrack): add option to grab track and hw stats (#879)
* feat(PCMLocalTrack): add option to grab track and hw stats

* cleanup
2026-04-08 13:48:02 +05:30
Raja Subramanian
0e768d89e5 Option to provide logger in ConnectOption. (#876)
Allows logging with proper context during connect.
2026-04-07 10:29:38 +05:30
Théo Monnom
dbb96cc2c4 Add AgentSimulationClient and CreateSourceZip (#874) 2026-04-03 09:30:06 -07:00
Alex
65a5784516 Bumping media-sdk (#872) 2026-04-01 20:55:31 -07:00
Milos Pesic
50e969e296 Widen one-shot drift correction media live window to 2x max delay (#871)
Relax the upper bound of the one-shot drift correction sanity check from deadline + maxMediaRunningTimeDelay to deadline + 2*maxMediaRunningTimeDelay. This prevents rejecting corrections where the adjusted PTS is only slightly ahead of the media time due to jitter.
2026-04-01 18:11:08 +02:00
Sam P
06b4e89772 Added WithDTLSEllipticCurves ConnectOption for FIPS (#869) 2026-03-30 14:32:50 +08:00
Milos Pesic
fbcb73e74a Fix data race contributing to wrong value of ended_at (#868)
* Fix data race contributing to wrong value of ended_at

Fix `endedAt == startedAt` (zero duration) when all tracks are removed before `Synchronizer.End()` is called.

This is a race in the egress shutdown path: track workers call `RemoveTrack` (which deletes from `p.tracks`) before the pipeline calls `End()`. When `End()` iterates participants to find `maxPTS`, the tracks map is already empty, so `maxPTS = 0` and `endedAt = startedAt`.

The bug was latent before the duration inflation fix but masked by `time.Now()` fallback.

* extract LastPTSAdjusted for better encapsulation

* adding LastPTSAdjusted
2026-03-25 22:44:28 +01:00
Milos Pesic
3302552d1e Synchronizer: add explicit sender report sync modes and one-shot drift correction (#865)
This change introduces an explicit sender report sync mode model in the synchronizer and adds a new one-shot drift correction path for mixer-oriented pipelines.

The main motivation is SIP silence suppression (which frequently doesn't get signalled properly) drift in room composite recordings. In that scenario, RTP timestamps can remain continuous while wall clock time advances much faster, which means the existing silence gap handling does not trigger. Over time, the audio track falls behind the mixer window and samples get dropped before the late correction path kicks in.
2026-03-25 14:13:48 +01:00
Milos Pesic
7f973aa87e Adjust logging level for high drift SRs (#867) 2026-03-24 19:38:19 +01:00
David Zhao
f0ef7f769e update protocol dep, version bump to 2.16.1 (#864) v2.16.1 2026-03-22 22:01:13 -07:00
renovate[bot]
8b80d0c35a chore(deps): update magefile/mage-action action to v4 (#863)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-22 21:56:09 -07:00
David Zhao
7cd375cedd improve connection retries. (#862)
- exposing connectTimeout (for a single attempt)
- reducing delay when trying subsequent regions (it used to take 1s)
2026-03-22 19:40:44 -07:00
elizabeth-muirhead-simplisafe
a8ed4bd66f fix: additional act support (#858)
* fix: additional act support

* fix: address comments

* chore: update comment
2026-03-16 20:27:24 +05:30
Paul Wells
b09b583790 Rename log field pID to participantID (#860)
* Rename log field "pID" to "participantID" for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* tidy

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:30:19 -07:00
Milos Pesic
4493ba0c3c Fix duration inflation caused by late-subscribing tracks (#859)
End() previously computed endedAt as wallclock + max PTS offset, which included the late-subscription base offset (e.g. +44s for a track that joined 44s late), inflating reported duration far beyond actual recording time. This replaces the offset-based computation with the actual max adjusted PTS reached by any track, making both endedAt and the drain ceiling directly reflect the media timeline.
2026-03-13 22:20:54 +01:00
David Chen
637634754a bump version to 2.16.0 (#857) v2.16.0 2026-03-09 21:09:04 -07:00
David Chen
d348d7cd98 Handle H265 encoders that produce multi-slice IDR (#844) 2026-03-09 20:53:41 -07:00
Tobias Fried
e5311e90a8 chore(release): bump to v2.15.0 for cli (#856) v2.15.0 2026-03-05 13:02:44 -07:00
Tobias Fried
7f4d29ddc6 chore(release): bump to v2.14.0 (#855) v2.14.0 2026-03-04 13:17:47 -07:00
Anunay Maheshwari
b575718092 feat(track): add init method with livekit.Codec (#854) 2026-03-04 19:48:37 +05:30
Benjamin Pracht
12bbb5b572 Remove direct usage of golang.org/x/exp (#852) 2026-02-27 10:38:15 -08:00
Neil Dwyer
77b4264bca Fix broken private link client (#850) 2026-02-23 09:28:16 -08:00
shreyasj-livekit
8b9f855080 add health/provision status related methods (#847) 2026-02-11 20:39:07 -05:00
shreyasj-livekit
07b747cced Add private link methods in AgentClient (#845) 2026-02-11 18:12:35 -05:00
Benjamin Pracht
ca8b66238d Remove WithPreJitterBufferReceiveTimeEnabled and always enable it (#843) 2026-02-04 17:03:18 -08:00
Milos Pesic
176dbba798 Syncrhonizer tidying up (#842)
Changes aimed to reduce duplication a bit. Extracted 2 functions which are relatively independent, wanted to do more but that requires either having functions with a lot of params of some sort of context which doesn't make it really easier to read (high coupling with caller).
Smaller tidying up changes: replacing mono with time and interface with any
2026-02-04 15:16:46 +01:00
Milos Pesic
2ec7166f46 Fix for deadlock on inverse locking order (#841)
- Fix potential deadlock between Synchronizer.End() and TrackSynchronizer.GetPTS()
  caused by inverse lock ordering
  - getPTSWithoutRebase() and getPTSWithRebase() now release the TrackSynchronizer lock
  before calling into Synchronizer methods

  Problem

  A deadlock could occur when two goroutines acquired locks in inverse order:
  Thread A (End()): Synchronizer.Lock() x
  Thread B (GetPTS()):
  ────────────────────────────────────────
  Thread A (End()):
  Thread B (GetPTS()): TrackSynchronizer.Lock() x
  ────────────────────────────────────────
  Thread A (End()): → p.getMaxOffset() → t.Lock() BLOCKED
  Thread B (GetPTS()):
  ────────────────────────────────────────
  Thread A (End()):
  Thread B (GetPTS()): → getExternalMediaDeadline() → s.RLock() BLOCKED
  Lock order in End(): Synchronizer → participantSynchronizer → TrackSynchronizer

  Lock order in GetPTS(): TrackSynchronizer → Synchronizer (inverse)

Going forward we need to avoid invocking any actions on syncrhonizer from the track synchronizer while holding its lock. Following that rule will ensure no lock inversion deadlock could happen.
2026-02-04 11:05:40 +01:00
Steve Yoon
cc10e20fa2 Exclude cloud agent files in subdir (#840)
* exclude cloud agent files in subdir

* bump up version
v2.13.3
2026-02-03 15:38:24 -05:00
David Chen
575bf3d381 bump version to 2.13.2 (#838) v2.13.2 2026-01-28 09:55:58 -08:00
David Chen
9d1c5585bf after parsing H264 SEI NAL, discard to avoid breaking certain decoders (#837)
* after parsing H264 SEI NAL, discard to avoid breaking certain decoders

* remove empty line
2026-01-27 23:25:27 -08:00
David Chen
073b9ce553 Parse H265 SEI for timestamp metadata (#831)
* add parser for H265 SEI to extract timestamp metadata to attach custom trailer

* adding h265 sei parser

* add unit test for h265 timestamp parser

* clear H265 SEI NALs after parsing timestamp
2026-01-27 23:24:59 -08:00
cnderrauber
40907434d5 Support av1 publishing (#836)
* Support av1 publishing

* use full codec string

* Update readersampleprovider.go

* Update readersampleprovider.go

---------

Co-authored-by: Paul Wells <paulwe@gmail.com>
2026-01-27 18:58:13 +08:00
Dan McFaul
358778e5e5 fixing cloud agents log streaming early exit based on actual logs being received (#834)
* fixing log streaming early exit based on real logs being received

* feedback
2026-01-22 17:29:07 -07:00
Anunay Maheshwari
49e93af45d refine withCodecs API (#832)
* refine withCodecs API

* deps
2026-01-20 19:20:46 +05:30
David Chen
aad3a047d2 Add User Timestamp trailer support (#825)
- Add parser for h264 SEI NALs for timestamp metadata
- Add option to write custom timestamp trailer on h264 frames
2026-01-16 17:12:05 -08:00
Milos Pesic
8c6faa41e2 Expose WithCodecs (#829)
* Expose with codecs

* udpdate test
2026-01-16 21:56:33 +01:00
Benjamin Pracht
d2e7028eed wav support (#826)
* wav support (vibe coded variant for testing)

* wav reader unvibing (#827)

simplifying wav reader implementation

---------

Co-authored-by: Milos Pesic <milos.pesic@livekit.io>
2026-01-16 17:31:19 +01:00
Raja Subramanian
465d492b14 minor log key change (#824) 2026-01-09 13:27:55 +05:30
Benjamin Pracht
b86b95f0c7 Update README to fix error stating that DelereRoom takes a roomID as argument (#823) 2026-01-08 10:04:39 -08:00
Terran Vigil
fa51107ff0 Pass Interceptors to Subscriber PeerConnection for Stats Collection (#817)
* pass interceptors to subscriber (required for stats interceptor)

* Update engine.go

* allow custom interceptors to be added without losing default interceptors

* go fmt
2026-01-07 16:19:27 +05:30
Raja Subramanian
9ea8d56a5b Do not log duplicate sender report drop. (#820)
It is possible to see duplicate sender report at track synchronizer
because of how RTCP compound packets are handled. pion/srtp will forward
the full compound RTCP packet to all the read streams. The synchronizer
fields RTCP packets for all SSRCs it is managing, i. e. all the tracks
it is trying to synchronize. So, it will receive the same compound RTCP
packet once per SSRC contained in the compound packet.
2025-12-29 11:35:03 +05:30
Anunay Maheshwari
b618085a42 chore(release): v2.13.1 (#819) v2.13.1 2025-12-23 14:42:42 +05:30