Roadmap M2: Dahua adapter #6
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/6/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #5.
What
Implements the Dahua NVR adapter layer (M2 in the roadmap):
src/cang/adapters/base.py—IncomingClipdataclass +BaseAdapterABCsrc/cang/adapters/dahua.py—DahuaAdapter.scan()that walks the Dahua folder tree and yieldsIncomingClipobjects with matched snapshotstests/adapters/test_dahua.py— 14 tests covering unit parsing and full integration via a minimaltmp_pathtreeHow
Dahua NVRs write clips as
<serial>/<date>/<channel>/dav/<HH>/<stem>.davand per-second snapshots as<serial>/<date>/<channel>/jpg/<HH>/<MM>/<SS>[flags].jpg. The adapter:dav/hour-dirs, parses each.davstem with a regex to extract start/end times and[M]/[F]flagsjpg/tree and filtering toclip.start ≤ snapshot_time ≤ clip.end.idxsidecar filesIncomingClipfor each clipTest results