Skip to content

feat: reserved UDP RTP cell: hint in the 9th cell and U in the menu - #71

Merged
compot-dev merged 3 commits into
v2from
feat/udp-cell-hint
Oct 12, 2026
Merged

compot-dev merged 3 commits into
v2from
feat/udp-cell-hint

Conversation

@compot-dev

@compot-dev compot-dev commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Prepares the UI for #68 (pushed RTP over UDP); the receiver itself is developed separately.

Ninth cell. The 3×3 multi-view grid has nine cells for eight slots. The ninth cell is reserved for a camera that pushes RTP over UDP. Until the receiver exists it shows a hint instead of a black square:

UDP RTP · port 5600
Waiting for a stream…

Send the camera's RTP/UDP output to
<device IP>:5600

The address is the device's first site-local IPv4 address ("this device" if none is found).

U in the menu. The menu row is now Q, 1–8, U. U stops the current slot or grid and shows the UDP cell full-screen with the same hint; U is highlighted while the view is shown, and Settings/WebUI are hidden as in multi-view. A slot number or Q leaves the view and starts that slot or the grid; tapping the view opens the menu. The view is not a saved mode: pause/resume or a shared link returns to the slot. When #68 lands, this view shows the received stream.

READMEs (EN/RU/ZH): the reserved cell and the U row in the menu table. Test: QuadGridTest.udpCellHintNamesPortAndAddress.

Built and tested by CI; the device test follows.

The 3x3 grid has nine cells for eight slots. The ninth is reserved for a camera that
pushes RTP over UDP; until the receiver exists it shows the port (5600) and this
device's address to send to, instead of a black square. Test for the hint text;
READMEs mention the reserved cell.
- Menu row: Q, 1-8, U. U stops the current slot or grid and shows the UDP cell
  full-screen with the same hint (port 5600, this device's address); it is
  highlighted while shown, and Settings/WebUI are hidden as in multi-view
- A slot number or Q leaves the UDP view and starts that slot or the grid (a slot
  restarts even if it was the active one); a tap on the view opens the menu
- The view is not a saved mode: pause/resume and a shared link return to the slot
- References point to #68 (pushed RTP over UDP), where the receiver is developed
@compot-dev compot-dev changed the title feat: ninth multi-view cell shows the reserved UDP RTP slot feat: reserved UDP RTP cell: hint in the 9th cell and U in the menu Oct 12, 2026
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Device test of the CI build 4c9a3bb on the AG-216 (Android 10), 8 slots filled:

  • 3×3 grid: the ninth cell shows UDP RTP · port 5600 / Waiting for a stream… / Send the camera's RTP/UDP output to 172.17.32.144:5600, i.e. the box's real LAN address.
  • U: all 8 sessions stop, and the hint is shown full-screen. The menu row is Q 1–8 U with U highlighted; Settings and WebUI are hidden.
  • U → slot 2: the single stream starts. U → Q: the grid comes back with 8 cells. U → Home → resume: the slot comes back. No crash.
  • Remote: OK on the U view opens the menu. The first OK after a touch only leaves touch mode, which is standard Android behaviour and the same in the other views.

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. The ninth grid cell ignores taps ✓ Resolved
Description
buildQuadGrid() adds the UDP hint without the menu-opening click listener installed on the other
grid cells. In a 3×3 grid, tapping that cell does nothing, although tapping any camera cell opens
the menu.
Code

android/app/src/main/java/com/openipc/decoder/Decoder.java[626]

+                    lr.addView(udpHintCell(), new LinearLayout.LayoutParams(
Evidence
The hint is added directly without a click listener; the adjacent camera views receive one, while
the separate full-screen UDP hint has its own listener.

android/app/src/main/java/com/openipc/decoder/Decoder.java[624-636]
android/app/src/main/java/com/openipc/decoder/Decoder.java[325-330]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ninth grid cell does not open the menu when tapped, unlike the camera cells.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[624-636]
## Recommended Fix
Install the same menu-opening click listener on the grid's UDP hint cell that the camera grid cells use.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. The UDP hint can reopen as a blank screen ✓ Resolved
Description
onShowUdp() reuses udpFullView by changing its text and visibility without moving it above the
video-clearing overlay. If a user leaves U for an unconfigured slot, clearVideo() brings its black
overlay to the front, so reopening U places the hint behind that overlay.
Code

android/app/src/main/java/com/openipc/decoder/Decoder.java[R331-334]

+        } else {
+            udpFullView.setText(udpHintText(localIpv4(), UDP_RTP_PORT));
+        }
+        udpFullView.setVisibility(View.VISIBLE);
Evidence
The new camera-switch path calls saveSettings(), which calls clearVideo() for an unconfigured
slot. That method brings the black overlay to the front, whereas reopening U only makes the
previously created hint visible.

android/app/src/main/java/com/openipc/decoder/Decoder.java[273-277]
android/app/src/main/java/com/openipc/decoder/Decoder.java[322-346]
android/app/src/main/java/com/openipc/decoder/Decoder.java[460-466]
android/app/src/main/java/com/openipc/decoder/Decoder.java[777-789]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Reopening U after selecting an unconfigured slot can show a black overlay instead of the UDP hint.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[331-335]
- android/app/src/main/java/com/openipc/decoder/Decoder.java[777-795]
## Recommended Fix
Bring the UDP hint to the front each time U is shown, including when the existing view is reused. Verify the sequence U → unconfigured slot → U.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread android/app/src/main/java/com/openipc/decoder/Decoder.java
Comment thread android/app/src/main/java/com/openipc/decoder/Decoder.java
…on top (Qodo)

- udpHintCell() installs the menu-opening click listener, so the grid cell behaves
  like the camera cells and the full-screen view keeps it
- bringToFront() each time U is shown: after U -> an unconfigured slot, that slot's
  black overlay was in front and would have covered the hint on the next U
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Both Qodo findings are fixed in b1ba131:

  • The ninth grid cell ignores taps: udpHintCell() now installs the menu-opening click listener, so the grid cell behaves like the camera cells; the full-screen view shares it.
  • The UDP hint can reopen as a blank screen: bringToFront() is called each time U is shown, so the black overlay of an unconfigured slot can no longer cover the hint. The sequence U → empty slot → U is part of the device test.

/review

@compot-dev

Copy link
Copy Markdown
Collaborator Author

Device check of the CI build b1ba131: a tap on the ninth grid cell opens the menu, U shows the hint full-screen, and a tap on it opens the menu. The U → empty slot → U path could not be exercised on the device, because all 8 slots are configured; that fix (bringToFront()) is covered by review only. An ANR seen during this session (main waiting for the RenderThread, which was blocked in eglSwapBuffers → SurfaceFlinger) also happened earlier with #64, so it is not caused by this PR; it is tracked in #76.

@compot-dev
compot-dev merged commit 40c0b5c into v2 Oct 12, 2026
4 checks passed
@compot-dev
compot-dev deleted the feat/udp-cell-hint branch October 13, 2026 17:16
compot-dev added a commit that referenced this pull request Oct 15, 2026
feat: reserved UDP RTP cell: hint in the 9th cell and U in the menu
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