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
219 changes: 58 additions & 161 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions js/join/src/renew.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ test("each token the studio publishes reaches the page, and only for its own nam
["bob", 0],
["alice", 1],
] as const) {
const other = origin.createBroadcast(path(name, generation));
const other = origin.route(path(name, generation), { hidden: true });
other.broadcast.createTrack("token").writeFrame({ payload: encode(`${name} ${generation}`) });
other.announce();
}

const publication = origin.createBroadcast(path("alice", 0));
const publication = origin.route(path("alice", 0), { hidden: true });
const track = publication.broadcast.createTrack("token");
track.writeFrame({ payload: encode("first") });
publication.announce();
Expand All @@ -50,7 +50,7 @@ test("a group superseded before it completes does not end the renewals", async (
tokens.update((all) => [...all, token]),
);

const publication = origin.createBroadcast(path("alice", 0));
const publication = origin.route(path("alice", 0), { hidden: true });
const track = publication.broadcast.createTrack("token");
track.writeFrame({ payload: encode("first") });
publication.announce();
Expand Down
2 changes: 1 addition & 1 deletion moq
Submodule moq updated 2115 files
1 change: 0 additions & 1 deletion quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ repository.
- [moq-audio's filter chain is pinned](/quest/m0/pin-audio-filters.md) - the chain audio filters configure
- [moq-video's browser backends are pinned](/quest/m0/pin-browser-video.md) - the web studio's video slice and browser composition
- [moq-audio's browser backends are pinned](/quest/m0/pin-browser-audio.md) - the web studio's audio slice
- [moq-video's program readback is pinned](/quest/m0/pin-readback.md) - the readback the Linux virtual camera uses
- [moq-audio's source tap is pinned](/quest/m0/pin-audio-tap.md) - the samples clap-to-measure sync times a clap from

## Related
Expand Down
23 changes: 0 additions & 23 deletions quest/m0/pin-readback.md

This file was deleted.

4 changes: 0 additions & 4 deletions quest/m0/vcam/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ PipeWire-aware apps (browsers and conferencing apps) list as a camera. It
falls back to an existing v4l2loopback device when one is present.
The studio's Devices panel leaves out its own virtual camera, so picking it
cannot feed the program back into itself.

## Required

- [moq-video's program readback is pinned](/quest/m0/pin-readback.md) - the readback the camera reads the program through
34 changes: 21 additions & 13 deletions rs/moq-scene/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,15 +978,15 @@ impl Driver {
/// Follow the broadcast at `path` for as long as the feed lives, playing
/// each instance of it that comes online.
async fn broadcast(&self, path: &str) -> Result<(), Error> {
let mut instances = moq_mux::follow::Instances::new(&self.context.origin, path, None)?;
let mut instances = self.context.origin.follow(path, None)?;
set(&self.status, Status::Offline);

let mut clock = self.clock.clone().expect("a broadcast source has a clock");
let mut playing: Option<Playing<'_>> = None;
loop {
tokio::select! {
event = instances.next() => match event {
Ok(moq_mux::follow::Event::Start(broadcast)) => {
event = instances.available() => match event {
Ok(Some(broadcast)) => {
set(&self.status, Status::Live);
*self.played.lock().unwrap() = Played {
broadcast: Some(broadcast.clone()),
Expand All @@ -996,7 +996,7 @@ impl Driver {
clock = clock.reset(VIDEO_DELAY);
playing = Some(Box::pin(self.play(broadcast, path, clock.clone())));
}
Ok(moq_mux::follow::Event::End) => {
Ok(None) => {
playing = None;
*self.played.lock().unwrap() = Played::default();
set(&self.status, Status::Offline);
Expand Down Expand Up @@ -2305,7 +2305,9 @@ mod tests {
local(async {
let dir = tempfile::tempdir().unwrap();
let (context, origin) = context(dir.path());
let publication = origin.create_broadcast("room/guest").unwrap();
let publication = origin
.route("room/guest", moq_net::origin::RouteOptions::hidden())
.unwrap();
let mut broadcast = publication.broadcast().clone();
let catalog = moq_mux::catalog::Producer::new(&mut broadcast, Default::default()).unwrap();
// A known bitrate ranks a rendition above one without.
Expand All @@ -2324,7 +2326,7 @@ mod tests {
.unwrap()
};
let first = audio("first", None);
publication.announce(moq_net::origin::Route::default()).unwrap();
publication.announce().unwrap();

let mut sources = Sources::new(context);
let drivers = sources.sync(&collection());
Expand All @@ -2349,7 +2351,9 @@ mod tests {
local(async {
let dir = tempfile::tempdir().unwrap();
let (context, origin) = context(dir.path());
let publication = origin.create_broadcast("room/guest").unwrap();
let publication = origin
.route("room/guest", moq_net::origin::RouteOptions::hidden())
.unwrap();
let mut broadcast = publication.broadcast().clone();
let mut catalog = moq_mux::catalog::Producer::new(&mut broadcast, Default::default()).unwrap();
let info = catalog.track_info(hang::catalog::PRIORITY.audio);
Expand All @@ -2365,7 +2369,7 @@ mod tests {
.unwrap();
};
point(&mut catalog, "first");
publication.announce(moq_net::origin::Route::default()).unwrap();
publication.announce().unwrap();

let mut sources = Sources::new(context);
let drivers = sources.sync(&collection());
Expand All @@ -2390,7 +2394,9 @@ mod tests {
local(async {
let dir = tempfile::tempdir().unwrap();
let (context, origin) = context(dir.path());
let publication = origin.create_broadcast("room/guest").unwrap();
let publication = origin
.route("room/guest", moq_net::origin::RouteOptions::hidden())
.unwrap();
let mut broadcast = publication.broadcast().clone();
let mut catalog = moq_mux::catalog::Producer::new(&mut broadcast, Default::default()).unwrap();
let mut config = hang::catalog::AudioConfig::new(hang::catalog::AudioCodec::Opus, 48_000, 2);
Expand All @@ -2400,7 +2406,7 @@ mod tests {
catalog.audio.renditions.insert("audio".into(), config);
})
.unwrap();
publication.announce(moq_net::origin::Route::default()).unwrap();
publication.announce().unwrap();

let mut sources = Sources::new(context);
let drivers = sources.sync(&collection());
Expand All @@ -2421,7 +2427,7 @@ mod tests {

/// A live broadcast at `room/guest`, writing nothing until the test does.
struct Live {
_publication: moq_net::origin::Publication,
_publication: moq_net::origin::Route,
broadcast: moq_net::broadcast::Producer,
catalog: moq_mux::catalog::Producer,
video: moq_video::encode::Producer,
Expand All @@ -2444,7 +2450,9 @@ mod tests {

/// A broadcast with a video track, and an audio one with `audio`.
async fn live(origin: &moq_net::origin::Producer, audio: bool) -> Live {
let publication = origin.create_broadcast("room/guest").unwrap();
let publication = origin
.route("room/guest", moq_net::origin::RouteOptions::hidden())
.unwrap();
let mut broadcast = publication.broadcast().clone();
let catalog = moq_mux::catalog::Producer::new(&mut broadcast, Default::default()).unwrap();
let (video, encoder) = rendition(&broadcast, catalog.timebase()).await;
Expand All @@ -2454,7 +2462,7 @@ mod tests {
options.config = moq_audio::encode::Config::from_input(moq_audio::encode::Codec::Pcm, &input);
moq_audio::encode::Producer::new(&mut broadcast, catalog.clone(), input, &options).unwrap()
});
publication.announce(moq_net::origin::Route::default()).unwrap();
publication.announce().unwrap();
Live {
_publication: publication,
broadcast,
Expand Down
6 changes: 3 additions & 3 deletions rs/moq-studio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ kio = { workspace = true, features = ["async", "runtime"] }
moq-audio = { workspace = true, features = ["bus"] }
# Signs guest tokens with the room key.
moq-auth = { workspace = true }
moq-json = { workspace = true }
moq-json = { workspace = true, features = ["async"] }
moq-mux = { workspace = true }
moq-net = { workspace = true }
# The guest room: its path convention, roster, and token claims.
moq-room = { workspace = true }
moq-room = { workspace = true, features = ["async"] }
moq-scene = { workspace = true }
moq-stats = { workspace = true }
moq-tokio = { workspace = true, default-features = false, features = ["aws-lc-rs", "net"] }
moq-tokio = { workspace = true, default-features = false, features = ["net"] }
moq-video = { workspace = true }
pollster = { workspace = true }
# The join link's QR code. No dependencies of its own.
Expand Down
Loading