mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-03 02:03:48 +00:00
quinn: Update to web-transport-quinn 0.5 and disable aws-lc-rs
This reverts commit e056d9244d
.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2199>
This commit is contained in:
parent
397300a1ce
commit
f5052e719f
5 changed files with 30 additions and 28 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
@ -8576,9 +8576,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web-transport-quinn"
|
name = "web-transport-quinn"
|
||||||
version = "0.3.4"
|
version = "0.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3020b51cda10472a365e42d9a701916d4f04d74cc743de08246ef6a421c2d137"
|
checksum = "5edbbbd8de66e931f5c8a5c9b6e660db7623f1e9042f5f03964ffa1f03c0b9b1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures",
|
"futures",
|
||||||
|
@ -8586,7 +8586,10 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"quinn",
|
"quinn",
|
||||||
"quinn-proto",
|
"quinn-proto",
|
||||||
"thiserror 1.0.69",
|
"ring",
|
||||||
|
"rustls 0.23.26",
|
||||||
|
"rustls-native-certs 0.8.1",
|
||||||
|
"thiserror 2.0.12",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
"web-transport-proto",
|
"web-transport-proto",
|
||||||
|
|
|
@ -16,8 +16,8 @@ gst.workspace = true
|
||||||
gst-base = { workspace = true, features = ["v1_22"] }
|
gst-base = { workspace = true, features = ["v1_22"] }
|
||||||
tokio = { version = "1.36.0", default-features = false, features = ["time", "rt-multi-thread", "macros"] }
|
tokio = { version = "1.36.0", default-features = false, features = ["time", "rt-multi-thread", "macros"] }
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
quinn = { version = "0.11.5", default-features = false, features = ["ring", "rustls", "runtime-tokio", "log"] }
|
quinn = { version = "0.11.6", default-features = false, features = ["rustls-ring", "runtime-tokio", "log"] }
|
||||||
quinn-proto ={ version = "0.11.8", default-features = false, features = ["rustls", "log"] }
|
quinn-proto = { version = "0.11.9", default-features = false, features = ["rustls-ring", "log"] }
|
||||||
rustls = { version = "0.23", default-features = false, features = ["std"] }
|
rustls = { version = "0.23", default-features = false, features = ["std"] }
|
||||||
rustls-pemfile = "2"
|
rustls-pemfile = "2"
|
||||||
rustls-pki-types = "1"
|
rustls-pki-types = "1"
|
||||||
|
@ -27,7 +27,7 @@ thiserror = "2"
|
||||||
async-channel = "2.3"
|
async-channel = "2.3"
|
||||||
itertools = "0.14"
|
itertools = "0.14"
|
||||||
env_logger = "0.11"
|
env_logger = "0.11"
|
||||||
web-transport-quinn = "0.3.3"
|
web-transport-quinn = { version = "0.5.1", default-features = false, features = ["ring"] }
|
||||||
url = "2.5.2"
|
url = "2.5.2"
|
||||||
once_cell = "1.20.2"
|
once_cell = "1.20.2"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
use crate::quinnquicmeta::QuinnQuicMeta;
|
use crate::quinnquicmeta::QuinnQuicMeta;
|
||||||
use crate::quinnquicquery::*;
|
use crate::quinnquicquery::*;
|
||||||
use crate::utils::{
|
use crate::utils::{
|
||||||
client_endpoint, get_stats, make_socket_addr, server_endpoint, wait, Canceller,
|
client, client_endpoint, get_stats, make_socket_addr, server_endpoint, wait, Canceller,
|
||||||
QuinnQuicEndpointConfig, WaitError, CONNECTION_CLOSE_CODE, CONNECTION_CLOSE_MSG, RUNTIME,
|
QuinnQuicEndpointConfig, WaitError, CONNECTION_CLOSE_CODE, CONNECTION_CLOSE_MSG, RUNTIME,
|
||||||
};
|
};
|
||||||
use crate::{common::*, utils};
|
use crate::{common::*, utils};
|
||||||
|
@ -535,21 +535,19 @@ impl QuinnWebTransportClientSrc {
|
||||||
))),
|
))),
|
||||||
}?;
|
}?;
|
||||||
|
|
||||||
let client = client_endpoint(&endpoint_config).map_err(|err| {
|
let client = client(&endpoint_config).map_err(|err| {
|
||||||
WaitError::FutureError(gst::error_msg!(
|
WaitError::FutureError(gst::error_msg!(
|
||||||
gst::ResourceError::Failed,
|
gst::ResourceError::Failed,
|
||||||
["Failed to configure endpoint: {}", err]
|
["Failed to configure endpoint: {}", err]
|
||||||
))
|
))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let session = web_transport_quinn::connect(&client, &url)
|
let session = client.connect(&url).await.map_err(|err| {
|
||||||
.await
|
WaitError::FutureError(gst::error_msg!(
|
||||||
.map_err(|err| {
|
gst::ResourceError::Failed,
|
||||||
WaitError::FutureError(gst::error_msg!(
|
["Failed to connect to server: {}", err]
|
||||||
gst::ResourceError::Failed,
|
))
|
||||||
["Failed to connect to server: {}", err]
|
})?;
|
||||||
))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
gst::info!(
|
gst::info!(
|
||||||
CAT,
|
CAT,
|
||||||
|
|
|
@ -623,24 +623,15 @@ impl QuinnWebTransportServerSink {
|
||||||
))
|
))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let incoming_conn = endpoint.accept().await.unwrap();
|
let mut incoming_conn = web_transport_quinn::Server::new(endpoint);
|
||||||
|
|
||||||
let connection = incoming_conn.await.map_err(|err| {
|
let request = incoming_conn.accept().await.ok_or_else(|| {
|
||||||
WaitError::FutureError(gst::error_msg!(
|
WaitError::FutureError(gst::error_msg!(
|
||||||
gst::ResourceError::Failed,
|
gst::ResourceError::Failed,
|
||||||
["Connection error: {}", err]
|
["Connection error"]
|
||||||
))
|
))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let request = web_transport_quinn::accept(connection)
|
|
||||||
.await
|
|
||||||
.map_err(|err| {
|
|
||||||
WaitError::FutureError(gst::error_msg!(
|
|
||||||
gst::ResourceError::Failed,
|
|
||||||
["Connection error: {}", err]
|
|
||||||
))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
gst::info!(
|
gst::info!(
|
||||||
CAT,
|
CAT,
|
||||||
imp = self,
|
imp = self,
|
||||||
|
|
|
@ -28,6 +28,7 @@ use std::sync::{Arc, Mutex};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use tokio::runtime;
|
use tokio::runtime;
|
||||||
|
use web_transport_quinn::Client;
|
||||||
|
|
||||||
pub const CONNECTION_CLOSE_CODE: u32 = 0;
|
pub const CONNECTION_CLOSE_CODE: u32 = 0;
|
||||||
pub const CONNECTION_CLOSE_MSG: &str = "Stopped";
|
pub const CONNECTION_CLOSE_MSG: &str = "Stopped";
|
||||||
|
@ -433,6 +434,15 @@ pub fn client_endpoint(ep_config: &QuinnQuicEndpointConfig) -> Result<Endpoint,
|
||||||
Ok(endpoint)
|
Ok(endpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn client(ep_config: &QuinnQuicEndpointConfig) -> Result<Client, Box<dyn Error>> {
|
||||||
|
let client_cfg = configure_client(ep_config)?;
|
||||||
|
let mut endpoint = Endpoint::client(ep_config.client_addr.expect("client_addr not set"))?;
|
||||||
|
|
||||||
|
endpoint.set_default_client_config(client_cfg.clone());
|
||||||
|
|
||||||
|
Ok(web_transport_quinn::Client::new(endpoint, client_cfg))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_stats(stats: Option<ConnectionStats>) -> gst::Structure {
|
pub fn get_stats(stats: Option<ConnectionStats>) -> gst::Structure {
|
||||||
match stats {
|
match stats {
|
||||||
Some(stats) => {
|
Some(stats) => {
|
||||||
|
|
Loading…
Reference in a new issue