Repository navigation
Harden Zoom screen share on Windows and macOS - #290
Merged
Merged
Conversation
A share output was graded, recovered and scaled by the camera rules: - An ended share stayed frozen on program; nothing cleared the source. It is now cleared once the roster has shown no sharer for 2 s and frames have stopped for 1 s, and the roster's return on an empty output resubscribes. Share sources show no color bars. - A static slide went "Video stale" at 3 s and looped on recovery; any non-1080-line share read "lower resolution" and looped on upgrades. Share outputs use a 10 s stale threshold, never recover while nobody shares and never enter the quality-upgrade loop. - Recovery was a no-op on both engines while a renderer existed. Both now rebuild a share renderer idle for 8 s (if the viewable-share scan still reports it) on a resubscribe or Resume; Windows handles Sharing_Resume. - Share frames were nearest-neighbour decimated into the canvas, shredding text. They use a new area/bilinear scaler (src/i420-scale.h) at roughly the old path's cost; cameras keep the old path. - macOS: the share lock is split like Windows' so the frame callback no longer try_lock-drops (a lost first frame of a static slide meant an empty output); a delegate leak on SDK-initiated renderer destroy is fixed. New tests: CoreVideoI420Scale, CoreVideoShareOutputPolicy; the Windows CoreVideoEngineShareReentrancy test gains idle-rebuild/Resume cases and now also runs on macOS/Linux. 86/86 on macOS arm64. Live validation pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| !share_wants_stale_recovery( | ||
| m_share_roster_available.load(std::memory_order_acquire))) | ||
| return false; | ||
| const uint64_t stale_ns = video_stale_threshold_ns(screen_share, kStaleVideoNs); |
| m_share_roster_available.load(std::memory_order_acquire))) | ||
| return false; | ||
| const uint64_t stale_ns = video_stale_threshold_ns(screen_share, kStaleVideoNs); | ||
| const uint64_t no_signal_ns = |
Both throws are the point of their tests (exception containment in the share engine; a regression signal caught by main()). They made the Cppcheck hard-fail gate red on main since October. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| if (src_w == dst_w && src_h == dst_h) { | ||
| for (uint32_t y = 0; y < dst_h; ++y) | ||
| std::memcpy(dst + static_cast<size_t>(y) * dst_stride, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Screen share was reported as unreliable on both platforms. It was being graded, recovered and scaled by the rules written for camera feeds. This PR fixes five defects:
Video staleat 3 s and then looped on recovery. Any share that was not 1080-line read "lower resolution" and looped on quality upgrades. Share outputs now use a 10 s stale threshold, never recover while nobody is sharing, and never enter the quality-upgrade loop. The rules live insrc/share-output-policy.h.src/share-renderer-policy.h). Windows now handlesSharing_Resume.src/i420-scale.h) costing 2.2–3.6 ms per frame, against 1.6–2.8 ms for the old path. Camera feeds keep the old path.try_lock. A dropped first frame of a static slide meant an empty output until the slide changed. Also fixes a delegate leak when the SDK destroys the renderer itself.Tests
CoreVideoI420Scale,CoreVideoShareOutputPolicy.CoreVideoEngineShareReentrancygains idle-rebuild and Resume cases. It now also runs on macOS and Linux CI, because the tracked Windows headers have a POSIX branch.Not done
docs/VALIDATION_MATRIX.mdand needs a remote participant sharing.🤖 Generated with Claude Code