fallbackswitch: Add fallbacksource element that automatically retries playback of an URI

This is a wrapper around uridecodebin3 and fallbackswitch that allows to
switch to a still frame on errors and automatically retries the source
in the background on errors until a given retry timeout is reached.
This commit is contained in:
Sebastian Dröge 2020-04-08 15:11:16 +03:00
parent 5a7fcfad7f
commit a63991e325
3 changed files with 1791 additions and 2 deletions

View file

@ -13,7 +13,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
glib-sys = { git = "https://github.com/gtk-rs/sys" }
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"], optional = true }
gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" }
gstreamer-audio = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
gstreamer-video = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }

File diff suppressed because it is too large Load diff

View file

@ -41,10 +41,12 @@ mod gst_base {
extern crate once_cell;
mod fallbacksrc;
mod fallbackswitch;
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
fallbackswitch::register(plugin)?;
fallbacksrc::register(plugin)?;
Ok(())
}
@ -53,7 +55,7 @@ gst_plugin_define!(
env!("CARGO_PKG_DESCRIPTION"),
plugin_init,
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
"MIT/X11",
"LGPL",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_REPOSITORY"),