Skip to content

fix(inference): isolate video and camera processing sessions #17

Closed as not planned

Description

@FuTseYi

Background

Image requests were made request-local in PR #13, but inference/main.py still uses instance-wide self.data, self.paths, and self.recording for video/camera streaming. Overlapping sessions may overwrite downloads, output AVI/MP4 files, detection metadata, progress messages, or stop each other's capture.

Proposed acceptance criteria

  • Define explicit per-video/per-camera session identifiers and independent temporary directories (or reject overlaps safely until sessions are supported).
  • Keep progress events scoped to the correct client/session rather than broadcast session-specific results.
  • Ensure stopCamera stops only the intended recording; clean up capture/writer/files on normal stop and exceptions.
  • Avoid shell=True for FFmpeg invocation; handle failed transcoding and missing outputs explicitly.
  • Add deterministic concurrency/cancellation/error-path tests using fake frames and model objects.
  • Exercise a representative real video and local webcam workflow end-to-end; document host limitations.

Current status: Image concurrency unit tests pass; video/camera concurrency remains unverified. Do not claim multi-user streaming support until this issue is resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions