Skip to content

feat: the U cell plays pushed UDP RTP on port 5600, first in decoding priority (#87, #94) - #111

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

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

Conversation

@compot-dev

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

Copy link
Copy Markdown
Collaborator

Closes #87, closes #94.

Note: a slot with udp://@:5600 and the U cell would both bind port 5600; use another port in slots.

Device check: Majestic outgoing from a lab camera to udp://<box>:5600 → picture in the ninth cell and in the U view; hint with the box's address before the stream; debug page.

Device check (Aceline-1, build 7607ce8): Majestic outgoing on .165 to udp://172.17.32.144:5600 → the ninth cell plays it (H.265 1920×1088), /stats.json lists it as slot U, transport UDP; Majestic reports the destination live.

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Active U streams lose planner priority 📎 Requirement gap ➹ Performance
Description
createQuadCells() always adds the U stream at index 8, while planDecoding() orders cells by
index after the optional audio cell. When U receives frames, it follows every configured slot and
any selected audio cell, so lower-priority streams can be promoted first.
Code

android/app/src/main/java/com/openipc/decoder/Decoder.java[R797-803]

+        quadCells = new QuadCell[CELL_COUNT];
+        for (int i = 0; i < CELL_COUNT; i++) {
         if (quadViews[i] == null) continue;
-            String url = mHosts[i];
+            String url = i == U_CELL ? UDP_CELL_URL : mHosts[i];
         if (url == null || url.isEmpty() || url.equals(DEFAULT_URL)) continue;
-            quadCells[i] = new QuadCell(i, url, mTransports[i], quadViews[i], framePool, mUserAgent,
+            Transport.Mode mode = i == U_CELL ? Transport.Mode.UDP : mTransports[i];
+            quadCells[i] = new QuadCell(i, url, mode, quadViews[i], framePool, mUserAgent,
Evidence
The changed cell creation code starts the U receiver at index 8, while the planner's branch
implementation adds the audio cell first and then iterates from index 0 upward, leaving U after all
slots.

Prioritize active U stream decoding
android/app/src/main/java/com/openipc/decoder/Decoder.java[797-803]
android/app/src/main/java/com/openipc/decoder/Decoder.java[984-1000]

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 U stream is appended at index 8 and the decode planner still schedules cells by audio selection followed by index order, so an active U stream is not prioritized ahead of slots as required by PR Compliance ID 1.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[797-803]
- android/app/src/main/java/com/openipc/decoder/Decoder.java[984-1000]
## Recommended Fix
Build the planner order with an active, connected U cell first, then the audio-selected cell, then ordinary slots. Ensure the U cell is only treated as active when it is receiving and decoding data, while preserving the existing promotion and demotion behavior for all other cells.

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


2. The hint test suite no longer compiles ✓ Resolved
Description
Decoder.udpHintText(List, int) replaces the string-based signature, but
udpCellHintNamesPortAndAddress() still passes a string for its address case and null for its
fallback case. The string argument prevents the test sources from compiling, so the new zero-, one-,
and multiple-address tests cannot run.
Code

android/app/src/main/java/com/openipc/decoder/Decoder.java[R787-792]

+    static String udpHintText(List<String> ips, int port) {
+        StringBuilder target = new StringBuilder();
+        for (String ip : ips) target.append('\n').append(ip).append(':').append(port);
+        if (target.length() == 0) target.append("\nthis device:").append(port);
+        return "UDP RTP \u00b7 port " + port + "\nWaiting for a stream\u2026\n\n"
+                + "Send the camera's RTP/UDP output to" + target;
Evidence
The production formatter now accepts List and has no string overload, while the existing test
still passes "192.168.1.20" at line 54, which Java cannot convert to a list. The newly added tests
use lists but leave that earlier call unchanged; the existing fallback case also still passes
null.

Refresh U hint addresses on network changes and test formatting
android/app/src/main/java/com/openipc/decoder/Decoder.java[786-792]
android/app/src/test/java/com/openipc/decoder/QuadGridTest.java[50-56]
android/app/src/test/java/com/openipc/decoder/QuadGridTest.java[52-74]

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 hint formatter now accepts a list of addresses, but an existing test still passes a string for its address case, preventing the test sources from compiling.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[786-792]
- android/app/src/test/java/com/openipc/decoder/QuadGridTest.java[50-59]
## Recommended Fix
Update the existing test to pass `Collections.singletonList("192.168.1.20")` for the one-address case and `Collections.emptyList()` for the fallback case, or provide a compatible overload if preserving the old API is intentional. Keep the added zero-, one-, and multiple-address assertions, then run the unit tests.

ⓘ 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 turn these tips off under Display > Comment parts

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +797 to +803
quadCells = new QuadCell[CELL_COUNT];
for (int i = 0; i < CELL_COUNT; i++) {
if (quadViews[i] == null) continue;
String url = mHosts[i];
String url = i == U_CELL ? UDP_CELL_URL : mHosts[i];
if (url == null || url.isEmpty() || url.equals(DEFAULT_URL)) continue;
quadCells[i] = new QuadCell(i, url, mTransports[i], quadViews[i], framePool, mUserAgent,
Transport.Mode mode = i == U_CELL ? Transport.Mode.UDP : mTransports[i];
quadCells[i] = new QuadCell(i, url, mode, quadViews[i], framePool, mUserAgent,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Active u streams lose planner priority 📎 Requirement gap ➹ Performance

createQuadCells() always adds the U stream at index 8, while planDecoding() orders cells by
index after the optional audio cell. When U receives frames, it follows every configured slot and
any selected audio cell, so lower-priority streams can be promoted first.
Agent Prompt
## Issue description
The U stream is appended at index 8 and the decode planner still schedules cells by audio selection followed by index order, so an active U stream is not prioritized ahead of slots as required by PR Compliance ID 1.

## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[797-803]
- android/app/src/main/java/com/openipc/decoder/Decoder.java[984-1000]

## Recommended Fix
Build the planner order with an active, connected U cell first, then the audio-selected cell, then ordinary slots. Ensure the U cell is only treated as active when it is receiving and decoding data, while preserving the existing promotion and demotion behavior for all other cells.

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

Comment thread android/app/src/main/java/com/openipc/decoder/Decoder.java
@compot-dev compot-dev changed the title feat: the U cell plays pushed UDP RTP on port 5600 (#87) feat: the U cell plays pushed UDP RTP on port 5600, first in decoding priority (#87, #94) Oct 13, 2026
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Qodo finding 1 (Active U streams lose planner priority) is fixed in effd3d0: the U cell comes first in the planner once its stream plays (#94). Device check (Aceline-1, effd3d0): U at full rate (.165 pushed H.265 1080p30), slots 1–8 on key frames within the learnt capacity.

@compot-dev
compot-dev merged commit 22c890e into v2 Oct 13, 2026
4 checks passed
@compot-dev
compot-dev deleted the feat/udp-cell branch October 13, 2026 10:24
compot-dev added a commit that referenced this pull request Oct 15, 2026
feat: the U cell plays pushed UDP RTP on port 5600, first in decoding priority (#87, #94)
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.

Decoding priority: the U stream first once data arrives U cell: receive the pushed UDP RTP stream (udp://@:5600) in the ninth cell and the U view

1 participant