Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1de2530
quest: claim m1/linger-ffi
kixelated Oct 21, 2026
8e386a9
feat(ffi): finish a broadcast and linger until its media is stale
kixelated Oct 21, 2026
4a3ac21
feat(c): finish a broadcast and keep finished tracks until it ends
kixelated Oct 21, 2026
0a1fecd
feat(py): finish a broadcast; ffi counts the linger from the finish
kixelated Oct 21, 2026
f8d574e
fix(ffi): keep finished raw tracks until the broadcast ends
kixelated Oct 21, 2026
c2f7616
feat(bindings): finish a broadcast in go, kotlin, swift, dart, and c++
kixelated Oct 21, 2026
676807a
Merge remote-tracking branch 'origin/main' into quest/m1/linger-ffi
kixelated Oct 21, 2026
0d69006
fix(c): name moq_publish_finish without a doc link; add compress afte…
kixelated Oct 21, 2026
912cf45
docs: link the migration notes to #6157
kixelated Oct 21, 2026
fadbfd0
Merge remote-tracking branch 'origin/main' into linger-ffi-merge
kixelated Oct 21, 2026
03838b2
fix(ffi): close a broadcast whose finish fails, and keep a raw track …
kixelated Oct 21, 2026
c96b19c
test(ffi): format the repeated-finish test
kixelated Oct 21, 2026
e7b432d
fix(moq-c): a delivered track request accepts after its broadcast closes
kixelated Oct 21, 2026
85f5020
Merge remote-tracking branch 'origin/main' into linger-ffi-merge
kixelated Oct 21, 2026
f77e634
fix(go): a wait on a done context closes the finish
kixelated Oct 21, 2026
8261731
fix(py): a finish wait cancelled before it starts closes the broadcast
kixelated Oct 21, 2026
4a7c803
docs(ffi): note the finish change in the generated packages' migratio…
kixelated Oct 21, 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
5 changes: 5 additions & 0 deletions cpp/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### Finished tracks stay until the broadcast ends (#6157)

A finished track now stays listed, with its catalog rendition and demand, until its broadcast closes or the new `BroadcastProducer::finish` lets go.
Publish a replacement under a new name, and expect a finished track's demand watch to end with the broadcast.

### A claim answers by publishing (#5678)

`OriginProducer::dynamic(prefix)` takes no route, and `OriginDynamic::update` is gone.
Expand Down
12 changes: 12 additions & 0 deletions cpp/moq/test/probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ int main() {
CHECK(!moq::MediaTimebase::init(timebase_owner));
ok(timebase_other->close(), "close timebase other");

// A finished broadcast lingers for its longest max age; closing the handle ends the wait early.
auto finished = ok(moq::BroadcastProducer::init(), "finished broadcast");
moq::TrackInfo aged;
aged.max_age_us = 3600000000;
ok(ok(finished->publish_track("status", aged), "publish aged track")->finish(), "finish aged track");
auto finish = ok(finished->finish(), "broadcast finish");
CHECK(finish->linger_us() == 3600000000);
CHECK(!finished->publish_track("events", {}));
auto lingering = finish->wait();
finish->close();
ok(lingering.get(), "finish wait");

// A synchronous error is a returned value, not an exception.
auto unbound = ok(moq::Server::init({}), "server init");
auto fingerprints = unbound->cert_fingerprints();
Expand Down
5 changes: 5 additions & 0 deletions dart/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### Finished tracks stay until the broadcast ends (#6157)

A finished track now stays listed, with its catalog rendition and demand, until its broadcast closes or the new `BroadcastProducer.finish()` lets go.
Publish a replacement under a new name, and expect a finished track's demand watch to end with the broadcast.

### A claim answers by publishing (#5678)

`origin.dynamic_(prefix:)` takes no route, and `update` is gone.
Expand Down
4 changes: 4 additions & 0 deletions dart/moq/lib/src/aliases.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ typedef BroadcastConsumer = MoqBroadcastConsumer;
/// Receives tracks requested from a dynamically served broadcast.
typedef BroadcastDynamic = MoqBroadcastDynamic;

/// A cleanly ended broadcast, still announced and serving its finished tracks
/// until its linger ends; close it to end the linger early.
typedef BroadcastFinish = MoqBroadcastFinish;

/// The write side of a raw track: append groups of frames.
typedef TrackProducer = MoqTrackProducer;

Expand Down
6 changes: 6 additions & 0 deletions dart/moq/lib/src/durations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ extension TrackInfoDuration on MoqTrackInfo {
maxAgeUs == null ? null : Duration(microseconds: maxAgeUs!);
}

/// Duration view over how long a finished broadcast stays up.
extension BroadcastFinishDuration on MoqBroadcastFinish {
/// The longest max age of the finished tracks the broadcast holds.
Duration get linger => Duration(microseconds: lingerUs());
}

/// Duration view over a raw frame's presentation time.
extension FrameDuration on MoqFrame {
/// Presentation timestamp, or null for an untimed frame.
Expand Down
20 changes: 20 additions & 0 deletions dart/moq/test/moq_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,26 @@ void main() {
second.close();
});

test('a finished broadcast lingers until closed', () async {
final broadcast = BroadcastProducer();
final track = broadcast.publishTrack(
name: 'status',
info: TrackInfo(maxAgeUs: 3600000000),
);
track.finish();
final finish = broadcast.finish();
expect(finish.linger, const Duration(hours: 1));
expect(
() => broadcast.publishTrack(name: 'events', info: null),
throwsA(isA<ClosedMoqException>()),
);
// A Dart future can't be cancelled, so closing is the interrupt: the wait
// ends instead of lingering for an hour.
final wait = finish.wait();
finish.close();
await wait.timeout(timeout);
});

test('microsecond fields read back as Durations', () {
final backoff = Backoff(initialUs: 1000, maxUs: 2000, timeoutUs: 3000);
expect(backoff.initial, const Duration(milliseconds: 1));
Expand Down
6 changes: 6 additions & 0 deletions dart/moq_ffi/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ How to update your code for each breaking change, newest first.

## Unreleased

### Finished tracks stay until the broadcast ends (#6157)

A finished track, raw or media, now stays listed, with its catalog rendition and demand, until its broadcast closes or the new `MoqBroadcastProducer.finish()` lets go, instead of unlisting when its producer finishes or is released.
Publish a replacement under a new name, and expect a finished track's demand watch to end with the broadcast.
Regenerate the bindings for the new `MoqBroadcastFinish` and the changed checksums.

### Regenerate the matching bindings

Documentation on `MoqAudioProducer::write` and `finish` changes their UniFFI metadata checksums.
Expand Down
Loading
Loading