fix(avc): align scaled capture dimensions to encoder alignment

Merged
GM
3mo ago
+17-11

Summary

(display * scale).toInt() can produce odd dimensions — Pixel 10 Pro's 1080x2410 display at scale 0.5 yields 540x1205 — which isSizeSupported() rejects, killing the capture before any frame with the misleading "exceed codec capabilities. Maximum supported: 3840x3840" error. In production this makes WebRTC streaming fail 100% of the time on any device model whose scaled height is odd (verified live on a farm Pixel 10 Pro: scale 0.50 always fails, scale 0.48 with even dims streams fine).

Fix: query the encoder's widthAlignment/heightAlignment (min 2) and round each scaled dimension down to it before validating/configuring.