For agentic workers: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Make the playback-search endpoint return an RTSP URL that the target Hikvision NVR can actually play while retaining SDK channel 33 for recording lookup.
Architecture: Extend the existing Hikvision login cache value with immutable device channel metadata read from NET_DVR_DEVICEINFO_V40. The playback service uses that metadata to map SDK channel numbers to RTSP display-channel numbers, then passes the resolved RTSP channel to a pure URL builder. RTSP query timestamps keep Beijing clock digits because the target firmware was verified to interpret them as device-local time.
Tech Stack: Java 8, Spring Boot 2.3.4, HCNetSDK/JNA, Caffeine, JUnit 4, Mockito, Maven.
Execution constraint: Modify the local master worktree only. Do not stage or commit any file.
src/main/java/com/inspect/nvr/service/HikLoginSession.java — immutable login handle and channel-layout mapping.src/main/java/com/inspect/nvr/service/HikLoginService.java — cache HikLoginSession and capture login device metadata while preserving existing login(NvrInfo) callers.src/main/java/com/inspect/nvr/hik/service/HikNvrPlaybackService.java — use the login session for the SDK handle and resolved RTSP channel.src/main/java/com/inspect/nvr/hik/service/HikPlaybackUrlBuilder.java — accept an RTSP channel explicitly and retain Beijing clock digits.src/test/java/com/inspect/nvr/service/HikLoginSessionTest.java — pure channel mapping coverage.src/test/java/com/inspect/nvr/service/HikLoginServiceTest.java — verify SDK device metadata is captured into the cached session.src/test/java/com/inspect/nvr/hik/service/HikPlaybackUrlBuilderTest.java — reproduce 3301 and UTC-conversion regressions.src/test/java/com/inspect/nvr/hik/service/HikNvrPlaybackServiceTest.java — prove SDK search still uses 33 while the URL uses 101.