phase 2
This commit is contained in:
51
media/docs/client-pipeline.dot
Normal file
51
media/docs/client-pipeline.dot
Normal file
@@ -0,0 +1,51 @@
|
||||
// Client pipeline data flow — Phase 2
|
||||
// Sender machine (Wayland, VAAPI GPU)
|
||||
digraph client_pipeline {
|
||||
graph [fontname="monospace" bgcolor="#1e1e2e" rankdir=TB pad="0.6" splines=polyline]
|
||||
node [fontname="monospace" fontcolor="#cdd6f4" style=filled shape=box
|
||||
fillcolor="#313244" color="#585b70" margin="0.25,0.12"]
|
||||
edge [color="#585b70" fontname="monospace" fontcolor="#a6adc8" labelfontname="monospace"]
|
||||
|
||||
// Hardware
|
||||
drm [label="/dev/dri/card0\n(KMS scanout)" shape=cylinder fillcolor="#1e3a2f" color="#a6e3a1"]
|
||||
vaapi [label="/dev/dri/renderD128\n(VAAPI)" shape=cylinder fillcolor="#1e3a2f" color="#a6e3a1"]
|
||||
net [label="TCP :4444\nmcrndeb" shape=parallelogram fillcolor="#1e2a3e" color="#89b4fa"]
|
||||
|
||||
// Thread boundary
|
||||
subgraph cluster_main {
|
||||
label="main thread (tokio async)" fontcolor="#a6adc8" color="#45475a" fontname="monospace"
|
||||
|
||||
session_start [label="session_start\ncontrol message" fillcolor="#2d2038" color="#cba6f7"]
|
||||
mux [label="select!\npkt_rx | keepalive | ctrl-c" fillcolor="#2d2038" color="#cba6f7"]
|
||||
keepalive [label="keepalive / 5s" fillcolor="#2d2038" color="#cba6f7"]
|
||||
write [label="BufWriter\nwrite_packet()" fillcolor="#1e2d3e" color="#89b4fa"]
|
||||
}
|
||||
|
||||
subgraph cluster_pipeline {
|
||||
label="capture-pipeline thread (blocking)" fontcolor="#a6adc8" color="#45475a" fontname="monospace"
|
||||
|
||||
capture [label="KmsCapture\n─────────────────\nffmpeg kmsgrab device\ndecoder: passthrough\noutput: DRM_PRIME frames\n+ hw_frames_ctx (DRM device)"
|
||||
fillcolor="#1e2d3e" color="#89b4fa"]
|
||||
|
||||
encoder [label="VaapiEncoder\n─────────────────\n[lazy init on frame 1]\nbuffersrc ← hw_frames_ctx\nhwmap derive_device=vaapi\nscale_vaapi NV12 1920×1080\nh264_vaapi QP=20 GOP=30"
|
||||
fillcolor="#1e2d3e" color="#89b4fa"]
|
||||
|
||||
chan [label="mpsc::channel(64)\nEncodedPacket" shape=parallelogram fillcolor="#2d2038" color="#cba6f7"]
|
||||
}
|
||||
|
||||
// Flow
|
||||
drm -> capture [label="DMA-BUF\n(zero copy)"]
|
||||
vaapi -> encoder [label="hw device\n(derived)" style=dashed color="#a6e3a1"]
|
||||
capture -> encoder [label="AVFrame\nDRM_PRIME"]
|
||||
encoder -> chan [label="EncodedPacket\n{ data, pts, keyframe, … }"]
|
||||
chan -> mux
|
||||
session_start -> write
|
||||
mux -> write [label="WirePacket"]
|
||||
mux -> keepalive [style=dashed]
|
||||
keepalive -> write
|
||||
write -> net
|
||||
|
||||
// Types note
|
||||
types [label="EncodedPacket\n─────────────\ndata: Vec\<u8\> (H.264 NALUs)\npts / dts: i64\nkeyframe: bool\ntime_base: num/den"
|
||||
shape=note fillcolor="#2a2a3e" color="#585b70"]
|
||||
}
|
||||
Reference in New Issue
Block a user