mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
examples: webrtc: Update dependencies in Rust examples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6078>
This commit is contained in:
parent
6bb47a125f
commit
0871d1edc4
10 changed files with 663 additions and 889 deletions
508
subprojects/gst-examples/webrtc/janus/rust/Cargo.lock
generated
508
subprojects/gst-examples/webrtc/janus/rust/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -11,15 +11,15 @@ clap = { version = "4", features = ["derive"] }
|
|||
anyhow = "1"
|
||||
url = "2"
|
||||
rand = "0.8"
|
||||
async-tungstenite = { version = "0.24", features = ["gio-runtime"] }
|
||||
gst = { package = "gstreamer", version = "0.21" }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.21" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.21" }
|
||||
async-tungstenite = { version = "0.25", features = ["gio-runtime"] }
|
||||
gst = { package = "gstreamer", version = "0.22" }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.22" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.22" }
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1.0.53"
|
||||
http = "1.0"
|
||||
glib = "0.18"
|
||||
gio = "0.18"
|
||||
glib = "0.19"
|
||||
gio = "0.19"
|
||||
log = "0.4.8"
|
||||
env_logger = "0.10"
|
||||
env_logger = "0.11"
|
||||
|
|
|
@ -489,7 +489,7 @@ impl JanusGateway {
|
|||
);
|
||||
|
||||
let encode_bin =
|
||||
gst::parse_bin_from_description_with_name(bin_description, false, "encode-bin")?;
|
||||
gst::parse::bin_from_description_with_name(bin_description, false, "encode-bin")?;
|
||||
|
||||
pipeline.add(&encode_bin).expect("Failed to add encode bin");
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ impl App {
|
|||
}
|
||||
|
||||
fn new() -> Result<Self, anyhow::Error> {
|
||||
let pipeline = gst::parse_launch(
|
||||
let pipeline = gst::parse::launch(
|
||||
"webrtcbin name=webrtcbin stun-server=stun://stun.l.google.com:19302 \
|
||||
videotestsrc pattern=ball ! videoconvert ! queue name=vqueue",
|
||||
)?;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,10 +10,10 @@ async-std = "1"
|
|||
clap = { version = "4", features = ["derive"] }
|
||||
anyhow = "1"
|
||||
rand = "0.8"
|
||||
async-tungstenite = { version = "0.24", features = ["async-std-runtime", "async-native-tls"] }
|
||||
gst = { package = "gstreamer", version = "0.21" }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.21" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.21" }
|
||||
async-tungstenite = { version = "0.25", features = ["async-std-runtime", "async-native-tls"] }
|
||||
gst = { package = "gstreamer", version = "0.22" }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.22" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.22" }
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
|
|
|
@ -153,7 +153,7 @@ impl App {
|
|||
anyhow::Error,
|
||||
> {
|
||||
// Create the GStreamer pipeline
|
||||
let pipeline = gst::parse_launch(
|
||||
let pipeline = gst::parse::launch(
|
||||
&format!(
|
||||
"videotestsrc is-live=true ! vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay pt=96 picture-id-mode=15-bit ! tee name=video-tee ! \
|
||||
queue ! fakesink sync=true \
|
||||
|
@ -302,7 +302,7 @@ impl App {
|
|||
bail!("Peer {peer_id} already called");
|
||||
}
|
||||
|
||||
let peer_bin = gst::parse_bin_from_description(
|
||||
let peer_bin = gst::parse::bin_from_description(
|
||||
"queue name=video-queue ! webrtcbin. \
|
||||
queue name=audio-queue ! webrtcbin. \
|
||||
webrtcbin name=webrtcbin",
|
||||
|
@ -819,14 +819,14 @@ impl Peer {
|
|||
.ok_or_else(|| anyhow!("no media type in caps {caps:?}"))?;
|
||||
|
||||
let conv = if media_type == "video" {
|
||||
gst::parse_bin_from_description(
|
||||
gst::parse::bin_from_description(
|
||||
&format!(
|
||||
"decodebin name=dbin ! queue ! videoconvert ! videoscale ! capsfilter name=src caps=video/x-raw,width={VIDEO_WIDTH},height={VIDEO_HEIGHT},pixel-aspect-ratio=1/1"
|
||||
),
|
||||
false,
|
||||
)?
|
||||
} else if media_type == "audio" {
|
||||
gst::parse_bin_from_description(
|
||||
gst::parse::bin_from_description(
|
||||
"decodebin name=dbin ! queue ! audioconvert ! audioresample name=src",
|
||||
false,
|
||||
)?
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,11 +10,11 @@ async-std = "1"
|
|||
clap = { version = "4", features = ["derive"] }
|
||||
anyhow = "1"
|
||||
rand = "0.8"
|
||||
async-tungstenite = { version = "0.24", features = ["async-std-runtime", "async-native-tls"] }
|
||||
gst = { package = "gstreamer", version = "0.21" }
|
||||
gst-rtp = { package = "gstreamer-rtp", version = "0.21", features = ["v1_20"] }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.21" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.21" }
|
||||
async-tungstenite = { version = "0.25", features = ["async-std-runtime", "async-native-tls"] }
|
||||
gst = { package = "gstreamer", version = "0.22" }
|
||||
gst-rtp = { package = "gstreamer-rtp", version = "0.22", features = ["v1_20"] }
|
||||
gst-webrtc = { package = "gstreamer-webrtc", version = "0.22" }
|
||||
gst-sdp = { package = "gstreamer-sdp", version = "0.22" }
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
|
|
|
@ -124,7 +124,7 @@ impl App {
|
|||
anyhow::Error,
|
||||
> {
|
||||
// Create the GStreamer pipeline
|
||||
let pipeline = gst::parse_launch(
|
||||
let pipeline = gst::parse::launch(
|
||||
"videotestsrc pattern=ball is-live=true ! vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay name=vpay pt=96 picture-id-mode=15-bit ! webrtcbin. \
|
||||
audiotestsrc is-live=true ! opusenc perfect-timestamp=true ! rtpopuspay name=apay pt=97 ! application/x-rtp,encoding-name=OPUS ! webrtcbin. \
|
||||
webrtcbin name=webrtcbin"
|
||||
|
@ -623,12 +623,12 @@ impl App {
|
|||
let name = caps.structure(0).unwrap().name();
|
||||
|
||||
let sink = if name.starts_with("video/") {
|
||||
gst::parse_bin_from_description(
|
||||
gst::parse::bin_from_description(
|
||||
"queue ! videoconvert ! videoscale ! autovideosink",
|
||||
true,
|
||||
)?
|
||||
} else if name.starts_with("audio/") {
|
||||
gst::parse_bin_from_description(
|
||||
gst::parse::bin_from_description(
|
||||
"queue ! audioconvert ! audioresample ! autoaudiosink",
|
||||
true,
|
||||
)?
|
||||
|
|
Loading…
Reference in a new issue