ffmpeg is included conditionally via withVideoBackend (default true),
allowing packagers to opt out by passing withVideoBackend = false,
which also passes -DVIDEO_BACKEND=OFF to cmake.
Move FFmpeg decode thread, frame buffering, and lifecycle management
out of CBackground into a dedicated CVideoBackend class. Background.hpp
no longer includes FFmpeg headers. CBackground interacts with video
purely via open(), swapFrame(), and frameW/H().
Extend the background widget to natively decode and display video
files (mp4, mkv, webm, avi, mov, gif, and more) using FFmpeg, with
no external tools required.
- Detection is extension-based; existing image paths are unaffected
- A background decode thread paces frames to their PTS timestamps
and publishes them to the render thread via an O(1) mutex-swap,
avoiding any memcpy per frame
- sws_getCachedContext handles codecs that only report their pixel
format after the first decoded frame
- Videos loop seamlessly via av_seek_frame at EOF
- blur_passes works on video frames the same as on images
- No new config keys: path = /path/to/video.mp4 is sufficient
Add libavcodec, libavformat, libavutil, and libswscale to the
pkg_check_modules dependency list to support native video decoding
in the background widget.
Properly lock AWP<IWidget> weak pointers before calling onAssetUpdate()
to prevent use-after-free when widgets are destroyed during shutdown or
output removal. Guard timer callback against null g_asyncResourceManager.
Fix destruction order to join threads before resetting globals.
* core: use Hyprgraphics::CAsyncResourceGatherer
* core: move screencopy frame generation to the new resource manager
* core: introduce a dedicated onAssetUpdate callback
* check for unloaded before finished and some cleanup
* also allow for dynamic label resource deduplication
use a simple counter instead of a timestamp to allow the same
widget on a different monitor to reuse a text cmd resource.
I didn't do this before, because I was worried about two labels that use
the same command with different reload times. I mitigated that by just
incrementing the revision by the time interval. This should be sufficent
to avoid clashes.
* don't render within onAssetUpdate to avoid duplicate renders
another much improvement for multi monitor setups.
allows updating within the same frame for most labels.
* remove nvidia workaround :)
I tested and it seems like the resource manager revision makes
the nvidia workaround obsolete.
FreeBSD has the pam library installed in the base system. However, it does not provide pam.pc file. So pkg_check_modules() fails to detect pam library. With this change, cmake tries to find it using find_library() first and falls back to pkg_check_modules().
Use nixbuild/nix-quick-install-action which pairs well with
nix-community/cache-nix-action.
Should help with build times by reducing the number of packages needing
to be re-downloaded on each run.
Parameters are taken from https://github.com/nix-community/cache-nix-action
and may be tweaked later.