Skip to content

Recordings screen: DJI-style download & preview (primary mode)#1

Open
wkumik wants to merge 7 commits into
mainfrom
feat/recordings-screen
Open

Recordings screen: DJI-style download & preview (primary mode)#1
wkumik wants to merge 7 commits into
mainfrom
feat/recordings-screen

Conversation

@wkumik

@wkumik wkumik commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Makes onboard-recording transfer the app's primary feature (DJI-style), with the live USB viewer demoted to a secondary menu entry.

What's new

  • Material 3 dark "album" UI — 16:9 thumbnails, duration badge, size/date, per-item download progress, play/share/delete.
  • RubyShell — SSH client to the drone's dropbear. Transfers via exec + cat/stat, not SFTP, because the SigmaStar dropbear build ships no SFTP/SCP subsystem (pscp -sftp fails).
  • Lossless .ts.mp4 remux on-device (MediaExtractor + MediaMuxer, zero re-encode) for reliable seeking + shareable mp4. Falls back to playing the .ts if remux fails.
  • Native HEVC playback (VideoView), first-frame thumbnails (MediaMetadataRetriever), share sheet (FileProvider), delete from drone/phone.
  • WifiJoiner (WifiNetworkSpecifier on API 29+, system Wi-Fi panel fallback) — staged for the drone's upcoming "phone-transfer mode" AP.

Notes / follow-ups

  • In-app Wi-Fi auto-join isn't wired into Connect yet — it waits on the drone-side AP ("phone-transfer mode") so it can be tested end-to-end. For now, join the drone Wi-Fi manually (or set host to the LAN IP in ⋮ → Connection settings) then tap Connect.
  • Default host is 192.168.4.1 (the planned AP IP); override in Connection settings for dev testing.

🤖 Generated with Claude Code

wkumik and others added 7 commits June 13, 2026 14:40
Onboard drone recordings become the app's primary feature; the live USB
viewer moves to a secondary menu entry.

- Material 3 dark "album" UI (RecordingsActivity): 16:9 thumbnails, duration
  badge, size/date, per-item download progress and actions.
- RubyShell: SSH client over the drone's dropbear. Uses exec + `cat`/`stat`
  (NOT SFTP) because the SigmaStar dropbear build ships no SFTP/SCP subsystem.
- Lossless .ts -> .mp4 remux on-device via MediaExtractor + MediaMuxer (no
  re-encode) for reliable seeking and shareable mp4.
- Native HEVC playback (VideoView + MediaController), first-frame thumbnails,
  share sheet via FileProvider, delete from drone/phone.
- WifiJoiner (WifiNetworkSpecifier on API 29+, panel fallback) staged for the
  upcoming drone "phone-transfer mode" AP; not yet wired into Connect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… preload

- Playback now uses ExoPlayer (media3) instead of VideoView/MediaPlayer. Fixes
  "no video player available": MediaPlayer decodes in the mediaserver process,
  which can't read app-private files; ExoPlayer reads in-process. Also demuxes
  raw .ts if the remux fell back.
- Edge-to-edge fix: pad the app bar for the status bar and the list for the nav
  bar via WindowInsets (toolbar no longer under the phone status bar).
- Two view modes: large list (as before) + compact 2-col grid, toggled from the
  toolbar and remembered. Grid items act on tap; long-press = context menu.
- Thumbnail preload: fetch a small .ts prefix over SSH (head -c) and extract the
  first frame for not-yet-downloaded clips; thumbnails persist to disk and reload
  on next launch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Thumbnails: replace MediaMetadataRetriever with a MediaExtractor + MediaCodec
  first-frame decoder. MMR can't decode MPEG-TS on Android (returns null), which
  is why preload from a partial .ts prefix produced no thumbnails. The codec path
  is container-agnostic and works on both partial .ts and full .mp4. Requests
  COLOR_FormatYUV420Flexible and converts YUV_420_888 -> NV21 -> Bitmap.
- Versioning: bump to v1.2 (code 3); APK filename now RubyFPV-v<name>-b<code>-<type>.apk
  and the version shows as the toolbar subtitle (BuildConfig).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pure MediaCodec decode (v1.2) produced no thumbnails on device. Make extract try
the most-proven paths first: MMR direct (mp4), then remux the .ts/prefix to a tiny
mp4 via the same Remuxer that builds playable clips and run MMR on that (validated:
a 4MB .ts prefix -c copy -> 166-frame mp4, frame 0 extracts), then MediaCodec as a
last resort. Adds a Log line noting which path won. Bump v1.3 (code 4).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Thumbnails never load on Fairphone 6 / Android 16; logcat shows
MediaExtractor.setDataSource failing for every thumbnail path. To decide
between bad input files vs. an A16 MediaExtractor limitation we need to read
the `extract <id> (<N> B)` instrumentation, but the USB/adb link is flaky and
A16 blocks `adb shell ls` of the app's external files dir.

- DebugLog: tiny in-app ring buffer (already feeding Thumbs/Remuxer).
- RecordingsActivity: menu -> Diagnostics opens a scrollable, monospaced dump
  with Copy (clipboard) / Clear / Close so the pipeline can be inspected and
  pasted out without adb.
- Bump versionCode 5 / versionName 1.4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v1.5 — recordings screen rework:
- Thumbnails and playback via media3 1.6.0 ExperimentalFrameExtractor, which
  decodes HEVC-in-MPEG-TS where the Android framework demuxer reports 0 tracks.
- Play the downloaded .ts directly in ExoPlayer; drop framework remux entirely
  (delete Remuxer.java, no more .ts->.mp4).
- Multi-select (long-press) with bulk delete.
- Per-item delete choice: phone / drone SD card / both.

v1.6 — Return to FPV mode:
- New overflow action: RubyShell.returnToFpv() runs /usr/bin/ap_mode.sh stop,
  rebooting the drone out of phone-transfer AP mode back into normal FPV.
- Disconnect stays lightweight (drops the SSH session only).
- versionCode 7->8, versionName 1.5->1.6.

Also update README to document the phone-transfer workflow, feature list,
build/install instructions, and the no-SFTP dropbear exec/cat transfer design.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump to v2.0 (versionCode 10). Ships the onboard-recording workflow:
- Browse/download onboard .ts clips over the air unit's phone-transfer Wi-Fi AP
- Thumbnails + in-app playback of H.265 .ts
- One-tap .ts→.mp4 export into Movies/RubyFPV via media3 InAppMp4Muxer
- Multi-select delete, Return-to-FPV

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant