Skip to content

Feature: Virtual display streaming (second machine as wireless monitor) #1

Description

@neang-mengseang

Summary

Allow a second machine on the LAN to act as a virtual monitor for the main machine. No HDMI cable. The main machine creates a virtual display, streams its content over the network, and the sub machine renders it fullscreen. Input from the sub machine flows back to the main machine.

Architecture

`
Main machine (server):
VDD creates virtual monitor
-> DXGI captures virtual display
-> FFmpeg encodes to H.264/H.265
-> StreamChunker splits into chunks
-> SecureSocket encrypts
-> TCP sends to client

Sub machine (client):
TCP receives chunks
-> SecureSocket decrypts
-> StreamChunker reassembles
-> FFmpeg decodes
-> Qt renders in fullscreen window
-> Input forwarded back to server
`

Dependencies

Dependency Purpose License
Virtual Display Driver Virtual monitor creation MIT
FFmpeg (libavcodec) Video encoding/decoding LGPL 2.1
DXGI (Windows SDK) Screen capture Proprietary

Milestones

  • Milestone 1: VDD detection, virtual display creation, DXGI capture, raw frame transmission (POC)
  • Milestone 2: FFmpeg H.264 encoding, network streaming, client-side decoding and rendering
  • Milestone 3: Input forwarding from display client back to server
  • Milestone 4: GUI integration, VDD bundling, documentation, production release

New modules

src/lib/display/ DisplayManager.h/cpp # Virtual display lifecycle ScreenCapture.h/cpp # DXGI capture VideoEncoder.h/cpp # FFmpeg encoding DisplayStreamServer.h/cpp # Server-side streaming DisplayStreamClient.h/cpp # Client-side receiving DisplayViewer.h/cpp # Qt fullscreen viewer

Protocol extensions

New messages added to the wire protocol:

Message Direction Purpose
kMsgDisplayInit Server -> Client Start stream, send resolution
kMsgDisplayFrame Server -> Client Encoded video frame
kMsgDisplayEnd Server -> Client Stop stream
kMsgDisplayInput Client -> Server Input from display client
kMsgDisplayReady Client -> Server Client ready for frames

Full design doc

See docs/dev/virtual-display-plan.md in the repository.

Scope

  • Windows first (IddCx virtual display driver)
  • Linux and macOS support planned for later
  • Hardware encoding (NVENC/AMF/QSV) where available
  • Software fallback via FFmpeg libx264

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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