← Genymobile/scrcpy
CodeVetter · Repo Unpack · Data flow

Genymobile/scrcpy

Scanned commit 19c1261d2e dated 2026-09-05 — last upstream commit. Generated by codevetter codevetter 1.12.0 on 2026-09-22. Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded).

Outbound (device->host): capture (screen/camera/mic) -> MediaCodec encoder -> Streamer writes a 4-byte codec id then 12-byte frame/session headers + raw packets onto the video/audio sockets -> client demuxer threads parse headers into AVPackets -> packet_source fans out to sinks (decoder -> screen/v4l2, recorder). Inbound (host->device): SDL input events -> processors build sc_control_msg -> controller queue -> serialized onto the control socket -> ControlMessageReader -> Controller.handleEvent -> Device/InputManager injection or UHID writes. The control socket is also used device->client for DeviceMessages (clipboard, ack, UHID output).