mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
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:
parent
8576af247b
commit
138c318be6
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
.unwrap()
|
||||
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!();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue