femu_grpc

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormat

type AudioFormat struct {
	Channels      string // "MONO" or "STEREO"
	BitsPerSample uint   // 8 or 16
	SamplingRate  uint
}

func (*AudioFormat) Validate

func (f *AudioFormat) Validate() error

type AudioPayload

type AudioPayload struct {
	Bytes    []byte
	LengthMs uint
}

type FemuGrpcClient

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

func NewFemuGrpcClient

func NewFemuGrpcClient(config FemuGrpcClientConfig) (FemuGrpcClient, error)

func (*FemuGrpcClient) KeyDown

func (emu *FemuGrpcClient) KeyDown(seq []string) error

func (*FemuGrpcClient) KeyPress

func (emu *FemuGrpcClient) KeyPress(seq []string) error

func (*FemuGrpcClient) KeyUp

func (emu *FemuGrpcClient) KeyUp(seq []string) error

func (*FemuGrpcClient) StreamAudio

func (emu *FemuGrpcClient) StreamAudio(opts StreamAudioOpts) (AudioPayload, error)

func (*FemuGrpcClient) StreamScreen

func (emu *FemuGrpcClient) StreamScreen(opts StreamScreenOpts) (Frames, error)

type FemuGrpcClientConfig

type FemuGrpcClientConfig struct {
	ServerAddr string
	Timeout    time.Duration
}

type FemuGrpcClientInterface

type FemuGrpcClientInterface interface {
	StreamScreen(opts StreamScreenOpts) (Frames, error)
	StreamAudio(opts StreamAudioOpts) (AudioPayload, error)
	KeyDown(seq []string) error
	KeyUp(seq []string) error
	KeyPress(seq []string) error
}

type Frames

type Frames struct {
	Images [][]byte
	Width  uint
	Height uint
}

type StreamAudioOpts

type StreamAudioOpts struct {
	Format   AudioFormat
	Duration time.Duration
}

func NewStreamAudioOpts

func NewStreamAudioOpts(channels string, bitsPerSample uint, samplingRate uint, duration time.Duration) (StreamAudioOpts, error)

type StreamScreenOpts

type StreamScreenOpts struct {
	Format    string
	NumFrames uint
	Duration  time.Duration
}

func NewStreamScreenOpts

func NewStreamScreenOpts(format string, numFrames uint, duration time.Duration) (StreamScreenOpts, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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