Skip to main content

Crate visual_cortex_capture

Crate visual_cortex_capture 

Source
Expand description

Screen capture abstraction: frames, regions, rates, and the FrameSource trait.

Structs§

FakeSource
A scripted FrameSource for tests and demos: yields its frames in order, then repeats the final frame forever.
Frame
A single captured frame in BGRA8 layout, row-major, stride = width * 4.
FrameView
A borrowed rectangular view into a frame. Zero-copy; rows are slices of the frame.
PxRect
A resolved, pixel-space rectangle, guaranteed in-bounds by Region::resolve.
Rate
How often a watcher evaluates, or a source captures. Stored as a period.

Enums§

CaptureError
Region
A watch region. Fractional (Percent) regions survive resolution changes; validation happens at resolve time against actual frame dimensions.
Target
What to capture: a display by index, or a window matched by exact title.

Traits§

FrameSource
A source of frames. The session’s capture loop calls capture_frame at the session’s capture rate; implementations should return the freshest frame available. Real backends (scap) arrive in a later milestone.