Route Wallpaper Engine video projects to video-native backends and clean up conflicting renderers - #280
Conversation
|
Additional local validation note: the current web cases I tested split into at least two groups. Mouse/parallax-driven web wallpapers such as EVA are detected correctly but may still look static on Wayland when the background surface does not receive pointer motion consistently. Audio/API-driven web wallpapers such as Customizable Module Visualizer can fail earlier in linux-wallpaperengine with runtime/property parsing limitations. I am treating that as follow-up compatibility hardening rather than broadening this video-handoff PR. |
d4408a5 to
01c99b9
Compare
|
Rebased this branch onto current Resolution kept the newer upstream macOS backend change:
and reapplied the PR's transition cleanup:
Validation after the rebase:
I also checked the PR state after push; GitHub now reports it as mergeable/clean. |
01c99b9 to
587317b
Compare
|
Updated this branch after the #279 module-boundary work. The important change is that #280 is still standalone on top of So the review paths are independent:
Validation after the update: Result: 16 tests pass. |
|
Honestly, I don't know about passing some scenes to other backends. I think if the user explicitly selected WE as backend, it should not quietly use other backends for videos. It add this level of complexity for a very hypothetical problem. I think the user should be responsible for the choice of backend and see if the resource usage is acceptable or not. Like, if the user already has the mpvpaper or gslapper installed, I'd expect he to manually switch if the video playing with WE is too heavy. |
Drop the silent video-backend rerouting proposed in anufrievroman#280. The user's selected backend in the picker is always honored. What stays in this branch: - waypaper/wallpaperengine.py: small internal module for project.json normalization (project dir, type/title, entry file). Same module name anufrievroman#278 uses, so the two branches share the metadata surface without re-implementing the helpers. - waypaper/changer.py: cleanup_dynamic_backends(monitor, exclude=...) before each change_with_* call, and find_process_pids that returns all matching PIDs (the old find_process_pid only returned the first match, which could leave a second mpvpaper -f socket-... alive on a multi-monitor switch). - Informational advisory: when the WE path detects a video project under linux-wallpaperengine, print a one-line note about the well-known CPU/battery tradeoff. Gated by cf.we_video_advisory (default True). The note never overrides the user's choice. - Tests for the metadata helpers and the new PID-helper behavior. This is not a behavior change for the image backends. The advisory is the only observable difference from main when the user is on a non-WE backend or a non-video project.
Drop the visible thumbnail label proposed in anufrievroman#278. The picker stays minimal and the app.py GTK layout is unchanged from main. What this branch does instead: - waypaper/wallpaperengine.py: small internal module for project.json normalization (project dir, type/title with normalization, entry file for video projects, title [type] string for the tooltip). - waypaper/common.py: get_image_name now detects Workshop paths by the presence of a sibling project.json and surfaces the normalized 'Title [type]' in the existing tooltip. The same module name anufrievroman#280 uses, so the two branches share the metadata surface without re-implementing the helpers. - waypaper/app.py: 0 lines changed from main. The grid is image-only with the type tag living in the existing set_tooltip_text(name) call. - tests/test_wallpaperengine.py: tests for the metadata helpers, the type-aware label string, and the get_image_name fallback when project.json is missing or malformed. Net effect for the user: hovering a Workshop thumbnail in the picker shows 'Neon Driver [scene]' / 'Title [web]' instead of the raw Steam Workshop numeric ID. No GTK layout change, no visible label.
587317b to
2939e7a
Compare
|
Fair concern, and you're consistent with what you said on the issue.
What stays on this branch, with the rerouting gone:
I'll push the rebased + reduced branch shortly, re-run |
Closes #277
Summary
Route Wallpaper Engine
videoprojects to video-native backends (mpvpaperorgslapper) when available, instead of sending static video loops throughlinux-wallpaperengine.This keeps
sceneandwebprojects onlinux-wallpaperengine, while allowing raw video projects to use backends that already specialize in video playback.Why
Wallpaper Engine video projects are different from interactive scene/web projects: their
project.jsonpoints to a concrete media file such as.mp4or.webm. When Waypaper can identify that intent, handing the media file to a video-native backend avoids unnecessary renderer work and keeps idle desktop playback on the simpler path.The practical effect is a cleaner backend choice:
linux-wallpaperengineArchitecture
This branch is standalone on top of
main; it does not require #279 to be merged first.To keep the same module boundary requested in #279 without making this PR depend on the full launcher-hardening branch, this PR adds a small
waypaper/wallpaperengine.pyhelper module containing only the metadata/routing pieces needed for video handoff:project.jsonloading and type normalizationwaypaper/changer.pyremains the high-level dispatcher: it asks the helper module for the project intent, then callschange_with_mpvpaper(),change_with_gslapper(), or the normallinux-wallpaperenginepath.If #279 lands first, the shared module boundary can be reconciled during a normal rebase. If #279 does not land, this PR still remains reviewable as the narrow video-routing slice.
Scope Boundary
linux-wallpaperengine.Validation
python3 -m py_compile waypaper/changer.py waypaper/common.py waypaper/wallpaperengine.py tests/test_wallpaperengine.pypython3 -m unittest discover -s testsgit diff --check origin/main...HEADCurrent result: 16 tests pass.