Documentation
¶
Overview ¶
Package screen turns "something that can hand over its current pixels" into a capture.VideoSource: the whole browser window or one tab for getDisplayMedia. It knows nothing about the browser; the app supplies a Grabber.
Capturing the operating system's screen or other applications' windows is out of scope: it needs OS APIs (X11 XShm/XDamage, Wayland portals, DXGI, ScreenCaptureKit) that this package deliberately does not use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grabber ¶
Grabber returns the current pixels and a generation number. When gen equals the previous call's the pixels are unchanged and may be nil; the source then repeats its last frame. The returned image may be reused by the next call: the source converts it before asking again. An error ends the source (the tab is gone).
type Source ¶
type Source struct {
// W, H is the native size of the surface.
W, H int
// contains filtered or unexported fields
}
Source is the VideoSource.
func New ¶
func New(info capture.DeviceInfo, w, h int, grab Grabber) *Source
New makes a source for a surface of native size w x h.
func (*Source) Info ¶
func (s *Source) Info() capture.DeviceInfo