Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ff1a485
chore(quest): claim quest/m1/api-audit/lifecycle.md
kixelated Oct 25, 2026
ad8d92d
chore(quest): claim quest/m1/api-audit/net-names.md
kixelated Oct 25, 2026
369722b
refactor(net)!: stats::Message, stats::Totals, transport::Metrics
kixelated Oct 25, 2026
3e88354
refactor(net)!: fold track::Producer::close into abort, rename end to…
kixelated Oct 25, 2026
dce039a
refactor(net)!: Session::allocator and Client::with_allocator
kixelated Oct 25, 2026
a61533a
refactor(net)!: Reservation::consume and JS Reservation.rate
kixelated Oct 25, 2026
b353951
feat(net)!: group closed() settles on finish; abort after finish only…
kixelated Oct 25, 2026
94994b2
refactor(net)!: group::Demand says wanted
kixelated Oct 25, 2026
16d74ae
refactor(net)!: auth::Credential in Rust, JS, and the FFI
kixelated Oct 25, 2026
0963860
refactor(net)!: track::Consumer::info returns Pending<Resolving>
kixelated Oct 25, 2026
ba5721c
feat(net)!: track closed() returns the outcome and settles on a reach…
kixelated Oct 25, 2026
5154cc0
refactor(net)!: JS Track.Producer.createGroup(sequence), as in Rust
kixelated Oct 25, 2026
314f20a
feat(net)!: split JS Group.Producer.close into finish and abort
kixelated Oct 25, 2026
8d7a193
refactor(net)!: JS connection allocator, and migration notes
kixelated Oct 25, 2026
88e981b
chore(quest): finish quest/m1/api-audit/net-names.md
kixelated Oct 25, 2026
35fa0b9
style: format the renames
kixelated Oct 25, 2026
d882138
test: drop unused Group imports after createGroup
kixelated Oct 25, 2026
77e3f71
test: drop unused GroupProducer import in interop
kixelated Oct 25, 2026
284515e
chore: drop unused Group import in hang bench
kixelated Oct 25, 2026
ec418e1
feat(net)!: split JS Track.Producer.close into finish, abort, and close
kixelated Oct 25, 2026
66661b7
feat(net)!: JS Lister.closed, unused rejects on close, readers drop e…
kixelated Oct 25, 2026
7349c26
feat(net)!: JS group Consumer.close releases only its handle
kixelated Oct 25, 2026
8553cad
docs(net): migration notes and JS docs for the lifecycle vocabulary
kixelated Oct 25, 2026
59da867
refactor(ffi)!: MoqAllocator and allocator() in the bindings and C ABI
kixelated Oct 25, 2026
1d1e236
fix(net): finish the remaining callers and narrow the quest
kixelated Oct 25, 2026
0cd3e64
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Oct 25, 2026
193eeca
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Oct 25, 2026
f4d691d
refactor(net)!: a reservation's snapshot is rate() everywhere
kixelated Oct 25, 2026
657d2a9
chore(net): regenerate the @moq/net API reports
kixelated Oct 25, 2026
4620b6c
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Oct 25, 2026
46bd7e4
feat(net)!: consumer close releases only its handle for announcements…
kixelated Oct 25, 2026
08854f9
test(e2ee): observe a consumer's release on a session broadcast
kixelated Oct 25, 2026
cc16ff9
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Oct 25, 2026
b91d74b
fix(net): settle a track's outcome after its groups, and end a releas…
kixelated Oct 25, 2026
f897932
fix(net): count a received end's tail before settling, and list an op…
kixelated Oct 25, 2026
9420bff
feat(net)!: announcements say wanted, and the origin closes what it r…
kixelated Oct 25, 2026
f2029fb
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Oct 25, 2026
1497ca5
chore(net): regenerate the API report and format
kixelated Oct 25, 2026
2c9e1a1
test(net): abort with the lifecycle verb in a resume test from main
kixelated Oct 25, 2026
8d896d6
fix(net): a released shared group consumer reads nothing more
kixelated Oct 25, 2026
29792cf
fix(net): a settled track end is final
kixelated Oct 25, 2026
c70f314
fix(net): a settled end keeps its clean outcome in JS too
kixelated Oct 25, 2026
2bd905d
Merge origin/main into quest/m1/api-audit/lifecycle
kixelated Oct 25, 2026
6587b77
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/ne…
kixelated Oct 25, 2026
3b71e28
fix(net): rename main's new auth::Auth uses to Credential
kixelated Oct 25, 2026
757a133
fix(net): keep the lifecycle docs and helpers clean in the no-async s…
kixelated Oct 25, 2026
b8bf0fb
fix(net): a request whose readers left blocks an overlapping one
kixelated Oct 25, 2026
f7bdfd2
chore(dart): regenerate moq_ffi with the negative-duration patch
kixelated Oct 25, 2026
cafce55
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/ne…
kixelated Oct 25, 2026
beff2e0
fix(net): a track's closed() sees a group that finishes while it scans
kixelated Oct 25, 2026
b41e668
Merge origin/main into quest/m1/api-audit/lifecycle
kixelated Oct 26, 2026
e2aa1c1
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/ne…
kixelated Oct 26, 2026
43a6876
style(net): sort the tokens.ts imports
kixelated Oct 26, 2026
abc3b97
test(net): the SUBSCRIPTION_ENDED tail test reads the missing end thr…
kixelated Oct 26, 2026
16ca858
Merge remote-tracking branch 'origin/main' into net-names-6751
kixelated Oct 26, 2026
ac6e0c6
Merge remote-tracking branch 'origin/main' into pr-6750
kixelated Oct 26, 2026
819ba54
Merge origin/main into quest/m1/api-audit/lifecycle
kixelated Oct 26, 2026
4b0bfee
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 26, 2026
5974aad
Merge origin/main into quest/m1/api-audit/lifecycle
kixelated Oct 26, 2026
04afdfb
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 26, 2026
fd1cc05
fix(net): a released shared group consumer ignores a later abort
kixelated Oct 26, 2026
b4f093a
fix(net): release a received copy without declaring an end the publis…
kixelated Oct 26, 2026
dc5da75
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 26, 2026
174695c
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/li…
kixelated Oct 27, 2026
25c6fd9
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 27, 2026
fc8b671
test(net): read the group without async in abort_after_finish_keeps_t…
kixelated Oct 27, 2026
d250ed4
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/li…
kixelated Oct 27, 2026
78697ce
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/li…
kixelated Oct 27, 2026
9a856aa
fix(net): settle a track's outcome once the cache evicts its last ope…
kixelated Oct 27, 2026
6120267
Merge remote-tracking branch 'origin/main' into quest/m1/api-audit/li…
kixelated Oct 27, 2026
3f1a00c
fix(flate): finish the decoder bench's oversized group and track
kixelated Oct 27, 2026
fb45912
fix(net): latch a track's clean outcome once closed() reports it
kixelated Oct 27, 2026
e575bcc
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 27, 2026
3d1312d
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 27, 2026
d5f247a
Merge #6750 (one lifecycle vocabulary) into quest/m1/api-audit/net-names
kixelated Oct 27, 2026
133c1a5
Merge origin/main into quest/m1/api-audit/net-names
kixelated Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions c/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ How to update your code for each breaking change, newest first.

