summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-03-20 12:31:38 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-03-21 09:53:37 -0700
commitfcc81cd940dc721773a91301c60755aa11010a86 (patch)
tree5c2579f59ca337fc91e3ccec0b0ec542933ad21d /video/hwdec.h
parentf871294204529374dd3056f7b616381400233036 (diff)
downloadmpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.bz2
mpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.xz
vo_gpu[_next]: hwdec: fix logging regression when probing
When I introduced the concept of lazy loading of hwdecs by img format, I did not propagate the probing flag correctly, leading to the new normal loading path not runnng with probing set, meaning that any errors would show up, creating unnecessary noise. This change fixes this regression.
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index a57010d33f..8219fd5dab 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -51,16 +51,23 @@ void hwdec_devices_add(struct mp_hwdec_devices *devs, struct mp_hwdec_ctx *ctx);
// not added yet. This is not thread-safe.
void hwdec_devices_remove(struct mp_hwdec_devices *devs, struct mp_hwdec_ctx *ctx);
+struct hwdec_imgfmt_request {
+ int imgfmt;
+ bool probing;
+};
+
// Can be used to enable lazy loading of an API with hwdec_devices_request().
// If used at all, this must be set/unset during initialization/uninitialization,
// as concurrent use with hwdec_devices_request() is a race condition.
void hwdec_devices_set_loader(struct mp_hwdec_devices *devs,
- void (*load_api)(void *ctx, int imgfmt), void *load_api_ctx);
+ void (*load_api)(void *ctx, struct hwdec_imgfmt_request *params),
+ void *load_api_ctx);
// Cause VO to lazily load all devices for a specified img format, and will
// block until this is done (even if not available). Pass IMGFMT_NONE to load
// all available devices.
-void hwdec_devices_request_for_img_fmt(struct mp_hwdec_devices *devs, int imgfmt);
+void hwdec_devices_request_for_img_fmt(struct mp_hwdec_devices *devs,
+ struct hwdec_imgfmt_request *params);
// Return "," concatenated list (for introspection/debugging). Use talloc_free().
char *hwdec_devices_get_names(struct mp_hwdec_devices *devs);