recorder

package
v3.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(img *image.RGBA, x, y int, label string)

func TimeFormat

func TimeFormat(d time.Duration) string

Types

type Audio

type Audio struct {
	Samples  *[]int16
	Duration time.Duration
}

type Meta

type Meta struct {
	UserName string
}

type Options

type Options struct {
	Dir                   string
	Fps                   float64
	Frequency             int
	Game                  string
	ImageCompressionLevel int
	Name                  string
	Zip                   bool
	Vsync                 bool
}

type Recording

type Recording struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewRecording

func NewRecording(meta Meta, log *logger.Logger, opts Options) *Recording

NewRecording creates new media recorder for the emulator.

func (*Recording) Enabled

func (r *Recording) Enabled() bool

func (*Recording) Set

func (r *Recording) Set(enable bool, user string)

func (*Recording) Start

func (r *Recording) Start()

func (*Recording) Stop

func (r *Recording) Stop() (err error)

func (*Recording) WriteAudio

func (r *Recording) WriteAudio(audio Audio)

func (*Recording) WriteVideo

func (r *Recording) WriteVideo(frame Video)

type Video

type Video struct {
	Image    image.Image
	Duration time.Duration
}

Jump to

Keyboard shortcuts

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