summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index 3ceb5a6897..f3f2df06f2 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -13,9 +13,10 @@ struct mp_hwdec_ctx {
// libavutil-wrapped context, if available.
struct AVBufferRef *av_device_ref; // AVHWDeviceContext*
- // List of IMGFMT_s, terminated with 0. NULL if N/A.
+ // List of allowed IMGFMT_s, terminated with 0.
+ // If NULL, all software formats are considered to be supported.
const int *supported_formats;
- // HW format for which above hw_subfmts are valid.
+ // HW format used by the hwdec
int hw_imgfmt;
};
@@ -25,17 +26,8 @@ struct mp_hwdec_devices;
struct mp_hwdec_devices *hwdec_devices_create(void);
void hwdec_devices_destroy(struct mp_hwdec_devices *devs);
-// Return the device context for the given API type. Returns NULL if none
-// available. Logically, the returned pointer remains valid until VO
-// uninitialization is started (all users of it must be uninitialized before).
-// hwdec_devices_request() may be used before this to lazily load devices.
-// Contains a wrapped AVHWDeviceContext.
-// Beware that this creates a _new_ reference.
-struct AVBufferRef *hwdec_devices_get_lavc(struct mp_hwdec_devices *devs,
- int av_hwdevice_type);
-
-struct mp_hwdec_ctx *hwdec_devices_get_by_lavc(struct mp_hwdec_devices *devs,
- int av_hwdevice_type);
+struct mp_hwdec_ctx *hwdec_devices_get_by_imgfmt(struct mp_hwdec_devices *devs,
+ int hw_imgfmt);
// For code which still strictly assumes there is 1 (or none) device.
struct mp_hwdec_ctx *hwdec_devices_get_first(struct mp_hwdec_devices *devs);