rdisplay

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Screen

type Screen struct {
	Index  int
	Bounds image.Rectangle
}

Screen

type ScreenGrabber

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

ScreenGrabber captures video from Win/Lin/Mac screens

func (*ScreenGrabber) Fps

func (g *ScreenGrabber) Fps() int

Fps returns the frames per sec. we're capturing

func (*ScreenGrabber) Frames

func (g *ScreenGrabber) Frames() <-chan *image.RGBA

Frames returns a channel that will receive an image stream

func (*ScreenGrabber) Screen

func (g *ScreenGrabber) Screen() *Screen

Screen returns a pointer to the screen we're capturing

func (*ScreenGrabber) Start

func (g *ScreenGrabber) Start()

Start initiates the screen capture loop

func (*ScreenGrabber) Stop

func (g *ScreenGrabber) Stop()

Stop sends a stop signal to the capture loop

type ScreenGrabberInterface

type ScreenGrabberInterface interface {
	Start()
	Frames() <-chan *image.RGBA
	Stop()
	Fps() int
	Screen() *Screen
}

ScreenGrabberInterface

type ServiceInterface

type ServiceInterface interface {
	CreateScreenGrabber(screen Screen, fps int) (ScreenGrabberInterface, error)
	Screens() ([]Screen, error)
}

Service

func NewVideoProvider

func NewVideoProvider() (ServiceInterface, error)

NewVideoProvider returns an X Server-based video provider

type VideoProvider

type VideoProvider struct{}

VideoProvider implements the rdisplay.Service interface for Win/Lin/Mac screens

func (*VideoProvider) CreateScreenGrabber

func (*VideoProvider) CreateScreenGrabber(screen Screen, fps int) (ScreenGrabberInterface, error)

CreateScreenGrabber Creates an screen capturer for the X server

func (*VideoProvider) Screens

func (x *VideoProvider) Screens() ([]Screen, error)

Screens Returns the available screens to capture

Jump to

Keyboard shortcuts

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