Ignore buffering messages when within 5 seconds of track end and about-to-finish has been signaled. This prevents spurious buffering from blocking playback during track transitions with local files.
Fixes#1725
Wait for ongoing state changes to complete before setting pipeline to NULL.
This prevents race conditions with async state transitions that can cause crashes in GStreamer elements.
Fixes#1875
Replace per-pipeline QThreadPool with a shared static pool to prevent
file descriptor and thread exhaustion. Each GstEnginePipeline was creating
its own thread pool, leading to resource accumulation during frequent
pipeline creation/destruction (track changes, seeking, crossfade).
The shared pool is limited to 2 threads max since state changes are
typically sequential per pipeline. This prevents the crash in g_wakeup_new()
when creating eventfd for new thread event dispatchers.
Fixes#1687
Add guard in AboutToFinishCallback to prevent race condition when pipeline is being torn down. This prevents the callback from trying to set next URL while the pipeline is being destroyed, which caused crashes in GStreamer's decodebin3.
Fixes issue where rapidly switching tracks could cause segmentation fault in gst_decodebin_input_link_to_slot.
See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4626Fixes#1863
Co-Authored-By: Jonas Kvinge <jonas@jkvinge.net>
Like the card index, the card id is guaranteed to be unique. While card
index can easily change between reboots, the card id is based on the
actual audio hardware and does not change between reboots; or even
hardware changes. This makes using the card id preferable, because it
will "just work" 99% of the time, and removes the need to force cards to
have a specific index.
There is a corner case where card ids may change between reboots: If you
have two (or more) of the same audio hardware in the system. But that
should be rare enough, and requires explicit system configuration
anyway, so using the "custom" option should work here.
If there is an previously-saved index-based ALSA device in the config,
it will continue to work as-is and does not need to be migrated. There
is only a small UI side-effect: Because the index-based device will no
longer match any found id-based device, the settings window will show it
as "custom". Simply selecting the ALSA device from the drop-down again
will change it to the id-based device.
These seem to have appeared in gstreamer 1.26,
which is the version we need to use to guard the handling.
These are effectively geometrically located on the same azimuth,
but on the layer above than the non-top (i.e. middle layer)
surround channels. But they are still surround channels,
which ebur128 does not bias loudness-wise.
At least this is my understanding.