Repository navigation
fix: U cell / udp:// slots — lossy pushed stream decoded instead of staying black (#133) - #146
Conversation
…ery key frame is decoded damaged instead of staying black (#133) The UDP stall check now covers pushed streams (no RTSP, so it never ran for them). After 8 s of packets without a decoded frame the cell passes NAL units with a lost piece on cut short at the gap; the decoder conceals the rest. Corner: "· damaged"; /stats.json: nal_damaged. Co-Authored-By: Claude <noreply@anthropic.com>
|
/review |
…amaged too (#133) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review by Qodo
1.
|
…ding ends when a pushed stream goes quiet, the counter says what it counts Co-Authored-By: Claude <noreply@anthropic.com>
|
/review |
|
Code review by qodo was updated up to the latest commit 0c64fcc |
Co-Authored-By: Claude <noreply@anthropic.com>
#139) Co-Authored-By: Claude <noreply@anthropic.com>
|
/review |
| if (gap && inFragment) { | ||
| lostDropped++; | ||
| drop("packet loss inside a fragmented NAL unit"); | ||
| dropOrSalvage("packet loss inside a fragmented NAL unit", sink); |
There was a problem hiding this comment.
2. Recovered slices still count as dropped 🐞 Bug ◔ Observability
NalAssembler.assemble() increments lostDropped before dropOrSalvage() can pass the incomplete slice to the sink. Once salvage is active, each qualifying gap therefore increases both the reported nal_dropped count and nal_damaged, even though the slice was passed on rather than dropped.
Agent Prompt
## Issue description
Salvaged slices are included in `nal_dropped` because the packet-loss counter increments before the assembler decides whether to emit or drop the slice.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/NalAssembler.java[101-105]
- android/app/src/main/java/com/openipc/decoder/NalAssembler.java[216-233]
- android/app/src/main/java/com/openipc/decoder/QuadCell.java[423-445]
## Recommended Fix
Count a NAL as dropped only when it is actually discarded. Preserve a separate packet-loss signal for the quad stall detector so changing the diagnostic count does not prevent stall detection.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit c9d3685 |
|
Qodo on c9d3685 — Recovered slices still count as dropped: intended. Device re-test of the merged branch (c9d3685, AG-216): U cell |
Understood. For finding 2, this metric behavior is intentional: |
…come from its JPEG assembler Co-Authored-By: Claude <noreply@anthropic.com>
…ding ends when a pushed stream goes quiet, the counter says what it counts Co-Authored-By: Claude <noreply@anthropic.com>
fix: U cell / udp:// slots — lossy pushed stream decoded instead of staying black (#133)
…come from its JPEG assembler Co-Authored-By: Claude <noreply@anthropic.com>
Closes #133.
Cause: the UDP stall check (#125) only ran for RTSP over UDP (
playsOverUdp()); a pushed stream (udp:// slot, the U cell) islistening, so it never ran. And with every key frame losing a piece,NalAssemblerdropped every key frame: nothing to decode, ever.Fix
RtspSession.listens()).NalAssemblerswitches to salvage: a NAL unit with a lost piece is passed on cut short at the gap instead of being dropped (at least 16 bytes collected). The decoder conceals the missing part. Over RTSP, Auto/Multicast still go to TCP as before (the new connection turns salvage off again inonSdp).· damagedwhile salvaging;/stats.json:nal_damaged(count, only while on).salvagePassesTheNalOnCutShortAtTheGap,salvageOffDropsAsBefore.Device test (AG-216, CI build 36755bd), U cell receiving H.265 1080p30 pushed by a lab camera with steady losses:
in_fps≈ 30,out_fps0, black cell;1920×1088 H.265 30/30 fps · damaged,nal_damaged19 in a minute; the picture looks clean — the concealed tail of a key frame is not visible at grid size.FATAL EXCEPTION.