Implement prioritization in moq-pub (#74)

Here's the main change in webtransport-quinn 0.5.3:
ec553fa340

I haven't run into any errors so I don't know what was broken before
@englishm. I'm hoping that setting the stream priority to max when
writing the stream header avoids the issue? Otherwise we need to go bug
diving.
This commit is contained in:
kixelated 2023-09-19 10:01:26 -07:00 committed by GitHub
parent 6e0e85272d
commit eb7e707be3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

4
Cargo.lock generated
View File

@ -2139,9 +2139,9 @@ dependencies = [
[[package]]
name = "webtransport-quinn"
version = "0.5.2"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea8dec60bceb5523139e095ff3ac4622ef0cffdd53f59fb68dd94f93f041ae4"
checksum = "10cfc3592022726f4e8e5a536e68fb1ecb0b077e6b5435bd7ac3b9c97670c18c"
dependencies = [
"async-std",
"bytes",

View File

@ -258,7 +258,7 @@ impl Track {
// Compute the timestamp in milliseconds.
// Overflows after 583 million years, so we're fine.
let _timestamp: i32 = fragment
let timestamp: i32 = fragment
.timestamp(self.timescale)
.as_millis()
.try_into()
@ -267,7 +267,7 @@ impl Track {
// Create a new segment.
let mut segment = self.track.create_segment(segment::Info {
sequence: VarInt::try_from(self.sequence).context("sequence too large")?,
priority: i32::MAX, // TODO
priority: timestamp, // newer segments are higher priority
// Delete segments after 10s.
expires: Some(time::Duration::from_secs(10)),

View File

@ -23,4 +23,4 @@ log = "0.4"
indexmap = "2"
quinn = "0.10"
webtransport-quinn = "0.5.2"
webtransport-quinn = "0.5.3"