deploy: add run.sh launch wrapper with GST_PLUGIN_PATH+LD_PRELOAD for R36S
On linux-aarch64 the conda gst-libav package has an unfixable ABI mismatch
(libdav1d.so.6 missing, libicuuc.so.78 via libxml2-16). Fix: use system
gstreamer1.0-libav installed via apt with GST_PLUGIN_PATH, and preload
system libgomp.so.1 to avoid static TLS block errors when dlopen loads
libgstlibav.so. avdec_h264 and avdec_aac now register correctly on device.
These vars are stored in conda activate.d/gst-env.sh and in deploy/run.sh.
@ -67,14 +67,17 @@ Milestone 3 — SDL Video Viewport, HUD, and Wayland Compatibility
- GStreamer imports now succeed in the dedicated env (`GLib`, `GObject`, `Gst`, `GstApp`, `GstVideo`), and `Application` imports cleanly.
- GStreamer imports now succeed in the dedicated env (`GLib`, `GObject`, `Gst`, `GstApp`, `GstVideo`), and `Application` imports cleanly.
- ArkOS menu launch works on the physical device, and DLNA browsing reaches real MiniDLNA content.
- ArkOS menu launch works on the physical device, and DLNA browsing reaches real MiniDLNA content.
- Real playback is currently blocked by missing decoder elements in the device env: direct probing of a MiniDLNA `.mkv` URL showed missing H.264 High Profile and MPEG-4 AAC decoders, while the user-facing "can't play a text file" message is a misleading fallback caused by an additional text stream in the container.
- Real playback is currently blocked by missing decoder elements in the device env: direct probing of a MiniDLNA `.mkv` URL showed missing H.264 High Profile and MPEG-4 AAC decoders, while the user-facing "can't play a text file" message is a misleading fallback caused by an additional text stream in the container.
- Direct package installs on the physical R36S now added `gst-libav`, `gst-plugins-bad`, `ffmpeg`, `libxml2-16`, and several related runtime libraries into `/home/ark/miniconda3/envs/r36s-dlna-browser`; `h264parse` now registers, but `gst-libav` still does not expose `avdec_h264` because `libgstlibav.so` remains blocked by unresolved `dav1d` and `icu` ABI/runtime mismatches on `linux-aarch64`.
- **RESOLVED**: `gst-libav` conda package on `linux-aarch64` has an unfixable ABI mismatch: `libavcodec.so` links `libdav1d.so.6` (from dav1d <1.3)butonlydav1d1.4.x(`.so.7`)isavailable,andvia`libxml2-16`italsopulls`libicuuc.so.78`whichisnotpackagedforlinux-aarch64onconda-forge.**Solution**:installsystem`gstreamer1.0-libav`(v1.16.1)viaaptanduse`GST_PLUGIN_PATH`+`LD_PRELOAD`toexposeitspluginstothecondaPythonruntime.
- Some optional GStreamer plugins still warn about additional codec libraries (`libxml2`, `libFLAC`, `libvpx`, `mpg123`) that are not yet installed in the env.
- On the physical R36S, `avdec_h264` and `avdec_aac` now register and resolve when launched with:
The `LD_PRELOAD` is required to avoid "cannot allocate memory in static TLS block" from the conda `libgomp.so` being loaded late by dlopen.
- These variables are now persisted in `/home/ark/miniconda3/envs/r36s-dlna-browser/etc/conda/activate.d/gst-env.sh` and explicitly set in `deploy/run.sh`.
## Next Recommended Actions
## Next Recommended Actions
1. Run a visual playback smoke test and confirm SDL-rendered video plus HUD eliminates flashing on host playback.
1. Run a visual playback smoke test and confirm SDL-rendered video plus HUD eliminates flashing on host playback.
2. Validate the SDL-texture playback path on the target R36S `kmsdrm` backend.
2. Validate the SDL-texture playback path on the target R36S `kmsdrm` backend.
3. Measure CPU/load on RK3326 hardware during audio and video playback.
3. Measure CPU/load on RK3326 hardware during audio and video playback.
4. If RGBA upload cost is too high, add a follow-up YUV texture upload path using `SDL_UpdateYUVTexture`.
4. Test real MiniDLNA `.mkv` H.264/AAC media end-to-end from the ArkOS `Ports -> MatHacks` launcher using `deploy/run.sh`.
5. Install matching `gst-libav` and `gst-plugins-bad` packages into `/home/ark/miniconda3/envs/r36s-dlna-browser`, then confirm `avdec_h264`, an AAC decoder, and `h264parse` appear in `gst-inspect-1.0`.
5. If RGBA upload cost is too high, add a follow-up YUV texture upload path using `SDL_UpdateYUVTexture`.
6. Resolve the remaining `gst-libav` runtime chain on `linux-aarch64` by finding a compatible `ffmpeg`/`dav1d`/`icu` combination or by supplying the missing shared libraries manually, then re-test the real MiniDLNA `.mkv` URL with `gst-launch-1.0` and from ArkOS `Ports -> MatHacks`.
6. `avdec_hevc` is still missing (HEVC decoders not in system apt `gstreamer1.0-libav 1.16.1`); AV1 excluded intentionally as too heavy for RK3326 — this is acceptable for the H.264/AAC primary codec target.