Skip to main content

Module report

Module report 

Source
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: gl on a render node with the renderer’s own name for the GPU, or pixman in software with the reason.
Scope
Restores the report that was bound before enter.
StreamInfo
The description half of a report. capture_reason says why the capture is not zero-copy and encoder_reason why the encoder is not hardware; both are empty where there is nothing to explain. zero_copy_available says 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.
StreamPeaks
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.
StreamReport
One capture’s description and counters.
StreamTotals
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 stream records.
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 report to 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 active line. backend is the full-frame session as (name, hardware), None the striped software path.
wayland_reports
The report of each Wayland display’s capture, read by ScreenCapture::stream_info without 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).