uriplaylistbin: example: add queues

Prevent pipeline starvation with some media such as
https://assets.onestream.live/studio/Videos/1080p/osl-interval-1080p-8.mp4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1064>
This commit is contained in:
Guillaume Desmottes 2023-01-27 12:09:50 +01:00 committed by GStreamer Marge Bot
parent 8576af247b
commit 138c318be6

View file

@ -44,10 +44,13 @@ fn create_pipeline(uris: Vec<String>, iterations: u32) -> anyhow::Result<gst::Pi
let pad_name = src_pad.name();
let sink = if pad_name.starts_with("audio") {
gst::parse_bin_from_description("audioconvert ! audioresample ! autoaudiosink", true)
gst::parse_bin_from_description(
"queue ! audioconvert ! audioresample ! autoaudiosink",
true,
)
.unwrap()
} else if pad_name.starts_with("video") {
gst::parse_bin_from_description("videoconvert ! autovideosink", true).unwrap()
gst::parse_bin_from_description("queue ! videoconvert ! autovideosink", true).unwrap()
} else {
unimplemented!();
};