capture

package
v0.0.0-...-96af788 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package capture provides interfaces for capturing virtual display output.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDbusBadResponse   = errors.New("unknown or malformed response")
	ErrDbusUserCancelled = errors.New("user cancelled interaction")
	ErrDbusCancelled     = errors.New("interaction cancelled")
)

Functions

This section is empty.

Types

type Capture

type Capture interface {
	Close() error
	Start(framerate uint32, rect image.Rectangle, cb func(image.Image)) error
}

type PipewireStream

type PipewireStream struct {
	// contains filtered or unexported fields
}

PipewireStream uses the org.freedesktop.portal.ScreenCast portal granted by xdg-desktop-portal to generate a pipewire stream for screen capture.

func NewPipewire

func NewPipewire() (ret *PipewireStream, err error)

func (*PipewireStream) Close

func (p *PipewireStream) Close() error

func (*PipewireStream) Start

func (p *PipewireStream) Start(framerate uint32, _ image.Rectangle, cb func(image.Image)) (err error)

type Writeback

type Writeback struct {
}

Writeback uses DRM writeback connectors for output.

See https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/458 for example implementation.

This capture backend is not possible without more widespread support for DRM leasing. The required mode and prop setting is gated by being the DRM master, which won't reasonably be us.

func NewWriteback

func NewWriteback(card *drm.Card) (*Writeback, error)

type X11

type X11 struct {
	// contains filtered or unexported fields
}

X11 uses the X library for screen capture.

func NewX11

func NewX11() (ret *X11, err error)

func (*X11) Close

func (x *X11) Close()

func (*X11) Start

func (x *X11) Start(framerate uint32, rect image.Rectangle, cb func(image.Image))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL