From 3f1b45f43c9921810d6a1ef2e3117b6a52632f64 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 11 Jan 2017 14:52:14 -0700 Subject: [PATCH] qsv: fix building with qsv disabled --- libhb/qsv_common.c | 7 +++++++ libhb/qsv_common.h | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index a54a40654..011c94e10 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -2150,4 +2150,11 @@ void hb_qsv_force_workarounds() #undef FORCE_WORKAROUNDS } +#else + +int hb_qsv_available() +{ + return 0; +} + #endif // USE_QSV diff --git a/libhb/qsv_common.h b/libhb/qsv_common.h index 50f274875..d59cdfd3c 100644 --- a/libhb/qsv_common.h +++ b/libhb/qsv_common.h @@ -10,6 +10,10 @@ #ifndef HB_QSV_COMMON_H #define HB_QSV_COMMON_H +int hb_qsv_available(); + +#ifdef USE_QSV + #include "mfx/mfxvideo.h" #include "mfx/mfxplugin.h" #include "libavcodec/avcodec.h" @@ -64,7 +68,6 @@ typedef struct hb_qsv_info_s } hb_qsv_info_t; /* Intel Quick Sync Video utilities */ -int hb_qsv_available(); int hb_qsv_video_encoder_is_enabled(int encoder); int hb_qsv_audio_encoder_is_enabled(int encoder); int hb_qsv_info_init(); @@ -188,4 +191,5 @@ const char* hb_qsv_impl_get_name(int impl); void hb_qsv_force_workarounds(); // for developers only -#endif +#endif // USE_QSV +#endif // HB_QSV_COMMON_H -- 2.40.0