webrtc: Update AWS signaller to http 1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1441>
This commit is contained in:
Sebastian Dröge 2024-01-31 16:57:42 +02:00
parent 0e86dfa944
commit 451d928026
4 changed files with 4 additions and 6 deletions

1
Cargo.lock generated
View file

@ -2787,7 +2787,6 @@ dependencies = [
"gstreamer-utils",
"gstreamer-video",
"gstreamer-webrtc",
"http 0.2.11",
"http 1.0.0",
"human_bytes",
"livekit-api",

View file

@ -41,7 +41,7 @@ aws-smithy-http = { version = "0.60", features = [ "rt-tokio" ] }
aws-smithy-types = "1.0"
aws-sdk-kinesisvideo = "1.0"
aws-sdk-kinesisvideosignaling = "1.0"
http = "0.2"
http = "1.0"
chrono = "0.4"
data-encoding = "2.3.3"
url-escape = "0.1.1"
@ -57,7 +57,6 @@ livekit-api = { version = "0.3", default-features = false, features = ["signal-c
warp = "0.3"
crossbeam-channel = "0.5"
rand = "0.8"
http_1 = { version = "1.0", package = "http" }
[dev-dependencies]
tracing = { version = "0.1", features = ["log"] }

View file

@ -403,7 +403,7 @@ impl Signaller {
.expect("Failed to build valid request");
let (signing_instructions, _signature) =
sign(signable_request, &signing_params)?.into_parts();
signing_instructions.apply_to_request_http0x(&mut request);
signing_instructions.apply_to_request_http1x(&mut request);
let url = request.uri().to_string();

View file

@ -13,7 +13,7 @@ use gst::glib::once_cell::sync::Lazy;
use gst::glib::Properties;
use gst::prelude::*;
use gst::subclass::prelude::*;
use http_1::Uri;
use http::Uri;
use rand::prelude::*;
use serde::{Deserialize, Serialize};
use std::ops::ControlFlow;
@ -260,7 +260,7 @@ impl Signaller {
.into_client_request()?;
request.headers_mut().append(
"Sec-WebSocket-Protocol",
http_1::HeaderValue::from_static("janus-protocol"),
http::HeaderValue::from_static("janus-protocol"),
);
let (ws, _) = timeout(