Skip to content

🟡 MEDIUM: Modularize RemoteCameraStreamer (994 lines) #218

@arkavo-com

Description

@arkavo-com

Problem

RemoteCameraStreamer.swift is 994 lines handling multiple unrelated concerns.

Mixed Concerns

  1. Bonjour/mDNS discovery - Finding camera servers
  2. Network connection management - TCP/WebSocket handling
  3. Video encoding - Compression and format conversion
  4. UI state management - Connection status, errors
  5. Protocol handling - Custom streaming protocol

Proposed Decomposition

Remote Camera Feature
├── CameraServerDiscovery (~200 lines)
│   └── Bonjour browsing, service resolution
├── RemoteCameraConnection (~250 lines)
│   └── Connection lifecycle, reconnection
├── CameraStreamEncoder (~250 lines)
│   └── Video encoding, compression
├── CameraStreamProtocol (~150 lines)
│   └── Message framing, serialization
└── RemoteCameraViewModel (~150 lines)
    └── UI state only

Acceptance Criteria

  • Each component has single responsibility
  • Discovery can be reused for other services
  • Connection handling is testable
  • Encoder can be unit tested with sample frames

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions