feat: play through GStreamer instead of mpv

A Flatpak cannot run the host's mpv, and SteamOS does not ship one.
GStreamer comes with the Flatpak runtime, so the player now drives
playbin in-process. The next track is handed over in about-to-finish,
which keeps playback gapless as it was with mpv. GStreamer's HTTP
errors quote the stream URL, so its query string, which carries the
auth token, is stripped before logging.
This commit is contained in:
Ansho Rei
2026-11-04 02:19:07 +01:00
parent 89b9a9a226
commit af307549a8
5 changed files with 484 additions and 132 deletions
Generated
+184 -1
View File
@@ -728,6 +728,16 @@ dependencies = [
"nom 7.1.3",
]
[[package]]
name = "cfg-expr"
version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ba9e9ec16c447027685b1f897b720e18e9a8afd00bd7332c483537e38086c9f"
dependencies = [
"smallvec",
"target-lexicon",
]
[[package]]
name = "cfg-if"
version = "1.0.5"
@@ -1735,6 +1745,19 @@ dependencies = [
"windows",
]
[[package]]
name = "gio-sys"
version = "0.22.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c28739f914c15b87a9856000bed9cbd5b3a8afbca5e982d9a299e1601422cb5"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"windows-sys 0.61.2",
]
[[package]]
name = "gl_generator"
version = "0.14.0"
@@ -1746,6 +1769,49 @@ dependencies = [
"xml-rs",
]
[[package]]
name = "glib"
version = "0.22.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4cf9e5bd8713f1990a92c422998826e0fb34824277b46bc59757373483c6694"
dependencies = [
"bitflags 2.13.2",
"futures-channel",
"futures-core",
"futures-executor",
"futures-task",
"futures-util",
"gio-sys",
"glib-macros",
"glib-sys",
"gobject-sys",
"libc",
"memchr",
"smallvec",
]
[[package]]
name = "glib-macros"
version = "0.22.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9597c68fa7bdf4154a3079642cd21c4dccac0b0bdd2897d82861523bf91e7b9"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 3.0.9",
]
[[package]]
name = "glib-sys"
version = "0.22.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99b38907e67e40dec9b60f858bcada952598719cb512a13eb13d6cdcd16f8295"
dependencies = [
"libc",
"system-deps",
]
[[package]]
name = "glob"
version = "0.3.4"
@@ -1830,6 +1896,17 @@ dependencies = [
"gl_generator",
]
[[package]]
name = "gobject-sys"
version = "0.22.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07595c9ba696bd9819cb6a8df39f08078f3dd679508fe052dd558492c2053834"
dependencies = [
"glib-sys",
"libc",
"system-deps",
]
[[package]]
name = "gpu-allocator"
version = "0.28.0"
@@ -1850,6 +1927,44 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5"
[[package]]
name = "gstreamer"
version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4237e2066a25ecb7e54be6c066409e30615920265b9799b8d560ef8ac9857c6"
dependencies = [
"cfg-if",
"futures-channel",
"futures-core",
"futures-util",
"glib",
"gstreamer-sys",
"itertools 0.15.0",
"kstring",
"libc",
"muldiv",
"num-integer",
"num-rational",
"option-operations",
"pastey",
"pin-project-lite",
"smallvec",
"thiserror 2.0.21",
]
[[package]]
name = "gstreamer-sys"
version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "436d9532847489a8285d57b8c3670762c12a18f777fdc2ab159b52e0e6f521b9"
dependencies = [
"cfg-if",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
]
[[package]]
name = "half"
version = "2.7.1"
@@ -2835,6 +2950,15 @@ dependencies = [
"zbus",
]
[[package]]
name = "kstring"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a09b82a7f771ed02dc0dd9b27130a0fa5499fa15ed3027116c1e5e4e591bd9e"
dependencies = [
"static_assertions",
]
[[package]]
name = "kurbo"
version = "0.13.1"
@@ -3120,6 +3244,12 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "muldiv"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0"
[[package]]
name = "naga"
version = "30.0.1"
@@ -3225,6 +3355,25 @@ dependencies = [
"memchr",
]
[[package]]
name = "num-integer"
version = "0.1.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
dependencies = [
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
dependencies = [
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.19"
@@ -3619,6 +3768,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "option-operations"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aca39cf52b03268400c16eeb9b56382ea3c3353409309b63f5c8f0b1faf42754"
dependencies = [
"pastey",
]
[[package]]
name = "orbclient"
version = "0.3.55"
@@ -4234,8 +4392,8 @@ dependencies = [
"env_logger",
"fontique",
"gilrs",
"gstreamer",
"image",
"libc",
"log",
"lru",
"md5",
@@ -5048,6 +5206,19 @@ dependencies = [
"web-sys",
]
[[package]]
name = "system-deps"
version = "9.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db551ad38aac61d5e0343e0eeeb0163be3115c4e23b6a025959570ee0c03c67d"
dependencies = [
"cfg-expr",
"heck",
"pkg-config",
"toml",
"version-compare",
]
[[package]]
name = "taffy"
version = "0.10.1"
@@ -5071,6 +5242,12 @@ dependencies = [
"xattr",
]
[[package]]
name = "target-lexicon"
version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
[[package]]
name = "task-local"
version = "0.1.1"
@@ -5585,6 +5762,12 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "version-compare"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"
[[package]]
name = "version_check"
version = "0.9.5"