Files
screen_cast/.agents/skills/screencast-app/SKILL.md
T

2.4 KiB

name, description, disable-model-invocation
name description disable-model-invocation
screencast-app Overall screencast application architecture, sender/receiver modes, protocol negotiation, and integration decisions in the screen_cast project. false

screencast-app

Overall screencast application architecture, sender/receiver modes, protocol negotiation, and integration decisions in the screen_cast project.

Scope

Use this skill for:

  • Designing sender/receiver flows and state machines.
  • Deciding on CLI/GUI entry points and common application lifecycle.
  • Session negotiation formats and codec selection.
  • Integrating capture, encode, network, decode, and render modules.
  • Defining public API boundaries and module ownership.

High-level architecture

Sender:   Capture → Encode → Packetize → RTP/UDP
Receiver: RTP/UDP → Depacketize → Decode → Render
Control:  Signaling (WebSocket/JSON) + Discovery (mDNS)
  • The same binary supports both --send and --receive modes.
  • Each mode owns a pipeline object that wires the modules together.
  • Keep modules isolated; each module owns its thread(s) and exposes a small boundary to the pipeline.

Pipeline rules

  • Frame ownership is transferred with std::unique_ptr or shared frame pool.
  • Timestamp everything in the capture clock domain and carry RTP timestamps through the pipeline.
  • On sender error, drain packets in flight before shutting down.
  • On receiver error, request a key frame (PLI) or restart decoder if necessary.

Protocol negotiation

Minimum negotiated fields:

  • codec: h264 initially.
  • width, height, frame_rate.
  • rtp_endpoint: host:port for media.
  • signaling_endpoint: host/port for control (optional if already connected).
  • session_id: unique string to correlate media and control.

CLI / entry points

  • screencast --send [--target monitor|window]
  • screencast --receive [--peer-address ADDR]
  • Optional --signaling-url, --codec, --bitrate, --hwaccel flags.

GUI

  • GUI is optional and lives in a separate target/library.
  • The core library must be usable from CLI and tests without a GUI.

References

  • docs/ARCHITECTURE.md
  • docs/PHASES.md — must be consulted before starting implementation; do not work on a later phase unless the current phase is complete or the user explicitly requests it.
  • Other domain skills: linux-multimedia-capture, rtp-networking, cpp-meson-build