build(linux) make vaapi optional without dlopen (#1979)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
James Le Cuirot
2024-01-05 15:59:41 +00:00
committed by GitHub
parent 0dff8b16fd
commit bc6cc2078e
10 changed files with 136 additions and 252 deletions

View File

@@ -555,9 +555,11 @@ namespace platf {
std::unique_ptr<avcodec_encode_device_t>
make_avcodec_encode_device(pix_fmt_e pix_fmt) override {
#ifdef SUNSHINE_BUILD_VAAPI
if (mem_type == mem_type_e::vaapi) {
return va::make_avcodec_encode_device(width, height, false);
}
#endif
#ifdef SUNSHINE_BUILD_CUDA
if (mem_type == mem_type_e::cuda) {