Files
galahad2lcd/internal/device/device.go
T
Maksim Totmin 4c34f0bedc Initial commit: Go driver for the Lian Li Galahad II LCD
Streams H.264 to the Galahad II LCD via USB (gousb) with:
- ffmpeg CLI transcoding (no fragile FFmpeg C-ABI bindings)
- pure-Go Annex-B access-unit splitting
- framerate pacing with graceful shutdown and USB reconnect
- TOML config, cobra CLI, structured slog logging, unit tests
2026-08-19 12:03:54 +07:00

22 lines
706 B
Go

// Package device abstracts the Lian Li Galahad II LCD hardware. The streamer
// depends only on the Device interface, so tests can substitute a fake and
// future hardware can be supported by adding new implementations.
package device
import (
"context"
"errors"
)
// Device sends H.264 frames to a display. Implementations must be safe for
// sequential use by a single goroutine.
type Device interface {
// WriteFrame transmits one encoded access unit to the display.
WriteFrame(ctx context.Context, frame []byte) error
// Close releases all hardware resources.
Close() error
}
// ErrNotFound is returned when no matching USB device is present.
var ErrNotFound = errors.New("device not found")