Files
hyperion-android-reborn-edited/PIPELINE_CHANGELOG.md
T
robinandCursor 982702cde1
Android CI / build (push) Canceled after 0s
Harden reconnect and WakeLock, add live status UI on the overview.
Fixes flaky Hyperion reconnects and 1h WakeLock cutoffs, disables verbose DEBUG logging, and shows server/FPS/capture stats plus credit in the main status card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 09:11:03 +02:00

43 lines
2.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Pipeline-Changelog – MediaCodec Capture
## Branch: `feature/mediacodec-capture-pipeline` (v3.0.1-mediacodec)
### Problem
Auf Ugoos X5M Pro (Amlogic S905X5M, Android 14):
- FlatBuffers-Verbindung zu Hyperion OK
- MediaProjection-Permission OK
- Playstore-Screenrecorder / scrcpy: **Bild OK**
- Hyperion Grabber (ImageReader): **schwarze Frames**
### Ursache
`MediaProjection → VirtualDisplay → ImageReader` liefert auf diesem SoC keine nutzbaren Pixel.
Encoder-Surfaces (MediaCodec / MediaRecorder) schon — wie bei scrcpy und Screenrecordern.
### Änderung
| Komponente | Vorher | Nachher |
|------------|--------|---------|
| Capture-Consumer | `ImageReader` (RGBA) | `MediaCodec` Encoder-Input-Surface |
| Pixelgewinnung | `acquireLatestImage()` | Encode H.264 → Decode → `getOutputImage()` YUV→RGB |
| VirtualDisplay-Flags | `VIRTUAL_DISPLAY_FLAG_PUBLIC` | `VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR` |
| Consent (API 34+) | Standard-Intent | `MediaProjectionConfig.createConfigForDefaultDisplay()` |
| Capture-Auflösung | LED-Größe (≤128×72) direkt | Codec-freundlich (~640px Breite), dann Downscale |
| Logging | meist aus | Permission, VD, Codec, Non-Zero, Send-FPS |
### Betroffene Dateien
- `common/.../HyperionScreenEncoder.java` — Pipeline-Umbau
- `common/.../util/MediaProjectionHelper.java` — neu
- `BootActivity`, `ToggleActivity`, Mobile/TV `MainActivity` — Capture-Intent
- `HyperionScreenService.java` — Debug-Logs
- `README.md`, dieses Changelog
### Stabilität (X5M Freeze)
- Problem: Codec-Pump alle 1 ms + Capture 960×540 @ 4 Mbit → Gerät eingefroren, App/Settings nicht nutzbar
- Fix: Capture zurück auf **640×360**, Bitrate ~1.5 Mbit, Pump an Ziel-FPS, Letterbox-Crop sofort locken
- Preferences: null-sicheres Caching + robustes `getInt` (leere Strings)
## Follow-up (Reconnect / Status / WakeLock)
- Reconnect: echte Retry-Schleife auch vor erstem Connect; Socket-Close nach Write-Fehler; `isConnected` prüft `!isClosed`
- WakeLock ohne 1h-Timeout (Dauerbetrieb TV)
- `DEBUG=false` in Encoder/Service
- Übersicht: Live-Status (Server, Port, Status, Sende-FPS, Capture→Output, Frames, Priorität)