Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions dart/moq/test/moq_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,16 @@ void main() {
expect(() => catalog.finish(), throwsA(isA<ClosedMoqException>()));
});

test('a broadcast consumer\'s closed() resolves once it closes', () async {
final broadcast = BroadcastProducer();
var resolved = false;
final closed = broadcast.consume().closed().then((_) => resolved = true);
await Future<void>.delayed(const Duration(milliseconds: 10));
expect(resolved, isFalse, reason: 'resolved while the broadcast is live');
broadcast.close();
await closed.timeout(timeout);
});

test('timestamps round-trip exactly at the track scale', () async {
final broadcast = BroadcastProducer();
final track = broadcast.publishTrack(
Expand Down
11 changes: 11 additions & 0 deletions kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,17 @@ class SmokeTest {
}
}

@Test
fun `a broadcast consumer's closed returns once the broadcast ends`() = runTest {
BroadcastProducer().use { broadcast ->
broadcast.consume().use { consumer ->
val closed = async { consumer.closed() }
broadcast.end()
closed.await()
}
}
}

@Test
fun `broadcast updates shared video properties`() {
BroadcastProducer().use { broadcast ->
Expand Down
1 change: 0 additions & 1 deletion quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ lite-07; bitrate enforcement is not part of this release.
- [Audio's Latest start reaches back](/quest/m2/audio-latest-reach-back.md) - moq_audio's start covers min plus warmup like other consumers
- [moq-lite tails count drops](/quest/m2/lite-tail-drop-count.md) - SUBSCRIBE_DROP accounting replaces the session-tail grace from lite-05
- [Re-run the SPS fuzzer on h264-reader](/quest/m2/sps-fuzz-h264-reader.md) - the H.264 SPS overflow is rechecked on the new parser
- [Bindings see a broadcast end](/quest/m2/binding-broadcast-end.md) - `MoqBroadcastConsumer` exposes the close, and a moq-transport run end is a protocol error
- [Audio track changes are gapless](/quest/m2/gapless-audio-switch.md) - no silence beyond a frame on audio format or rendition changes, enforced by media QA
- [PCM encodes in one pass](/quest/m2/pcm-bulk-encode.md) - the PCM encoder converts a frame in bulk instead of one sample at a time
- [We own our WebRTC stack](/quest/m2/webrtc/README.md) - moq-rtc becomes moq-webrtc with moq-ice, the data-channel transport, and a vendored, trimmed str0m/dimpl/is/sctp-proto
Expand Down
33 changes: 0 additions & 33 deletions quest/m2/binding-broadcast-end.md

This file was deleted.

8 changes: 8 additions & 0 deletions swift/Tests/MoqTests/SmokeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,14 @@ final class SmokeTests: XCTestCase {
XCTAssertThrowsError(try catalog.finish())
}

func testBroadcastConsumerClosedReturnsOnClose() async throws {
let broadcast = try BroadcastProducer()
let consumer = try broadcast.consume()
let closed = Task { try await consumer.closed() }
try broadcast.close()
try await closed.value
}

func testVideoHintsReachMediaPublishApi() throws {
let broadcast = try BroadcastProducer()
let hint = Media.VideoHint(
Expand Down