diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5e0b6580..fed3b9a4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -26,6 +26,13 @@ jobs: timeout-minutes: 60 env: NEXTEST_PROFILE: ci + # No auto maintenance in this throwaway checkout. Checkout disables gc + # only in the superproject, so the moq submodule's fetch leaves a + # detached maintenance that rewrites its shallow file mid-unshallow, + # failing the pin check. + GIT_CONFIG_COUNT: 1 + GIT_CONFIG_KEY_0: maintenance.auto + GIT_CONFIG_VALUE_0: false steps: - name: Checkout diff --git a/Cargo.lock b/Cargo.lock index e0e04049..7afb2f29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,7 +371,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.61.2", + "windows-sys 0.59.0", "x11rb 0.13.2", ] @@ -422,7 +422,6 @@ dependencies = [ "getrandom 0.4.3", "serde", "serde_repr", - "tokio", "zbus", ] @@ -1744,14 +1743,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 3.0.6", + "syn 2.0.119", ] [[package]] name = "ctutils" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261af4dc7a06ea8a527a8717d8cbba3417530d6ea14e1edb3de6b67806be474f" +checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a" dependencies = [ "cmov", ] @@ -2489,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4590,7 +4589,6 @@ dependencies = [ name = "moq-mux" version = "0.10.11" dependencies = [ - "anyhow", "base64 0.23.1", "bitstream-io", "bytes", @@ -4671,6 +4669,7 @@ dependencies = [ "lru-slab", "moq-congestion", "moq-crypto", + "qlog", "rand", "rind", "rustc-hash 2.1.3", @@ -5201,9 +5200,9 @@ dependencies = [ [[package]] name = "notify" -version = "8.2.1" +version = "8.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f812702fbc75d35416d3f884e04925be7e9498f4eceea2e24ba34559284674" +checksum = "c41a04a5f59df9322cc657286dd2d79f90816119b22c5f847607c850110205ab" dependencies = [ "bitflags 2.13.2", "inotify", @@ -5248,7 +5247,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6548,6 +6547,18 @@ version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" +[[package]] +name = "qlog" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a2a344e91e2b69996227f8cbc7c7a37b29498d8e7ea5fe394170a55fb31c381" +dependencies = [ + "humantime", + "serde", + "serde_json", + "serde_with", +] + [[package]] name = "qmux" version = "0.7.0" @@ -6962,9 +6973,9 @@ dependencies = [ [[package]] name = "rind" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1b559e7ba7aa39bc4aa9b581dd2254919b3434d50669898bb8c8e7b154cfb8" +checksum = "4e056ace5683dfa2e78b0c3b73cbb80ceb08496a3d537a4bfeeb6e16504270d5" dependencies = [ "cfg-if", "curve25519-dalek", @@ -6981,9 +6992,9 @@ dependencies = [ [[package]] name = "rind-jsonwebtoken" -version = "11.0.2" +version = "11.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd34e9d4695a1a34a4d8fc31d3db5acda9a24cfd2ca90ffbd36f7c62dc4bb7eb" +checksum = "09e4e08d1d342927a63a51c45bb2e44ebbc11da61cc67d7cb89c2c7a50c31cf8" dependencies = [ "jsonwebtoken", "pkcs1 0.7.5", @@ -6992,9 +7003,9 @@ dependencies = [ [[package]] name = "rind-rcgen" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c29833453b6f7def587d905c234d65e9172045504b77300084614d5df23dfdf" +checksum = "39643eda229e1b63a8150a0687bcb946f1d252ffda8fdc7959e5b4bb936af45b" dependencies = [ "rcgen", "rind", @@ -7004,9 +7015,9 @@ dependencies = [ [[package]] name = "rind-rustls" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f91c7ed15f653d52782f482dbea8d2ec350b49ee88a911660acf539e7cf6752" +checksum = "91231b092d302751759d46e21a2a710371b6dddf9e9ec333ee795a2ce52dbddd" dependencies = [ "rind", "rustls", @@ -7171,7 +7182,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7228,7 +7239,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7477,6 +7488,8 @@ version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ + "foldhash", + "indexmap 2.14.2", "itoa", "memchr", "serde", @@ -8407,10 +8420,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix 1.1.6", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -9299,9 +9312,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.29.1" +version = "1.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a06f08a856b009bc7bbaf7d3e79808595d032dd19074c0c2ef26e49e03e6bdc" +checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -9950,7 +9963,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/bun.lock b/bun.lock index 13593ec8..75ea1ba1 100644 --- a/bun.lock +++ b/bun.lock @@ -142,12 +142,12 @@ "@moq/json": "workspace:^", "@moq/net": "workspace:^", "@moq/signals": "workspace:^", - "@moq/ui": "workspace:^", "@moq/video": "workspace:^", "mediabunny": "^1.65.2", }, "devDependencies": { "@moq/libav": "workspace:^", + "@moq/ui": "workspace:^", "@types/audioworklet": "^0.0.100", "@types/bun": "^1.4.4", "@typescript/lib-dom": "npm:@types/web@^0.0.358", @@ -216,7 +216,7 @@ }, "moq/js/ui": { "name": "@moq/ui", - "version": "0.1.0", + "version": "0.0.0", "dependencies": { "@moq/signals": "workspace:^", }, @@ -250,12 +250,12 @@ "@moq/msf": "workspace:^", "@moq/net": "workspace:^", "@moq/signals": "workspace:^", - "@moq/ui": "workspace:^", "@moq/video": "workspace:^", "media-captions": "0.0.18", }, "devDependencies": { "@moq/libav": "workspace:^", + "@moq/ui": "workspace:^", "@types/audioworklet": "^0.0.100", "@types/bun": "^1.4.4", "@typescript/lib-dom": "npm:@types/web@^0.0.358", diff --git a/moq b/moq index 6c726f45..81e43217 160000 --- a/moq +++ b/moq @@ -1 +1 @@ -Subproject commit 6c726f455802564e6434078f35d807d38bdfdd4f +Subproject commit 81e43217c85c310bcd3e1424ab0d437008390d45 diff --git a/quest/m0/pin-moq-tip.md b/quest/m0/pin-moq-tip.md new file mode 100644 index 00000000..a9c95ad2 --- /dev/null +++ b/quest/m0/pin-moq-tip.md @@ -0,0 +1,45 @@ +# [M] The studio catches up to moq's main + +## Goal + +The `moq` submodule points at moq's current `main`, past +[moq-dev/moq#8931](https://github.com/moq-dev/moq/pull/8931), with the +studio building on it: the health grade and failover keep working, through +public moq APIs rather than a workaround. + +## Plan + +Decided 2026-11-18 (maintainer, on +[moq-dev/studio#208](https://github.com/moq-dev/studio/pull/208)): ✅ land +#208's pin at `81e43217c` and catch up to the tip here (rejected: holding +#208 for the tip). + +Once the wait clears, run `just upgrade-moq` in its own PR and absorb the +tip's breaks, as tried on #208: + +- `encode::Producer` became `encode::Publisher` + ([moq-dev/moq#8964](https://github.com/moq-dev/moq/pull/8964)). +- `Info::with_refresh` became a `Refresh` + ([moq-dev/moq#9054](https://github.com/moq-dev/moq/pull/9054)), so + `ladder::Joins` is rewritten on `Demand::poll_refresh`. +- Route `Preference` became `Priority`, `Key::to_public` became `public`, and + `Demand::wanted` became a bool. +- `Stream::check_failover` (`rs/moq-studio/src/stream.rs`) moves to moq's + public `lite::Version` instance query, and the health grade + (`health.rs`, `engine/air.rs`, `setup.rs`, `fx.rs`) to the republished + `hang::health`. + +Matching the version string instead of the instance query is rejected: it +hard-codes `moq-lite-07-wip`. + +## Waiting + +- moq-dev/moq: `hang::health` is public again, as + [Client health in use](https://github.com/moq-dev/moq/blob/main/quest/m3/stats/health-consumers.md) + plans ([moq-dev/moq#8956](https://github.com/moq-dev/moq/pull/8956) made it + private). Check: `rs/hang/src/lib.rs` on moq's `main` exports `health`. +- moq-dev/moq: a public way to ask whether a `lite::Version` carries + instances ([moq-dev/moq#8931](https://github.com/moq-dev/moq/pull/8931) made + `has_instance` crate-private). Its quest is pending planning in moq's m1, so + it does not gate moq's 0.22.0 cut. Check: moq's `main` has a public query + `Stream::check_failover` can call. diff --git a/rs/moq-scene/src/publish.rs b/rs/moq-scene/src/publish.rs index 622f27e1..a270b50e 100644 --- a/rs/moq-scene/src/publish.rs +++ b/rs/moq-scene/src/publish.rs @@ -565,7 +565,7 @@ async fn copy( // The group ends at what it holds, where the source // has not said. _ = stop.changed() => { - drop(copy.close()?); + drop(copy.finish()?); break 'groups; } }; @@ -575,8 +575,8 @@ async fn copy( // The copy ends where the source ended its group, when it said, // so a paused source's last picture ages out of the copy too. match group.end() { - Some(end) => drop(copy.finish(end)?), - None => drop(copy.close()?), + Some(end) => drop(copy.finish_at(end)?), + None => drop(copy.finish()?), } } out.clone().finish().map(drop) @@ -664,7 +664,7 @@ impl<'a> Listing<'a> { while let Some(mut catalog) = updates.next().await? { // Media timing is the root's: the one clock, and the join interval an // HLS export numbers its segments on. - catalog.media = Default::default(); + catalog.sync = Default::default(); // The claim is checked inside the mutation, so a newer source's // writes, made under the same lock, are never overwritten. studio.mutate(|root| { @@ -1449,7 +1449,7 @@ mod tests { let snapshot = listed(&catalog, |sources| sources.len() == 2).await; assert!(snapshot.video.renditions.is_empty(), "no source is a program rendition"); let published = &snapshot.ext.studio.sources; - assert!(published["red"].media.is_empty(), "the root carries the media timing"); + assert!(published["red"].sync.is_empty(), "the root carries the media timing"); assert_eq!(sources.get("red").unwrap().track(), Some(Status::Live)); assert_eq!(sources.get("guest").unwrap().track(), None); assert!(sources.get("red copy").is_none(), "a clone opens no feed, so no track"); @@ -1578,15 +1578,15 @@ mod tests { for (start, appended) in [(1_000, true), (3_000, true), (5_000, false)] { // Nothing says what lies between 3 000 and 5 000. let group = match appended { - true => source.append_group(start), + true => source.append_group(moq_net::Timestamp::from_micros(start).unwrap()), false => source.create_group(moq_net::group::Info { start }), }; // The first group says where it ends; the others only close. let group = group.unwrap(); drop( match start { - 1_000 => group.finish(2_000), - _ => group.close(), + 1_000 => group.finish_at(2_000), + _ => group.finish(), } .unwrap(), ); diff --git a/rs/moq-scene/src/replay.rs b/rs/moq-scene/src/replay.rs index 9c580044..d702bffb 100644 --- a/rs/moq-scene/src/replay.rs +++ b/rs/moq-scene/src/replay.rs @@ -341,8 +341,8 @@ fn copy_held( into.write_frame(frame.timestamp, frame.payload.clone())?; } match (&held.read, held.end) { - (Ok(()), Some(end)) => drop(into.finish(end)?), - (Ok(()), None) => drop(into.close()?), + (Ok(()), Some(end)) => drop(into.finish_at(end)?), + (Ok(()), None) => drop(into.finish()?), (Err(err), _) => into.abort(err.clone())?, } } @@ -423,7 +423,7 @@ mod tests { /// [`write`] as a publisher appends, saying nothing lies between this group /// and the one before. fn append(track: &moq_net::track::Producer, sequence: u64, at: &[u64]) { - fill(track.append_group(at[0] * 1000).unwrap(), sequence, at); + fill(track.append_group(ts(at[0])).unwrap(), sequence, at); } fn fill(mut group: moq_net::group::Producer, sequence: u64, at: &[u64]) { @@ -432,7 +432,7 @@ mod tests { .write_frame(ts(*at), format!("{sequence}.{index}").into_bytes()) .unwrap(); } - group.close().unwrap(); + group.finish().unwrap(); } /// A group's second, from its start in microseconds. @@ -556,13 +556,13 @@ mod tests { async fn a_take_keeps_where_its_whole_groups_end() { let (broadcast, track) = broadcast(0, None); for sequence in 0..3 { - let mut group = track.append_group(sequence * 1_000_000).unwrap(); + let mut group = track.append_group(ts(sequence * 1_000)).unwrap(); for (index, at) in second(sequence).iter().enumerate() { group .write_frame(ts(*at), format!("{sequence}.{index}").into_bytes()) .unwrap(); } - drop(group.finish((sequence + 1) * 1_000_000).unwrap()); + drop(group.finish_at((sequence + 1) * 1_000_000).unwrap()); } let take = Take::new(&target(&broadcast, ts(2_500)), Duration::from_secs(2)).unwrap(); let mut copied = take @@ -656,7 +656,7 @@ mod tests { #[tokio::test(start_paused = true)] async fn a_take_at_the_live_edge_holds_what_was_written() { let (broadcast, track) = broadcast(7, None); - let mut live = track.append_group(7_000_000).unwrap(); + let mut live = track.append_group(ts(7_000)).unwrap(); live.write_frame(ts(7_000), b"7.0".to_vec()).unwrap(); let take = Take::new(&target(&broadcast, ts(7_500)), Duration::from_secs(3)).unwrap(); live.write_frame(ts(7_333), b"7.1".to_vec()).unwrap(); @@ -708,7 +708,7 @@ mod tests { // The marker a publisher writes as it stops encoding. let config = target(&broadcast, ts(0)).video.unwrap().1; let container = moq_mux::catalog::hang::Container::try_from(&config).unwrap(); - let mut group = track.append_group(3_500_000).unwrap(); + let mut group = track.append_group(ts(3_500)).unwrap(); let gap = moq_mux::container::Frame { timestamp: ts(3_500), payload: bytes::Bytes::new(), @@ -716,7 +716,7 @@ mod tests { duration: None, }; container.write(&mut group, &[gap]).unwrap(); - group.close().unwrap(); + group.finish().unwrap(); let result = Take::new(&target(&broadcast, ts(3_900)), Duration::from_millis(300)); assert!(matches!(result, Err(Error::Unsupported(_))), "{:?}", result.err()); } diff --git a/rs/moq-studio/Cargo.toml b/rs/moq-studio/Cargo.toml index e59b55d5..026d8cd1 100644 --- a/rs/moq-studio/Cargo.toml +++ b/rs/moq-studio/Cargo.toml @@ -114,9 +114,9 @@ winit = { version = "0.30", default-features = false, features = ["serde"] } [target.'cfg(target_os = "linux")'.dependencies] # The GlobalShortcuts portal for hotkeys on Wayland, and the Settings portal's -# reduced motion for the effects. 0.13, as moq-video's PipeWire capture uses, -# so the two share one D-Bus stack. -ashpd = { version = "0.13", default-features = false, features = ["global_shortcuts", "settings", "tokio"] } +# reduced motion for the effects. 0.13 on `async-io`, as moq-video's PipeWire +# capture uses, so the two share one D-Bus stack; ashpd refuses both backends. +ashpd = { version = "0.13", default-features = false, features = ["global_shortcuts", "settings", "async-io"] } futures-util = "0.3" # The virtual camera's v4l2loopback fallback. Pure Rust with its kernel bindings # checked in, and already in the graph through moq-video's capture. @@ -128,7 +128,8 @@ pipewire = { version = "0.10", optional = true, features = ["v0_3_34"] } # tells a held key's repeats from new presses. x11rb = { version = "0.13", features = ["xkb"] } # Relay tokens in the Secret Service (GNOME Keyring, KWallet), over the D-Bus -# stack ashpd uses, on tokio as ashpd has it, with no system library. +# stack ashpd uses, with no system library. Its `rt-tokio` puts that zbus on +# tokio, so the portals keep needing a tokio runtime, as before. zbus-secret-service-keyring-store = { version = "1.0", features = ["rt-tokio-crypto-rust"] } [target.'cfg(unix)'.dependencies] diff --git a/rs/moq-studio/src/engine.rs b/rs/moq-studio/src/engine.rs index 7999791a..0417a302 100644 --- a/rs/moq-studio/src/engine.rs +++ b/rs/moq-studio/src/engine.rs @@ -6003,11 +6003,11 @@ mod tests { for (name, track) in ["video", "audio"].into_iter().zip(&tracks) { let mut subscription = broadcast.track(name).unwrap().subscribe(None).await.unwrap(); // A head group read through the relay, so only the tail is at stake. - let mut group = track.append_group(0).unwrap(); + let mut group = track.append_group(moq_net::Timestamp::from_millis(0).unwrap()).unwrap(); group .write_frame(moq_net::Timestamp::from_millis(0).unwrap(), vec![0; 1]) .unwrap(); - group.close().unwrap(); + group.finish().unwrap(); let mut head = kio::clock::timeout(TIMEOUT, subscription.recv_group()) .await .expect("the head group arrives") @@ -6039,13 +6039,13 @@ mod tests { }) .collect(); for track in &tracks { - let mut group = track.append_group(1).unwrap(); + let mut group = track.append_group(moq_net::Timestamp::from_millis(1).unwrap()).unwrap(); for _ in 0..FRAMES { group .write_frame(moq_net::Timestamp::from_millis(1).unwrap(), vec![0; PADDING]) .unwrap(); } - group.close().unwrap(); + group.finish().unwrap(); // The kept producer holds the finished track listed. drop(track.clone().finish().unwrap()); } diff --git a/rs/moq-studio/src/guests.rs b/rs/moq-studio/src/guests.rs index 323ec38e..f0a8296f 100644 --- a/rs/moq-studio/src/guests.rs +++ b/rs/moq-studio/src/guests.rs @@ -1351,9 +1351,9 @@ pub(crate) mod tests { let claims = key.verify(&fragment["jwt"]).unwrap(); assert_eq!(claims.root, "show/guests"); - assert_eq!(claims.publish, ["alice/**".parse().unwrap()].into_iter().collect()); + assert_eq!(claims.publish.path, ["alice/**".parse().unwrap()].into_iter().collect()); assert_eq!( - claims.subscribe, + claims.subscribe.path, subscribes("alice", 0), "a guest reads only its own renewals and feed, and the program" ); @@ -1674,7 +1674,7 @@ pub(crate) mod tests { renewals.sync(); let first = key.verify(&next_token(&consumer, "alice", 0).await.unwrap()).unwrap(); assert_eq!(first.root, "show/guests"); - assert_eq!(first.publish, ["alice/**".parse().unwrap()].into_iter().collect()); + assert_eq!(first.publish.path, ["alice/**".parse().unwrap()].into_iter().collect()); // Each renewal comes half an expiry later, so a token must outlast that. let ahead = |claims: &moq_auth::Claims| claims.expires.unwrap().saturating_duration_since(kio::clock::wall()); assert!(ahead(&first) >= EXPIRY, "{:?}", ahead(&first)); @@ -1694,7 +1694,7 @@ pub(crate) mod tests { room.invite("alice").unwrap(); renewals.sync(); let back = key.verify(&next_token(&consumer, "alice", 1).await.unwrap()).unwrap(); - assert_eq!(back.subscribe, subscribes("alice", 1)); + assert_eq!(back.subscribe.path, subscribes("alice", 1)); let before = consumer.request(Room::renewal_path("alice", 0).unwrap(), None).await; assert!(before.is_err(), "the earlier generation is still renewed"); diff --git a/rs/moq-studio/src/health.rs b/rs/moq-studio/src/health.rs index a914e023..3af55c1e 100644 --- a/rs/moq-studio/src/health.rs +++ b/rs/moq-studio/src/health.rs @@ -1199,7 +1199,7 @@ pub fn rate(rate: Rate) -> String { pub fn echo(path: &moq_net::Path) -> anyhow::Result<(moq_net::path::Relative, moq_net::Path)> { // A reference resolves against the broadcast's parent, as a relative URL // does, so naming the broadcast's last segment puts the prefix beneath it. - let relative = match path.parts().last() { + let relative = match path.parts().next_back() { Some(last) => format!("{last}/{ECHO}"), None => ECHO.to_string(), }; @@ -2255,7 +2255,11 @@ mod tests { .unwrap() .expect("an instance"); let mut video = broadcast.track("video").unwrap().subscribe(None).await.unwrap(); - track.append_group(0).unwrap().close().unwrap(); + track + .append_group(moq_net::Timestamp::unscaled(0)) + .unwrap() + .finish() + .unwrap(); video.recv_group().await.unwrap(); while watching.get() != Some(1) { kio::clock::sleep(INTERVAL / 4).await; diff --git a/rs/moq-studio/src/ladder.rs b/rs/moq-studio/src/ladder.rs index 0e33279e..829ba687 100644 --- a/rs/moq-studio/src/ladder.rs +++ b/rs/moq-studio/src/ladder.rs @@ -294,7 +294,7 @@ mod tests { let _second = consumer.track("video").unwrap().subscribe(None).await.unwrap(); assert!(joins.due(), "a join past the newest group"); assert!(!joins.due(), "the keyframe is still in the encoder"); - group.close().unwrap(); + group.finish().unwrap(); let _group = write(1, 100); assert!(!joins.due(), "group 1 answered it"); } diff --git a/rs/moq-studio/src/record.rs b/rs/moq-studio/src/record.rs index b7aa7a5d..c5fc3e8a 100644 --- a/rs/moq-studio/src/record.rs +++ b/rs/moq-studio/src/record.rs @@ -1373,7 +1373,7 @@ mod tests { .iter() .map(|(name, _, _, listing)| { let mut listing = listing.snapshot(); - listing.media = Default::default(); + listing.sync = Default::default(); (name.clone(), listing) }) .collect(); diff --git a/rs/moq-studio/src/uplink.rs b/rs/moq-studio/src/uplink.rs index d1c53120..0fe74a87 100644 --- a/rs/moq-studio/src/uplink.rs +++ b/rs/moq-studio/src/uplink.rs @@ -144,10 +144,10 @@ async fn fill( clock.tick().await; if frames % RATE == 0 { if let Some(done) = group.take() { - moq_net::group::Producer::close(done)?; + moq_net::group::Producer::finish(done)?; } // The probe's track has no timescale, so its groups count up. - group = Some(track.append_group(u64::from(frames / RATE))?); + group = Some(track.append_group(moq_net::Timestamp::unscaled(u64::from(frames / RATE)))?); } frames += 1; let rate = reservation.rate().unwrap_or(FLOOR).clamp(FLOOR, ceiling);