sf-ui 0.1.4: video sound always decoded (no AC3 passthrough)
All checks were successful
ci / test (push) Successful in 21m47s
All checks were successful
ci / test (push) Successful in 21m47s
When the HDMI sink also offers AC3/E-AC3 passthrough (WirePlumber's
iec958 codecs), pulsesink took the encoded track as it was: a 44.1 kHz
AC3 track failed at once ("Failed to connect stream: No such entity")
and a 48 kHz one went out as a bitstream that stuttered on a Raspberry
Pi 4. The player's audio sink is now audioconvert ! audioresample !
audio/x-raw ! pulsesink, so it always gets PCM.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -4810,7 +4810,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sf-app"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"log",
|
||||
@@ -4820,7 +4820,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sf-pack"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ruzstd",
|
||||
@@ -4832,7 +4832,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sf-ui"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glow 0.16.0",
|
||||
@@ -4848,7 +4848,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sf-ui-gallery"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"env_logger",
|
||||
|
||||
@@ -5,7 +5,7 @@ members = ["sf-app", "sf-ui", "sf-ui/gallery", "sf-pack"]
|
||||
exclude = ["templates/rust-app"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://gitea.bluefox.support/fennec/sdk"
|
||||
|
||||
@@ -229,11 +229,16 @@ impl Player {
|
||||
Err(e) => log::warn!("video: vapostproc: {e}"),
|
||||
}
|
||||
}
|
||||
if let Some(audio) = ["pulsesink", "pipewiresink"]
|
||||
.iter()
|
||||
.find_map(|n| gst::ElementFactory::make(n).build().ok())
|
||||
{
|
||||
playbin.set_property("audio-sink", &audio);
|
||||
// Always decoded sound (PCM). When the HDMI sink also offers AC3/E-AC3
|
||||
// passthrough, pulsesink would take the encoded track as it is: a
|
||||
// 44.1 kHz AC3 track then fails ("Failed to connect stream: No such
|
||||
// entity") and a 48 kHz one goes out as a bitstream that stutters on
|
||||
// the Raspberry Pi.
|
||||
if let Some(sink) = ["pulsesink", "pipewiresink"].into_iter().find(|n| gst::ElementFactory::find(n).is_some()) {
|
||||
match gst::parse::bin_from_description(&format!("audioconvert ! audioresample ! audio/x-raw ! {sink}"), true) {
|
||||
Ok(bin) => playbin.set_property("audio-sink", &bin),
|
||||
Err(e) => log::warn!("video: audio sink: {e}"),
|
||||
}
|
||||
}
|
||||
playbin.set_property("subtitle-font-desc", opts.subtitle_font.as_str());
|
||||
playbin.set_property("av-offset", opts.audio_offset_ms * 1_000_000);
|
||||
|
||||
Reference in New Issue
Block a user