device

package
v0.0.0-...-ebafd5e Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioPacket

type AudioPacket struct {
	PTS  uint64
	Data []byte
}

AudioPacket represents an audio packet

func ReadAudioPacket

func ReadAudioPacket(reader io.Reader) (*AudioPacket, error)

ReadAudioPacket reads an audio packet from the stream

type ControlMessage

type ControlMessage struct {
	Type     uint8
	Sequence uint32
	Data     []byte
}

ControlMessage represents a control message

type DeviceMeta

type DeviceMeta struct {
	DeviceName string
	Width      uint32
	Height     uint32
}

DeviceMeta contains device metadata

func ReadDeviceMeta

func ReadDeviceMeta(conn io.Reader) (*DeviceMeta, error)

ReadDeviceMeta reads device metadata from connection

type ScrcpyConnection

type ScrcpyConnection struct {
	Listener net.Listener // Made public to match scrcpy-proxy
	// contains filtered or unexported fields
}

ScrcpyConnection handles the actual scrcpy server connection

func NewScrcpyConnection

func NewScrcpyConnection(deviceSerial string, scid uint32) *ScrcpyConnection

NewScrcpyConnection creates a new scrcpy connection handler

func NewScrcpyConnectionWithMode

func NewScrcpyConnectionWithMode(deviceSerial string, scid uint32, streamingMode string) *ScrcpyConnection

NewScrcpyConnectionWithMode creates a new scrcpy connection handler with specific streaming mode

func (*ScrcpyConnection) Close

func (sc *ScrcpyConnection) Close() error

Close closes the scrcpy connection

func (*ScrcpyConnection) Connect

func (sc *ScrcpyConnection) Connect() (net.Conn, error)

Connect establishes connection to scrcpy server on device

type VideoPacket

type VideoPacket struct {
	PTS        uint64
	Data       []byte
	IsConfig   bool
	IsKeyFrame bool
}

VideoPacket represents a video packet

func ReadVideoPacket

func ReadVideoPacket(reader io.Reader) (*VideoPacket, error)

ReadVideoPacket reads a video packet from the stream

Jump to

Keyboard shortcuts

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