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
This commit is contained in:
Maksim Totmin
2026-08-19 12:03:54 +07:00
commit 4c34f0bedc
33 changed files with 2432 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package cli
import (
"context"
"os"
"os/signal"
"syscall"
)
// newSignalContext returns a context that is cancelled on SIGINT or SIGTERM,
// so that Ctrl-C and systemctl stop both trigger a clean shutdown.
func newSignalContext() (context.Context, context.CancelFunc) {
return signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
}