Expand description
What each capture streams and how it got there, as values a caller reads. What a capture streams and how it got there, for the caller to show its user: the capture path and whether it is zero-copy, the encoder and whether it is hardware, the GPU behind it, and the reason a faster path was declined. The same facts the tagged log lines state, kept as values so nobody has to read a log to learn them.
A capture’s decisions are spread over three backends and the shared encoder ladder, each
made on the thread that owns the capture being built, so the report a decision lands in is
the one bound to the deciding thread ([enter]) rather than an argument threaded through
every site. A decision made with no report bound, as in a test or a probe, records nothing.
Counters are relaxed atomics tallied once per delivered frame and read only when the caller asks, so a capture nobody inspects pays for a few additions and nothing else. The extremes of a window (the fastest and slowest frame from capture to the end of its encode, and the largest frame) are kept the same way and swapped back on each read, so a reader that asks once a second learns that second’s.
Structs§
- Renderer
- How the Wayland compositor renders, which every capture of it shares:
glon a render node with the renderer’s own name for the GPU, orpixmanin software with the reason. - Scope
- Restores the report that was bound before
enter. - Stream
Info - The description half of a report.
capture_reasonsays why the capture is not zero-copy andencoder_reasonwhy the encoder is not hardware; both are empty where there is nothing to explain.zero_copy_availablesays whether the display server offered this session’s encoder a zero-copy path at all, so a readback where it did falls short of one and a readback where it did not is how the host is built. - Stream
Peaks - The extremes of the frames delivered since the previous read: the least and the most time from capture to the end of the encode, zero where no frame was timed, and the largest frame.
- Stream
Report - One capture’s description and counters.
- Stream
Totals - Cumulative counters of a capture since it started.
Functions§
- bit_
depth - The bits per sample the session’s encoder runs at, where that is not the 8
streamrecords. - capture
- The capture path taken. A zero-copy path needs no reason, so the ones collected from the paths declined ahead of it are dropped.
- capture_
declined - Why a zero-copy path was not taken. A capture that declines several keeps each reason.
- capture_
reason - Why the capture is not zero-copy, replacing whatever was collected.
- encoder_
reason - Why the session does not encode in hardware.
- enter
- Bind
reportto this thread until the scope drops: every decision recorded meanwhile lands in it. The Wayland event loop serves every display, so it binds per capture start and per recovery; a capture’s own threads bind once. - hardware_
encoder - The hardware session the ladder opened, and the device it runs on.
- renderer
- set_
renderer - stream
- What the stream settled on, from the same inputs as the
Stream settings activeline.backendis the full-frame session as(name, hardware),Nonethe striped software path. - wayland_
reports - The report of each Wayland display’s capture, read by
ScreenCapture::stream_infowithout a round trip to the compositor thread. - zero_
copy_ available - Whether the display server offers this session’s encoder a zero-copy path, recorded where a backend finds the server’s side of it there (NvFBC on an X server the NVIDIA driver drives, DRI3 on one drawing on the encode node’s GPU, a compositor rendering on that GPU) and where it finds it gone (a host compositor handing out software frames only).