Commit Graph
12 Commits
Author SHA1 Message Date
Matteo Benedetto 5332ce9880 fix: use named c_ubyte arrays to prevent dangling pointer segfault in SDL_UpdateNVTexture 2026-03-24 00:31:44 +01:00
Matteo Benedetto bb0ac90c96 feat: add detailed logging for NV12 frames, GStreamer warnings, and render errors 2026-03-24 00:26:17 +01:00
Matteo Benedetto 0c8e2c2a11 player: fix SDL_UpdateNVTexture ctypes cast — cast c_char_Array to LP_c_ubyte 2026-03-24 00:03:34 +01:00
Matteo Benedetto fe2f25d4cf player: auto-enable HW decode when VPU accessible — remove R36S_HW_DECODE opt-in gate 2026-03-24 00:00:19 +01:00
Matteo Benedetto 9b8ddb3a05 ui: fix PAGE_UP/PAGE_DOWN crash — use self._layout.page_size not theme.PAGE_SIZE 2026-03-23 23:55:47 +01:00
Matteo Benedetto 6715f4b227 player: log last DLNA URL to /tmp/dlna_last_url.txt on play(); tests: auto-load it in diagnostic script 2026-03-23 23:50:11 +01:00
Matteo Benedetto 6e15fcab5a player: NV12 zero-copy SDL upload path for Rockchip MPP hardware decode
- _Frame: add pixel_format ('BGRA'|'NV12'), uv_pixels, uv_pitch fields
- _create_appsink: accept NV12 caps when R36S_HW_DECODE=1 (NV12;BGRA fallback)
- render(): choose SDL_PIXELFORMAT_NV12 texture + SDL_UpdateNVTexture for NV12
  frames, avoiding any software colourspace conversion on the CPU
- _on_new_sample: detect format via VideoInfo.finfo.name, extract Y+UV planes
  separately from NV12 GStreamer buffers
- _destroy_texture: reset _texture_format to 'BGRA'
- deploy/arkos/MatHacks.sh: set R36S_HW_DECODE=1 to activate the path
- tests/test_player.py: add finfo mock, pixel_format to SimpleNamespace frame
2026-03-23 22:58:08 +01:00
Matteo Benedetto e23c57318f player: disable mppvideodec auto-rank-boost, add R36S_HW_DECODE=1 opt-in
mppvideodec outputs NV12 (hardware format) which GStreamer videoconvert
converts to BGRA in scalar software code — slower than avdec_h264 which
uses libav's NEON-optimised YUV→BGRA path.

Default behaviour: software decode (avdec_h264) at PRIMARY rank.
The MPP plugin is still detected and logged so the user knows it is
installed and operational.

Set R36S_HW_DECODE=1 to re-enable the rank boost once a zero-copy
NV12→SDL_UpdateNVTexture (or similar) upload path is implemented.
2026-03-23 22:49:16 +01:00
Matteo Benedetto ddbe31dc02 player: probe Rockchip MPP/V4L2 HW decoders at pipeline init, add setup_hw_decode.sh 2026-03-23 21:42:25 +01:00
Matteo Benedetto 544ed8bc6d ui: runtime-scaled layout for 640x480 and 720x720 displays 2026-03-22 16:57:24 +01:00
Matteo Benedetto 193e914ffd Refresh env, add aiohttp dep, improve resource selection and GStreamer flags 2026-03-22 12:32:40 +01:00
Matteo Benedetto 1d89c7fdc7 Initial import 2026-03-21 15:55:32 +01:00