diff options
Diffstat (limited to 'video/vaapi.h')
-rw-r--r-- | video/vaapi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/vaapi.h b/video/vaapi.h index 8a96bb1347..86a9919e27 100644 --- a/video/vaapi.h +++ b/video/vaapi.h @@ -3,6 +3,7 @@ #include <stdbool.h> #include <inttypes.h> +#include <pthread.h> #include <va/va.h> #include <va/va_x11.h> @@ -79,6 +80,7 @@ struct mp_vaapi_ctx { struct mp_log *log; VADisplay display; struct va_image_formats *image_formats; + pthread_mutex_t lock; }; struct va_image_formats; @@ -87,6 +89,9 @@ bool check_va_status(struct mp_log *log, VAStatus status, const char *msg); #define CHECK_VA_STATUS(ctx, msg) check_va_status((ctx)->log, status, msg) +#define va_lock(ctx) pthread_mutex_lock(&(ctx)->lock) +#define va_unlock(ctx) pthread_mutex_unlock(&(ctx)->lock) + int va_get_colorspace_flag(enum mp_csp csp); struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *log); |