From 8cba2a60f2c11b42001d78e0098862f74991225b Mon Sep 17 00:00:00 2001 From: Mike English Date: Tue, 29 Oct 2024 17:06:38 -0400 Subject: [PATCH] moq-dir: s/group/subgroup/g This may not be what we really want yet, but it seems to match what was done on the moq-pub side and it builds, so that's a start... --- moq-dir/src/listing.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/moq-dir/src/listing.rs b/moq-dir/src/listing.rs index 6c5e031..58575db 100644 --- a/moq-dir/src/listing.rs +++ b/moq-dir/src/listing.rs @@ -3,13 +3,13 @@ use bytes::BytesMut; use std::collections::{HashSet, VecDeque}; use moq_transport::serve::{ - GroupReader, GroupWriter, GroupsReader, GroupsWriter, ServeError, TrackReader, TrackReaderMode, TrackWriter, + SubgroupReader, SubgroupWriter, SubgroupsReader, SubgroupsWriter, ServeError, TrackReader, TrackReaderMode, TrackWriter, }; pub struct ListingWriter { track: Option, - groups: Option, - group: Option, + groups: Option, + group: Option, current: HashSet, } @@ -60,7 +60,7 @@ impl ListingWriter { Ok(()) } - fn snapshot(&mut self) -> Result { + fn snapshot(&mut self) -> Result { let mut groups = match self.groups.take() { Some(groups) => groups, None => self.track.take().unwrap().groups()?, @@ -101,8 +101,8 @@ pub struct ListingReader { track: TrackReader, // Keep track of the current group. - groups: Option, - group: Option, + groups: Option, + group: Option, // The current state of the listing. current: HashSet, @@ -130,7 +130,7 @@ impl ListingReader { if self.groups.is_none() { self.groups = match self.track.mode().await? { - TrackReaderMode::Groups(groups) => Some(groups), + TrackReaderMode::Subgroups(groups) => Some(groups), _ => anyhow::bail!("expected groups mode"), }; };