feature/PNG-Decoding-Support,Video Player,AVI-Decoding,Hostshare#14
feature/PNG-Decoding-Support,Video Player,AVI-Decoding,Hostshare#14SXnell wants to merge 5 commits intoviralcode:mainfrom
Conversation
|
oops sorry, new to github! |
|
This PR adds a basic in-OS video playback experience (MJPEG-in-AVI, video-only) and a smooth host-to-OS workflow for importing and testing videos via QEMU virtio-9p hostshare. It also improves hostshare browsing reliability and integrates .avi launching from the File Manager. Key Features Video Player app (MJPEG AVI) Plays MJPEG-in-AVI in a window with fullscreen support. Adds /Host/ (hostshare root) and /Videos/Host/ (hostshare Videos) access from the File Manager. Adds hostshare-sync-videos.sh invoked by make run-gui / make run-gpu. On boot, imports playlist entries from videos.txt into the OS /Videos/ folder. If an original host .avi isn’t MJPEG, the player automatically tries the converted _mjpg version when available. Put any AVI files into hostshare/Videos/ on the host. Playback is currently MJPEG-in-AVI (video only). “Standard” AVI codecs (H.264/DivX/etc.) are supported through host-side conversion, not native decoding yet. Video player + File Manager launch integration: window.c |

PNG decode pipeline
Added media_decode_png_buffer() with size/overflow checks and optional caller‑provided buffer support to match the JPEG API.
Switched PNG output to 0xAARRGGBB and preserved alpha per pixel; JPEG output now forces A=0xFF for consistency.
Added safeguards for oversized images in both PNG and JPEG paths.
Rendering + blending
Introduced a small alpha‑blend helper to composite PNG pixels onto the existing RGB framebuffer.
Applied blending in:
Image Viewer draw path (including scaled/rotated render)
Wallpaper rendering (blends PNG onto gradient background)
Wallpaper thumbnails in Settings
Dock icons (PNG RGBA arrays)
Image Viewer toolbar icons (RGBA arrays)
System assets / RAMFS seeding
Added wallpaper.png to the bootstrap asset generator.
Embedded wallpaper.png as a C asset and seeded wallpaper.png at boot.
Switched wallpaper selection to prefer wallpaper.png.
UI + UX
Terminal view command now accepts .png files (help text + validation).
README updated to document PNG support and decoder attribution.
Generated assets
Generated bootstrap_wallpaper_png.c.
Regenerated existing JPEG bootstrap assets as part of the asset pipeline run (if applicable).
Tested on M4 Mac, QEMU virt machine on ARM64 (Cortex‑A72), QEMU ramfb 1024x768