Auto-launch ffplay on mirroring, fix reconnection port leak, fix audio seq wraparound, optimize CI - #6
Merged
Conversation
…o-launch/kill ffplay, support reconnection Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
…t check in StopFfplay, optimize CI workflow with caching Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add automatic display on screen mirroring activation
Auto-launch ffplay on mirroring start/stop and cache CI dependencies
Feb 10, 2026
…g connection issues Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
…ions.Generic using Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
Auto-launch ffplay on mirroring start/stop and cache CI dependencies
Fix audio stutter on seq wraparound and video PPS errors on mirroring start
Feb 10, 2026
…y latency Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
Fix audio stutter on seq wraparound and video PPS errors on mirroring start
Fix mirroring reconnection failure, auto-show/hide video window, reduce playback latency, and optimize CI caching
Feb 10, 2026
…ration 0 to ffplay Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
Fix mirroring reconnection failure, auto-show/hide video window, reduce playback latency, and optimize CI caching
Fix screen mirroring: port leak on reconnect, video display latency, sequence number wraparound
Feb 10, 2026
…ate frame display Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
Fix screen mirroring: port leak on reconnect, video display latency, sequence number wraparound
Fix screen mirroring: auto-launch ffplay, reconnection, latency, and audio wraparound
Feb 10, 2026
…leases link, updated docs Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
Copilot
AI
changed the title
Fix screen mirroring: auto-launch ffplay, reconnection, latency, and audio wraparound
Auto-launch ffplay on mirroring, fix reconnection port leak, fix audio seq wraparound, optimize CI
Feb 10, 2026
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.
Screen mirroring required manually launching ffplay, reconnection after stop failed (port 7000 stayed bound), audio stuttered every ~25 min at the 16-bit sequence number wraparound, and CI rebuilt FFmpeg/fdk-aac from scratch every run.
Auto-launch/kill ffplay on mirroring lifecycle
OnMirroringStarted/OnMirroringStoppedevents throughIRtspReceiver→AirPlayReceiver→AirPlayServiceVideoOutputServiceredesigned withStartMirroring()/StopMirroring()— creates pipe, launches ffplay, buffers frames until connection, kills ffplay on stop-fflags nobuffer+discardcorrupt -flags low_delay -framedrop -avioflags direct -vf setpts=0Fix reconnection failure (BaseTcpListener port leak)
StopAsync()only cancelled the token but never called_listener.Stop(), leaving port 7000 bound. Old dead listener accepted new connections which immediately closed → "0 frames written."Fix audio sequence number wraparound
Three places in
RaopBufferQueueused plain<on 16-bit sequence numbers, breaking at 65535→0:CI caching
actions/cache@v4for FFmpeg binaries and built libfdk-aac DLL — skips ~100MB download and MSYS2 source build on cache hit.README updated
Both EN/ZH READMEs updated: download link → GitHub Releases, simplified quick start (no manual ffplay), documented auto-launch behavior.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.