The hand-written crate never published as moq-c: a libmoq 0.6 user applies these entries before moving to the generated API.

### Session allocator ([#6751](https://github.com/moq-dev/moq/pull/6751))

`moq_session_bandwidth` is `moq_session_allocator`, `moq_bandwidth_reserve` is `moq_allocator_reserve`, and `moq_bandwidth_close` is `moq_allocator_close`, matching `moq_net::bandwidth::Allocator`. `moq_reservation_grant` is `moq_reservation_rate`, matching `moq_net::bandwidth::Reservation::rate()`. Signatures are unchanged. The receive estimate keeps its names (`moq_session_recv_bandwidth`, `moq_bandwidth_consumer_*`).

### Sessions report a lifecycle snapshot

`moq_session_connect` and `moq_session_request_accept` take a `moq_state_callback` instead of a `moq_status_callback`: `void on_state(void *user_data, const moq_connection_state *state)`.
Expand Down
10 changes: 5 additions & 5 deletions cpp/obs/src/moq-output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void MoQOutput::OnConnect(const std::shared_ptr<Attempt> &current, moq::expected
current->session = *result;
{
std::lock_guard<std::mutex> lock(media_mutex);
bandwidth = current->session->bandwidth();
allocator = current->session->allocator();
}
{
std::lock_guard<std::mutex> lock(mutex);
Expand Down Expand Up @@ -399,7 +399,7 @@ void MoQOutput::Reset()
track.producer->finish();
}
audio_tracks.clear();
bandwidth.reset();
allocator.reset();

// Close the broadcast so the origin retracts it immediately; Start()
// creates a fresh one on restart.
Expand Down Expand Up @@ -677,7 +677,7 @@ void MoQOutput::VideoData(struct encoder_packet *packet)
// Read before the frame is written, so a retune lands on the encoder's next
// frame. obs_encoder_update only flags an active encoder for its own thread.
if (track.rate && track.reservation) {
if (auto next = track.rate->Update(track.reservation->grant(), MoQRate::Clock::now()))
if (auto next = track.rate->Update(track.reservation->rate(), MoQRate::Clock::now()))
SetBitrate(encoder, *next);
}

Expand All @@ -698,15 +698,15 @@ void MoQOutput::VideoData(struct encoder_packet *packet)
// NOTE: Caller must hold media_mutex.
void MoQOutput::Reserve(Track &track)
{
if (track.reservation || !bandwidth || track.bitrate_bps == 0)
if (track.reservation || !allocator || track.bitrate_bps == 0)
return;
auto demand = track.producer->demand();
if (!demand) {
LOG_ERROR("Failed to reserve bandwidth: %s", demand.error().to_string().c_str());
track.bitrate_bps = 0;
return;
}
track.reservation = bandwidth->reserve(*demand, track.bitrate_bps);
track.reservation = allocator->reserve(*demand, track.bitrate_bps);
}

// NOTE: Caller must hold media_mutex.
Expand Down
2 changes: 1 addition & 1 deletion cpp/obs/src/moq-output.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class MoQOutput {
std::map<obs_encoder_t *, Track> audio_tracks;
// The session's allocator once it connects. It survives reconnects: grants
// read empty while disconnected and resume on the next connection.
std::shared_ptr<moq::Bandwidth> bandwidth;
std::shared_ptr<moq::Allocator> allocator;

// `closed()` of retired sessions still draining, which the destructor waits
// out. Guarded by signal_mutex.
Expand Down
4 changes: 4 additions & 0 deletions dart/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `Allocator` ([#6751](https://github.com/moq-dev/moq/pull/6751))

`Bandwidth` is `Allocator`, `bandwidth()` is `allocator()`, and `Reservation.grant()` is `rate()`. The producers' `bandwidth` option keeps its name.

### Decoders read gaps and ends

`audio.Consumer.next()` and `video.Consumer.next()` return a `Read` instead of a frame. Take `read.frame` from a `ReadFrame` where you used the frame; `ReadGap` marks lost media and `ReadEnd` where the publisher stopped its encoder, and what follows either does not continue what came before.
Expand Down
4 changes: 2 additions & 2 deletions dart/moq/lib/src/aliases.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ typedef FetchGroupOptions = MoqFetchGroupOptions;
typedef TrackInfo = MoqTrackInfo;

/// Divides one connection's send estimate among the tracks sharing it.
typedef Bandwidth = MoqBandwidth;
typedef Allocator = MoqAllocator;

/// An owned bandwidth estimate; release it to stop receive PROBE demand.
typedef BandwidthConsumer = MoqBandwidthConsumer;

/// One track's standing claim on a [Bandwidth].
/// One track's standing claim on an [Allocator].
typedef Reservation = MoqReservation;

/// A snapshot of transport connection statistics.
Expand Down
4 changes: 2 additions & 2 deletions dart/moq/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ final class Moq {

/// The session's bandwidth allocator.
///
/// Every call returns a handle to the same registry. [Bandwidth.reserve]
/// Every call returns a handle to the same registry. [Allocator.reserve]
/// a share for an app-owned encoder; dropping the [Reservation] hands
/// the room back.
Bandwidth bandwidth() => session.bandwidth();
Allocator allocator() => session.allocator();

/// Follow the grant the peer gave this session.
///
Expand Down
2 changes: 1 addition & 1 deletion dart/moq/test/moq_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void main() {
),
).timeout(timeout);
final serverSession = await accepted;
expect(client.bandwidth(), isA<MoqBandwidth>());
expect(client.allocator(), isA<MoqAllocator>());

final announcement = client.announced().updates().firstWhere(
(event) => event is AnnounceEventStart,
Expand Down
Loading
Loading