mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 09:43:48 +00:00
Update to async-tungstenite 0.30
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2379>
This commit is contained in:
parent
e848fb67d5
commit
9612655f50
11 changed files with 20 additions and 20 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -252,9 +252,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "async-tungstenite"
|
||||
version = "0.29.1"
|
||||
version = "0.30.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef0f7efedeac57d9b26170f72965ecfd31473ca52ca7a64e925b0b6f5f079886"
|
||||
checksum = "e308e9866b891743e3fdf9dfd6b57f85c5062ca01ce4fed6f393e76eb5accea4"
|
||||
dependencies = [
|
||||
"atomic-waker",
|
||||
"futures-core",
|
||||
|
@ -266,7 +266,7 @@ dependencies = [
|
|||
"pin-project-lite",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tungstenite 0.26.2",
|
||||
"tungstenite 0.27.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8521,9 +8521,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.26.2"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13"
|
||||
checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
|
|
|
@ -14,7 +14,7 @@ gst.workspace = true
|
|||
gst-base.workspace = true
|
||||
gst-audio = { workspace = true, features = ["v1_16"] }
|
||||
tokio = { version = "1", features = [ "full" ] }
|
||||
async-tungstenite = { version = "0.29", features = ["tokio", "tokio-runtime", "tokio-native-tls"] }
|
||||
async-tungstenite = { version = "0.30", features = ["tokio", "tokio-runtime", "tokio-native-tls"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
atomic_refcell = "0.1"
|
||||
|
|
|
@ -1310,7 +1310,7 @@ impl Transcriber {
|
|||
gst::error_msg!(gst::CoreError::Failed, ["Failed to connect: {}", err])
|
||||
})?;
|
||||
|
||||
let (mut ws_sink, mut ws_stream) = ws.split();
|
||||
let (ws_sink, mut ws_stream) = ws.split();
|
||||
|
||||
let late_punctuation_factor = if settings.enable_late_punctuation_hack {
|
||||
2
|
||||
|
|
|
@ -29,7 +29,7 @@ itertools = "0.14"
|
|||
tokio = { version = "1", features = ["fs", "macros", "rt-multi-thread", "time"] }
|
||||
tokio-native-tls = "0.3.0"
|
||||
tokio-stream = "0.1.11"
|
||||
async-tungstenite = { version = "0.29", features = ["tokio-runtime", "tokio-native-tls", "url"] }
|
||||
async-tungstenite = { version = "0.30", features = ["tokio-runtime", "tokio-native-tls", "url"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
fastrand = "2.0"
|
||||
|
|
|
@ -12,7 +12,7 @@ rust-version.workspace = true
|
|||
anyhow = "1"
|
||||
tokio = { version = "1", features = ["fs", "io-util", "macros", "rt-multi-thread", "time"] }
|
||||
tokio-native-tls = "0.3.0"
|
||||
async-tungstenite = { version = "0.29", features = ["tokio-runtime", "tokio-native-tls"] }
|
||||
async-tungstenite = { version = "0.30", features = ["tokio-runtime", "tokio-native-tls"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
|
|
|
@ -135,7 +135,7 @@ impl Server {
|
|||
let (websocket_sender, mut websocket_receiver) = mpsc::channel::<String>(1000);
|
||||
|
||||
let this_id_clone = this_id.clone();
|
||||
let (mut ws_sink, mut ws_stream) = ws.split();
|
||||
let (ws_sink, mut ws_stream) = ws.split();
|
||||
let send_task_handle = task::spawn(async move {
|
||||
let mut res = Ok(());
|
||||
loop {
|
||||
|
@ -166,7 +166,7 @@ impl Server {
|
|||
|
||||
debug!(this_id = %this_id_clone, "Done sending");
|
||||
|
||||
let _ = ws_sink.close().await;
|
||||
let _ = ws_sink.close(None).await;
|
||||
|
||||
res.map_err(Into::into)
|
||||
});
|
||||
|
|
|
@ -419,7 +419,7 @@ impl Signaller {
|
|||
gst::info!(CAT, imp = self, "connected");
|
||||
|
||||
// Channel for asynchronously sending out websocket message
|
||||
let (mut ws_sink, mut ws_stream) = ws.split();
|
||||
let (ws_sink, mut ws_stream) = ws.split();
|
||||
|
||||
// 1000 is completely arbitrary, we simply don't want infinite piling
|
||||
// up of messages as with unbounded
|
||||
|
@ -474,7 +474,7 @@ impl Signaller {
|
|||
gst::debug!(CAT, "Done sending");
|
||||
}
|
||||
|
||||
let _ = ws_sink.close().await;
|
||||
let _ = ws_sink.close(None).await;
|
||||
|
||||
res.map_err(Into::into)
|
||||
});
|
||||
|
|
|
@ -347,7 +347,7 @@ impl Signaller {
|
|||
.await??;
|
||||
|
||||
// Channel for asynchronously sending out websocket message
|
||||
let (mut ws_sink, mut ws_stream) = ws.split();
|
||||
let (ws_sink, mut ws_stream) = ws.split();
|
||||
|
||||
// 1000 is completely arbitrary, we simply don't want infinite piling
|
||||
// up of messages as with unbounded
|
||||
|
@ -401,7 +401,7 @@ impl Signaller {
|
|||
|
||||
gst::debug!(CAT, imp = this, "Done sending");
|
||||
|
||||
let _ = ws_sink.close().await;
|
||||
let _ = ws_sink.close(None).await;
|
||||
|
||||
res.map_err(Into::into)
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ impl Signaller {
|
|||
gst::info!(CAT, imp = self, "connected");
|
||||
|
||||
// Channel for asynchronously sending out websocket message
|
||||
let (mut ws_sink, mut ws_stream) = ws.split();
|
||||
let (ws_sink, mut ws_stream) = ws.split();
|
||||
|
||||
// 1000 is completely arbitrary, we simply don't want infinite piling
|
||||
// up of messages as with unbounded
|
||||
|
@ -231,7 +231,7 @@ impl Signaller {
|
|||
|
||||
gst::debug!(CAT, imp = this, "Done sending");
|
||||
|
||||
let _ = ws_sink.close().await;
|
||||
let _ = ws_sink.close(None).await;
|
||||
|
||||
res.map_err(Into::into)
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ chrono = "0.4.35"
|
|||
walkdir = "2"
|
||||
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
||||
tokio-stream = "0.1.11"
|
||||
async-tungstenite = { version = "0.29", features = ["tokio-runtime", "url"] }
|
||||
async-tungstenite = { version = "0.30", features = ["tokio-runtime", "url"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
url = "2"
|
||||
|
|
|
@ -450,7 +450,7 @@ impl PipelineSnapshot {
|
|||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let url = url::Url::parse(&host)?;
|
||||
let (ws_stream, _) = async_tungstenite::tokio::connect_async(url).await?;
|
||||
let (mut write, mut read) = ws_stream.split();
|
||||
let (write, mut read) = ws_stream.split();
|
||||
|
||||
gst::debug!(CAT, "Connected to WebSocket server at {}", host);
|
||||
write
|
||||
|
@ -492,7 +492,7 @@ impl PipelineSnapshot {
|
|||
}
|
||||
}
|
||||
|
||||
let _ = write.close().await;
|
||||
let _ = write.close(None).await;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue