Skip to content

Commit

Permalink
Merge pull request #1 from englishm/draft-ietf-moq-transport-05
Browse files Browse the repository at this point in the history
moq-transport draft-05 initial wire format updates
  • Loading branch information
englishm authored Oct 22, 2024
2 parents 09f6e0a + 7ac2ff9 commit 9ca7e1e
Show file tree
Hide file tree
Showing 54 changed files with 183 additions and 98 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[workspace]
members = [
"moq-transport",
"moq-relay",
"moq-relay-ietf",
"moq-pub",
"moq-sub",
"moq-api",
"moq-clock",
"moq-clock-ietf",
"moq-dir",
"moq-native",
"moq-native-ietf",
"moq-catalog",
]
resolver = "2"
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions moq-clock/Cargo.toml → moq-clock-ietf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "moq-clock"
name = "moq-clock-ietf"
description = "CLOCK over QUIC"
authors = ["Luke Curley"]
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.5.1"
version = "0.6.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
Expand All @@ -14,8 +14,8 @@ categories = ["multimedia", "network-programming", "web-programming"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
moq-native = { path = "../moq-native", version = "0.4" }
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-native-ietf = { path = "../moq-native-ietf", version = "0.5" }
moq-transport = { path = "../moq-transport", version = "0.7" }

# QUIC
url = "2"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions moq-clock/src/main.rs → moq-clock-ietf/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use moq_native::quic;
use moq_native_ietf::quic;
use std::net;
use url::Url;

Expand All @@ -24,7 +24,7 @@ pub struct Cli {

/// The TLS configuration.
#[command(flatten)]
pub tls: moq_native::tls::Args,
pub tls: moq_native_ietf::tls::Args,

/// Publish the current time to the relay, otherwise only subscribe.
#[arg(long)]
Expand Down
6 changes: 3 additions & 3 deletions moq-dir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ authors = ["Luke Curley"]
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.2.1"
version = "0.3.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
categories = ["multimedia", "network-programming", "web-programming"]

[dependencies]
moq-native = { path = "../moq-native", version = "0.4" }
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-native-ietf = { path = "../moq-native-ietf", version = "0.5" }
moq-transport = { path = "../moq-transport", version = "0.7" }

# QUIC
web-transport = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion moq-dir/src/listing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl ListingWriter {
None => self.track.take().unwrap().groups()?,
};

let priority = self.group.as_ref().map(|g| g.group_id + 1).unwrap_or(0);
let priority = 127;
let mut group = groups.append(priority)?;

let mut msg = BytesMut::new();
Expand Down
2 changes: 1 addition & 1 deletion moq-dir/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use futures::{stream::FuturesUnordered, StreamExt};

use std::net;

use moq_native::{quic, tls};
use moq_native_ietf::{quic, tls};

mod listing;
mod listings;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions moq-native/Cargo.toml → moq-native-ietf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "moq-native"
name = "moq-native-ietf"
description = "Media over QUIC - Helper library for native applications"
authors = ["Luke Curley"]
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.4.0"
version = "0.5.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
categories = ["multimedia", "network-programming", "web-programming"]

[dependencies]
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-transport = { path = "../moq-transport", version = "0.7" }
web-transport = { workspace = true }
web-transport-quinn = "0.3"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions moq-pub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Mike English", "Luke Curley"]
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.7.1"
version = "0.8.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
Expand All @@ -14,8 +14,8 @@ categories = ["multimedia", "network-programming", "web-programming"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
moq-native = { path = "../moq-native", version = "0.4" }
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-native-ietf = { path = "../moq-native-ietf", version = "0.5" }
moq-transport = { path = "../moq-transport", version = "0.7" }
moq-catalog = { path = "../moq-catalog", version = "0.2" }

url = "2"
Expand Down
6 changes: 3 additions & 3 deletions moq-pub/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::Context;
use clap::Parser;
use tokio::io::AsyncReadExt;

use moq_native::quic;
use moq_native_ietf::quic;
use moq_pub::Media;
use moq_transport::{serve, session::Publisher};

Expand Down Expand Up @@ -36,7 +36,7 @@ pub struct Cli {

/// The TLS configuration.
#[command(flatten)]
pub tls: moq_native::tls::Args,
pub tls: moq_native_ietf::tls::Args,
}

#[tokio::main]
Expand All @@ -56,7 +56,7 @@ async fn main() -> anyhow::Result<()> {

let tls = cli.tls.load()?;

let quic = quic::Endpoint::new(moq_native::quic::Config {
let quic = quic::Endpoint::new(moq_native_ietf::quic::Config {
bind: cli.bind,
tls: tls.clone(),
})?;
Expand Down
10 changes: 5 additions & 5 deletions moq-pub/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@ impl Track {

// Otherwise make a new segment

// Compute the timestamp in milliseconds.
// Overflows after 583 million years, so we're fine.
let timestamp: u32 = fragment
let _timestamp: u32 = fragment
.timestamp(self.timescale)
.as_millis()
.try_into()
.context("timestamp too large")?;

let priority = u32::MAX.checked_sub(timestamp).context("priority too large")?.into();
// Prioritize each group equally for now
// (A u8 doesn't give us granularity for ms since epoch)
// TODO: Revisit post draft-05 prioritization
let priority: u8 = 127;

// Create a new segment.
let mut segment = self.track.append(priority)?;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions moq-relay/Cargo.toml → moq-relay-ietf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "moq-relay"
name = "moq-relay-ietf"
description = "Media over QUIC"
authors = ["Luke Curley"]
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.6.1"
version = "0.7.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
categories = ["multimedia", "network-programming", "web-programming"]

[dependencies]
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-native = { path = "../moq-native", version = "0.4" }
moq-transport = { path = "../moq-transport", version = "0.7" }
moq-native-ietf = { path = "../moq-native-ietf", version = "0.5" }
moq-api = { path = "../moq-api", version = "0.2" }

# QUIC
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion moq-relay/src/main.rs → moq-relay-ietf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Cli {

/// The TLS configuration.
#[command(flatten)]
pub tls: moq_native::tls::Args,
pub tls: moq_native_ietf::tls::Args,

/// Forward all announces to the provided server for authentication/routing.
/// If not provided, the relay accepts every unique announce.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions moq-relay/src/relay.rs → moq-relay-ietf/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net;
use anyhow::Context;

use futures::{stream::FuturesUnordered, FutureExt, StreamExt};
use moq_native::quic;
use moq_native_ietf::quic;
use url::Url;

use crate::{Api, Consumer, Locals, Producer, Remotes, RemotesConsumer, RemotesProducer, Session};
Expand All @@ -13,7 +13,7 @@ pub struct RelayConfig {
pub bind: net::SocketAddr,

/// The TLS configuration.
pub tls: moq_native::tls::Config,
pub tls: moq_native_ietf::tls::Config,

/// Forward all announcements to the (optional) URL.
pub announce: Option<Url>,
Expand Down
2 changes: 1 addition & 1 deletion moq-relay/src/remote.rs → moq-relay-ietf/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::sync::Weak;
use futures::stream::FuturesUnordered;
use futures::FutureExt;
use futures::StreamExt;
use moq_native::quic;
use moq_native_ietf::quic;
use moq_transport::serve::{Track, TrackReader, TrackWriter};
use moq_transport::watch::State;
use url::Url;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion moq-relay/src/web.rs → moq-relay-ietf/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tower_http::cors::{Any, CorsLayer};

pub struct WebConfig {
pub bind: net::SocketAddr,
pub tls: moq_native::tls::Config,
pub tls: moq_native_ietf::tls::Config,
}

// Run a HTTP server using Axum
Expand Down
6 changes: 3 additions & 3 deletions moq-sub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = []
repository = "https://github.com/kixelated/moq-rs"
license = "MIT OR Apache-2.0"

version = "0.2.1"
version = "0.3.0"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
Expand All @@ -14,8 +14,8 @@ categories = ["multimedia", "network-programming", "web-programming"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
moq-transport = { path = "../moq-transport", version = "0.6" }
moq-native = { path = "../moq-native", version = "0.4" }
moq-transport = { path = "../moq-transport", version = "0.7" }
moq-native-ietf = { path = "../moq-native-ietf", version = "0.5" }
url = "2"

# Async stuff
Expand Down
Loading

0 comments on commit 9ca7e1e

Please sign in to comment.