Skip to content

Zoom/streaming cleanups: HUD fill curve, vestigial flag, wrong doc comment #163

Description

@darioalessandro

Three small things found while adding the Mac zoom pill and the keyframe triggers (PR #157), deliberately left out to keep that PR focused.

1. The iOS zoom HUD's fill is linear while the pinch curve is logarithmic

RemoteCam/MonitorView.swift (zoomControlsOverlay)

let range = viewModel.maxZoomFactor - minZoom
let progress = range > 0 ? (viewModel.currentZoomFactor - minZoom) / range : 0

Everything else — pinch, and the Mac pill's ruler — works in log2 space (ZoomScale.position(forHardware:)). So the bar doesn't track the zoom the user actually feels, and disagrees with its own min/max labels. Cosmetic and iOS-only; the fix is to route it through viewModel.zoomScale.position(forHardware:) like everything else. Left alone because it changes iOS feel, which wasn't in scope.

2. isZoomSliderEnabled is vestigial

RemoteCam/MonitorViewModel.swift:117@Published, set to true in four places (:141, :162, :183, :202), read by nothing. Left over from the removed UIKit zoom slider. Either wire it to the Mac pill's allowsHitTesting or delete it.

3. UICmd.RequestVideoKeyframe's doc comment is wrong

RemoteCam/UICmds.swift:600-601 claims it's raised on "an undecodable frame, or a sequence gap on the stateful stream".

A sequence gap never triggers a keyframe request. FrameStreamReceiver.trackSequence only counts gaps and logs them at .debug; only an actual decode failure calls requestKeyframe(at:). Either correct the comment or implement what it promises — a gap on a stateful stream arguably should ask for a keyframe, since VP9 rides .reliable and a gap means something genuinely went wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions