diff options
Diffstat (limited to 'video/out/gpu/hwdec.h')
-rw-r--r-- | video/out/gpu/hwdec.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/video/out/gpu/hwdec.h b/video/out/gpu/hwdec.h index 0dd2e14588..f195606417 100644 --- a/video/out/gpu/hwdec.h +++ b/video/out/gpu/hwdec.h @@ -2,6 +2,7 @@ #define MPGL_HWDEC_H_ #include "video/mp_image.h" +#include "context.h" #include "ra.h" #include "video/hwdec.h" @@ -10,19 +11,15 @@ struct ra_hwdec_ctx { // Set these before calling `ra_hwdec_ctx_init` struct mp_log *log; struct mpv_global *global; - struct ra *ra; + struct ra_ctx *ra_ctx; bool loading_done; struct ra_hwdec **hwdecs; int num_hwdecs; }; -int ra_hwdec_validate_opt(struct mp_log *log, const m_option_t *opt, - struct bstr name, const char **value); - -int ra_hwdec_validate_drivers_only_opt(struct mp_log *log, - const m_option_t *opt, - struct bstr name, const char **value); +OPT_STRING_VALIDATE_FUNC(ra_hwdec_validate_opt); +OPT_STRING_VALIDATE_FUNC(ra_hwdec_validate_drivers_only_opt); void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs, const char *opt, bool load_all_by_default); @@ -38,7 +35,7 @@ struct ra_hwdec { const struct ra_hwdec_driver *driver; struct mp_log *log; struct mpv_global *global; - struct ra *ra; + struct ra_ctx *ra_ctx; struct mp_hwdec_devices *devs; // GLSL extensions required to sample textures from this. const char **glsl_extensions; @@ -131,7 +128,8 @@ struct ra_hwdec_driver { extern const struct ra_hwdec_driver *const ra_hwdec_drivers[]; -struct ra_hwdec *ra_hwdec_load_driver(struct ra *ra, struct mp_log *log, +struct ra_hwdec *ra_hwdec_load_driver(struct ra_ctx *ra_ctx, + struct mp_log *log, struct mpv_global *global, struct mp_hwdec_devices *devs, const struct ra_hwdec_driver *drv, |