summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
Diffstat (limited to 'video/out')
-rw-r--r--video/out/gpu/hwdec.c5
-rw-r--r--video/out/gpu/hwdec.h2
-rw-r--r--video/out/gpu/video.c7
-rw-r--r--video/out/gpu/video.h3
-rw-r--r--video/out/hwdec/hwdec_cuda.c8
-rw-r--r--video/out/vo_gpu.c10
-rw-r--r--video/out/vo_gpu_next.c6
7 files changed, 21 insertions, 20 deletions
diff --git a/video/out/gpu/hwdec.c b/video/out/gpu/hwdec.c
index 7608a11131..4fe835aa95 100644
--- a/video/out/gpu/hwdec.c
+++ b/video/out/gpu/hwdec.c
@@ -275,8 +275,9 @@ void ra_hwdec_ctx_uninit(struct ra_hwdec_ctx *ctx)
}
void ra_hwdec_ctx_load_fmt(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs,
- int imgfmt)
+ struct hwdec_imgfmt_request *params)
{
+ int imgfmt = params->imgfmt;
if (ctx->loading_done) {
/*
* If we previously marked interop loading as done (for reasons
@@ -307,7 +308,7 @@ void ra_hwdec_ctx_load_fmt(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *de
continue;
}
- load_add_hwdec(ctx, devs, drv, false);
+ load_add_hwdec(ctx, devs, drv, params->probing);
}
}
diff --git a/video/out/gpu/hwdec.h b/video/out/gpu/hwdec.h
index 5150932743..9026f40ef3 100644
--- a/video/out/gpu/hwdec.h
+++ b/video/out/gpu/hwdec.h
@@ -25,7 +25,7 @@ void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs,
void ra_hwdec_ctx_uninit(struct ra_hwdec_ctx *ctx);
void ra_hwdec_ctx_load_fmt(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs,
- int imgfmt);
+ struct hwdec_imgfmt_request *params);
// Gets the right `ra_hwdec` for a format, if any
struct ra_hwdec *ra_hwdec_get(struct ra_hwdec_ctx *ctx, int imgfmt);
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index e158d3bea9..5dedb7efc9 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -4323,10 +4323,9 @@ void gl_video_init_hwdecs(struct gl_video *p, struct mp_hwdec_devices *devs,
ra_hwdec_ctx_init(&p->hwdec_ctx, devs, p->opts.hwdec_interop, load_all_by_default);
}
-void gl_video_load_hwdecs_for_img_fmt(struct gl_video *p,
- struct mp_hwdec_devices *devs,
- int imgfmt)
+void gl_video_load_hwdecs_for_img_fmt(struct gl_video *p, struct mp_hwdec_devices *devs,
+ struct hwdec_imgfmt_request *params)
{
assert(p->hwdec_ctx.ra);
- ra_hwdec_ctx_load_fmt(&p->hwdec_ctx, devs, imgfmt);
+ ra_hwdec_ctx_load_fmt(&p->hwdec_ctx, devs, params);
}
diff --git a/video/out/gpu/video.h b/video/out/gpu/video.h
index 6aeeca732f..7637710fa7 100644
--- a/video/out/gpu/video.h
+++ b/video/out/gpu/video.h
@@ -220,8 +220,9 @@ bool gl_video_showing_interpolated_frame(struct gl_video *p);
struct mp_hwdec_devices;
void gl_video_init_hwdecs(struct gl_video *p, struct mp_hwdec_devices *devs,
bool load_all_by_default);
+struct hwdec_imgfmt_request;
void gl_video_load_hwdecs_for_img_fmt(struct gl_video *p, struct mp_hwdec_devices *devs,
- int imgfmt);
+ struct hwdec_imgfmt_request *params);
struct vo;
void gl_video_configure_queue(struct gl_video *p, struct vo *vo);
diff --git a/video/out/hwdec/hwdec_cuda.c b/video/out/hwdec/hwdec_cuda.c
index 0fe0f7bda8..910d6a4078 100644
--- a/video/out/hwdec/hwdec_cuda.c
+++ b/video/out/hwdec/hwdec_cuda.c
@@ -74,10 +74,11 @@ static int cuda_init(struct ra_hwdec *hw)
int ret = 0;
struct cuda_hw_priv *p = hw->priv;
CudaFunctions *cu;
+ int level = hw->probing ? MSGL_V : MSGL_ERR;
ret = cuda_load_functions(&p->cu, NULL);
if (ret != 0) {
- MP_VERBOSE(hw, "Failed to load CUDA symbols\n");
+ MP_MSG(hw, level, "Failed to load CUDA symbols\n");
return -1;
}
cu = p->cu;
@@ -94,7 +95,8 @@ static int cuda_init(struct ra_hwdec *hw)
}
if (!p->ext_init || !p->ext_uninit) {
- MP_VERBOSE(hw, "CUDA hwdec only works with OpenGL or Vulkan backends.\n");
+ MP_MSG(hw, level,
+ "CUDA hwdec only works with OpenGL or Vulkan backends.\n");
return -1;
}
@@ -109,7 +111,7 @@ static int cuda_init(struct ra_hwdec *hw)
ret = av_hwdevice_ctx_init(hw_device_ctx);
if (ret < 0) {
- MP_ERR(hw, "av_hwdevice_ctx_init failed\n");
+ MP_MSG(hw, level, "av_hwdevice_ctx_init failed\n");
goto error;
}
diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c
index 1f471815f1..404b7e77d7 100644
--- a/video/out/vo_gpu.c
+++ b/video/out/vo_gpu.c
@@ -52,7 +52,6 @@ struct gpu_priv {
int events;
};
-
static void resize(struct vo *vo)
{
struct gpu_priv *p = vo->priv;
@@ -129,16 +128,15 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
static void request_hwdec_api(struct vo *vo, void *data)
{
struct gpu_priv *p = vo->priv;
- int imgfmt = (intptr_t)data;
-
- gl_video_load_hwdecs_for_img_fmt(p->renderer, vo->hwdec_devs, imgfmt);
+ gl_video_load_hwdecs_for_img_fmt(p->renderer, vo->hwdec_devs, data);
}
-static void call_request_hwdec_api(void *ctx, int imgfmt)
+static void call_request_hwdec_api(void *ctx,
+ struct hwdec_imgfmt_request *params)
{
// Roundabout way to run hwdec loading on the VO thread.
// Redirects to request_hwdec_api().
- vo_control(ctx, VOCTRL_LOAD_HWDEC_API, (void *)(intptr_t)imgfmt);
+ vo_control(ctx, VOCTRL_LOAD_HWDEC_API, params);
}
static void get_and_update_icc_profile(struct gpu_priv *p)
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 592b96f2df..8de5ab3c74 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1218,7 +1218,7 @@ static int control(struct vo *vo, uint32_t request, void *data)
return true;
case VOCTRL_LOAD_HWDEC_API:
- ra_hwdec_ctx_load_fmt(&p->hwdec_ctx, vo->hwdec_devs, (intptr_t) data);
+ ra_hwdec_ctx_load_fmt(&p->hwdec_ctx, vo->hwdec_devs, data);
return true;
}
@@ -1312,9 +1312,9 @@ static void uninit(struct vo *vo)
gpu_ctx_destroy(&p->context);
}
-static void load_hwdec_api(void *ctx, int imgfmt)
+static void load_hwdec_api(void *ctx, struct hwdec_imgfmt_request *params)
{
- vo_control(ctx, VOCTRL_LOAD_HWDEC_API, (void *)(intptr_t) imgfmt);
+ vo_control(ctx, VOCTRL_LOAD_HWDEC_API, params);
}
static int preinit(struct vo *vo)