Files
mediadevices/pkg/codec/vaapi/vaapi_unsupported.go
Atsushi Watanabe fa1fd13422 codec/vaapi: return error on unsupported environment
Make it buildable on unsupported environment.
Return error on runtime.
2020-03-28 22:12:07 -04:00

25 lines
663 B
Go

// +build !dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
package vaapi
// // Dummy CGO import to avoid `C source files not allowed when not using cgo or SWIG`
import "C"
import (
"errors"
"github.com/pion/mediadevices/pkg/codec"
"github.com/pion/mediadevices/pkg/io/video"
"github.com/pion/mediadevices/pkg/prop"
)
var errNotSupported = errors.New("vaapi is not supported on this environment")
func newVP8Encoder(r video.Reader, p prop.Media, params ParamsVP8) (codec.ReadCloser, error) {
return nil, errNotSupported
}
func newVP9Encoder(r video.Reader, p prop.Media, params ParamsVP9) (codec.ReadCloser, error) {
return nil, errNotSupported
}