Commit Graph

6 Commits

Author SHA1 Message Date
a f4d632df2c feat: create capture subscription api to support more transports (#699)
* feat: introduce encoded media subscriptions

* chore: preserve sample field comments

* perf: reduce encoded sample dispatch copies

* docs: define encoded sample buffer ownership

* fix: avoid pipeline recreation errors

Reuse pipelines started by a new subscription during resize.

* fix: synchronize stream bitrate state

Protect bitrate updates, reads, and resets with one mutex.

* simplify

* group stream sink fields

* fix: remove unnecessary blank line in removeSubscription method

* remove defensive check

* remove noop

---------

Co-authored-by: Miroslav Šedivý <sedivy.miro@gmail.com>
2026-09-24 10:58:39 +02:00
Miroslav Šedivý 827944349b fix: reduce audio jitter buffer latency (#673)
* fix: reduce audio jitter buffer latency

- Release listenersMu before dispatching samples to listeners
- Buffer Track.sample channel (size 2) with non-blocking WriteSample
- Buffer pipeline.sample channel (size 4) to unblock GStreamer thread
- Add leaky=downstream max-size-buffers=5 to audio queue to prevent burst accumulation
- Set sync=false on appsink to deliver buffers immediately without clock wait

These changes break the backpressure chain that caused the GStreamer
streaming thread to stall. When the Go scheduler has a hiccup, buffered
frames were delivered in a burst, causing the browser audio jitter buffer
to grow to ~10 seconds over time.

Fixes: #598

* fix: log message when dropping samples due to full track channel
2026-08-04 14:59:11 +02:00
Miroslav Šedivý 2c124c506e Upgrade go dependencies (#644)
* update pion WebRTC from v3 to v4.

* update mapstructure dependency to use go-viper version.

* update go-chi dependency to v5.
2026-04-25 15:20:43 +02:00
Miroslav Šedivý 51bbad7650 rename package to github name. 2025-03-26 23:51:19 +01:00
Miroslav Šedivý 15e805c9b2 rename package. 2024-09-06 23:26:29 +02:00
Miroslav Šedivý cfb423b13d move server to server directory. 2024-09-06 22:56:24 +02:00