mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 17:53:48 +00:00
Revert "quinn: Update to web-transport-quinn 0.5"
This reverts commit 50c2529904
.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2120>
This commit is contained in:
parent
74c7cdb2d0
commit
e056d9244d
5 changed files with 36 additions and 45 deletions
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -332,7 +332,6 @@ checksum = "5e4e8200b9a4a5801a769d50eeabc05670fec7e959a8cb7a63a93e4e519942ae"
|
|||
dependencies = [
|
||||
"aws-lc-sys",
|
||||
"paste",
|
||||
"untrusted 0.7.1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
|
@ -891,7 +890,7 @@ dependencies = [
|
|||
"bitflags 2.9.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.11.0",
|
||||
"itertools 0.12.1",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"log",
|
||||
|
@ -4751,7 +4750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.48.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5931,8 +5930,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"heck 0.4.1",
|
||||
"itertools 0.11.0",
|
||||
"heck 0.5.0",
|
||||
"itertools 0.12.1",
|
||||
"log",
|
||||
"multimap",
|
||||
"once_cell",
|
||||
|
@ -5952,7 +5951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.11.0",
|
||||
"itertools 0.12.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.99",
|
||||
|
@ -6451,7 +6450,7 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"getrandom 0.2.15",
|
||||
"libc",
|
||||
"untrusted 0.9.0",
|
||||
"untrusted",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
|
@ -6722,7 +6721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted 0.9.0",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -6734,7 +6733,7 @@ dependencies = [
|
|||
"aws-lc-rs",
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
"untrusted 0.9.0",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -6795,7 +6794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted 0.9.0",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8004,12 +8003,6 @@ version = "0.1.14"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.9.0"
|
||||
|
@ -8338,20 +8331,17 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "web-transport-quinn"
|
||||
version = "0.5.0"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61937694cad3742f278b38af267bb84b749efaca0c94ab1fcacadfb6aa544065"
|
||||
checksum = "3020b51cda10472a365e42d9a701916d4f04d74cc743de08246ef6a421c2d137"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"bytes",
|
||||
"futures",
|
||||
"http 1.2.0",
|
||||
"log",
|
||||
"quinn",
|
||||
"quinn-proto",
|
||||
"rustls 0.23.23",
|
||||
"rustls-native-certs 0.8.1",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
"url",
|
||||
"web-transport-proto",
|
||||
|
@ -8373,7 +8363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted 0.9.0",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -27,7 +27,7 @@ thiserror = "2"
|
|||
async-channel = "2.3"
|
||||
itertools = "0.14"
|
||||
env_logger = "0.11"
|
||||
web-transport-quinn = "0.5"
|
||||
web-transport-quinn = "0.3.3"
|
||||
url = "2.5.2"
|
||||
once_cell = "1.20.2"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
use crate::quinnquicmeta::QuinnQuicMeta;
|
||||
use crate::quinnquicquery::*;
|
||||
use crate::utils::{
|
||||
client, client_endpoint, get_stats, make_socket_addr, server_endpoint, wait, Canceller,
|
||||
client_endpoint, get_stats, make_socket_addr, server_endpoint, wait, Canceller,
|
||||
QuinnQuicEndpointConfig, WaitError, CONNECTION_CLOSE_CODE, CONNECTION_CLOSE_MSG, RUNTIME,
|
||||
};
|
||||
use crate::{common::*, utils};
|
||||
|
@ -535,14 +535,16 @@ impl QuinnWebTransportClientSrc {
|
|||
))),
|
||||
}?;
|
||||
|
||||
let client = client(&endpoint_config).map_err(|err| {
|
||||
let client = client_endpoint(&endpoint_config).map_err(|err| {
|
||||
WaitError::FutureError(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Failed to configure endpoint: {}", err]
|
||||
))
|
||||
})?;
|
||||
|
||||
let session = client.connect(&url).await.map_err(|err| {
|
||||
let session = web_transport_quinn::connect(&client, &url)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
WaitError::FutureError(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Failed to connect to server: {}", err]
|
||||
|
|
|
@ -623,12 +623,21 @@ impl QuinnWebTransportServerSink {
|
|||
))
|
||||
})?;
|
||||
|
||||
let mut incoming_conn = web_transport_quinn::Server::new(endpoint);
|
||||
let incoming_conn = endpoint.accept().await.unwrap();
|
||||
|
||||
let request = incoming_conn.accept().await.ok_or_else(|| {
|
||||
let connection = incoming_conn.await.map_err(|err| {
|
||||
WaitError::FutureError(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Connection error"]
|
||||
["Connection error: {}", err]
|
||||
))
|
||||
})?;
|
||||
|
||||
let request = web_transport_quinn::accept(connection)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
WaitError::FutureError(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Connection error: {}", err]
|
||||
))
|
||||
})?;
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ use std::sync::{Arc, Mutex};
|
|||
use std::time::Duration;
|
||||
use thiserror::Error;
|
||||
use tokio::runtime;
|
||||
use web_transport_quinn::Client;
|
||||
|
||||
pub const CONNECTION_CLOSE_CODE: u32 = 0;
|
||||
pub const CONNECTION_CLOSE_MSG: &str = "Stopped";
|
||||
|
@ -434,15 +433,6 @@ pub fn client_endpoint(ep_config: &QuinnQuicEndpointConfig) -> Result<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 {
|
||||
match stats {
|
||||
Some(stats) => {
|
||||
|
|
Loading…
Reference in a new issue