codec/vaapi: return error on unsupported environment

Make it buildable on unsupported environment.
Return error on runtime.
This commit is contained in:
Atsushi Watanabe
2020-03-27 12:06:18 +09:00
committed by Lukas Herman
parent aefe480c95
commit fa1fd13422
6 changed files with 40 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
// +build dragonfly freebsd linux netbsd openbsd solaris
// Package vaapi implements hardware accelerated codecs.
// This package requires libva headers and libraries to be built.
// libva requires supported graphic card and its driver.
@@ -8,6 +10,8 @@ import (
"unsafe"
)
// #cgo pkg-config: libva libva-drm
// #cgo CFLAGS: -DHAS_VAAPI
// #include <stdlib.h>
// #include <fcntl.h>
// #include <unistd.h>