providers

package
v0.0.0-...-831e56b Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderGstreamer     = "gstreamer"
	ProviderScreenCapture = "screencap"
)

Provider options.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display

type Display interface {
	// Start should take care of any requirements for starting a feed to the frame buffer.
	Start(width, height int) error
	// PullFrame should return a queued frame for processing.
	PullFrame() *image.RGBA
	// Close should stop any background processes from running.
	Close() error
}

A Display is an interface that can be implemented by different types of frame sources.

It is the responsibility of these providers to tap into some video/image source and make frames available for procesesing.

func GetDisplayProvider

func GetDisplayProvider(p Provider) Display

GetDisplayProvider returns the provider to use for the given RFB connection.

type Gstreamer

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

Gstreamer implements a display provider using gstreamer to capture video from the display.

func (*Gstreamer) Close

func (g *Gstreamer) Close() error

Close stops the gstreamer pipeline.

func (*Gstreamer) PullFrame

func (g *Gstreamer) PullFrame() *image.RGBA

PullFrame returns a frame from the queue.

func (*Gstreamer) Start

func (g *Gstreamer) Start(width, height int) error

Start will start the gstreamer pipelines and send imags to the frame queue.

type Provider

type Provider string

Provider is an enum used for selecting a display provider.

type ScreenCapture

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

ScreenCapture implements a display provider that periodically captures the screen using native APIs.

func (*ScreenCapture) Close

func (s *ScreenCapture) Close() error

Close stops the gstreamer pipeline.

func (*ScreenCapture) PullFrame

func (s *ScreenCapture) PullFrame() *image.RGBA

PullFrame returns a frame from the queue.

func (*ScreenCapture) Start

func (s *ScreenCapture) Start(width, height int) error

Start starts the screen capture loop.

Jump to

Keyboard shortcuts

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