diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-12 10:54:23 -0800 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2023-05-28 15:46:05 -0700 |
commit | 085f3e31a091daf7d6649508b162cfcde826702a (patch) | |
tree | 50eb9dc75c2c9071cad2b0e77baba4e97f1cb911 /video/out/gpu/hwdec.c | |
parent | 959ef843d2752e802874b265b21ee6542388a019 (diff) | |
download | mpv-085f3e31a091daf7d6649508b162cfcde826702a.tar.bz2 mpv-085f3e31a091daf7d6649508b162cfcde826702a.tar.xz |
vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra
We will need the full ra_ctx to be able to look up all the state
required to initialise an ffmpeg vulkan hwcontext, so pass let's
pass the ra_ctx instead of just the ra.
Diffstat (limited to 'video/out/gpu/hwdec.c')
-rw-r--r-- | video/out/gpu/hwdec.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/video/out/gpu/hwdec.c b/video/out/gpu/hwdec.c index 8b7e271c6a..8b1ab8c961 100644 --- a/video/out/gpu/hwdec.c +++ b/video/out/gpu/hwdec.c @@ -83,7 +83,8 @@ const struct ra_hwdec_driver *const ra_hwdec_drivers[] = { NULL }; -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, @@ -94,7 +95,7 @@ struct ra_hwdec *ra_hwdec_load_driver(struct ra *ra, struct mp_log *log, .driver = drv, .log = mp_log_new(hwdec, log, drv->name), .global = global, - .ra = ra, + .ra_ctx = ra_ctx, .devs = devs, .probing = is_auto, .priv = talloc_zero_size(hwdec, drv->priv_size), @@ -134,7 +135,7 @@ struct ra_hwdec_mapper *ra_hwdec_mapper_create(struct ra_hwdec *hwdec, .owner = hwdec, .driver = hwdec->driver->mapper, .log = hwdec->log, - .ra = hwdec->ra, + .ra = hwdec->ra_ctx->ra, .priv = talloc_zero_size(mapper, hwdec->driver->mapper->priv_size), .src_params = *params, .dst_params = *params, @@ -232,7 +233,7 @@ static void load_add_hwdec(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *de } struct ra_hwdec *hwdec = - ra_hwdec_load_driver(ctx->ra, ctx->log, ctx->global, devs, drv, is_auto); + ra_hwdec_load_driver(ctx->ra_ctx, ctx->log, ctx->global, devs, drv, is_auto); if (hwdec) MP_TARRAY_APPEND(NULL, ctx->hwdecs, ctx->num_hwdecs, hwdec); } @@ -249,7 +250,7 @@ static void load_hwdecs_all(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *d void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs, const char *type, bool load_all_by_default) { - assert(ctx->ra); + assert(ctx->ra_ctx); /* * By default, or if the option value is "auto", we will not pre-emptively |