summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-07-31 11:50:57 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-08-03 16:56:17 -0700
commit06900eef63c112fc9404f649daf31de334711bbc (patch)
treec0ac337a38b5667c064bf597096cd53808acb298 /video/out
parent490e263529a5e49e8a7b6d9c6c21a1312f3ac1a4 (diff)
downloadmpv-06900eef63c112fc9404f649daf31de334711bbc.tar.bz2
mpv-06900eef63c112fc9404f649daf31de334711bbc.tar.xz
hwdec/vaapi: rename interops to reflect more general use
This is the first in a series of changes that will introduce a drmprime hwdec. As our vaapi hwdec is based around exporting surfaces as drmprime dmabufs, we've actually got a lot of useful code already in place in the GL/PL interops. I'm going to reorganise and adjust this code to make the interops usable with the new hwdec as well. The first step is to rename the files and functions. There are no functional or other changes here. They will come next.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/hwdec/dmabuf_interop.h (renamed from video/out/hwdec/hwdec_vaapi.h)6
-rw-r--r--video/out/hwdec/dmabuf_interop_gl.c (renamed from video/out/hwdec/hwdec_vaapi_gl.c)4
-rw-r--r--video/out/hwdec/dmabuf_interop_pl.c (renamed from video/out/hwdec/hwdec_vaapi_pl.c)4
-rw-r--r--video/out/hwdec/hwdec_vaapi.c8
4 files changed, 11 insertions, 11 deletions
diff --git a/video/out/hwdec/hwdec_vaapi.h b/video/out/hwdec/dmabuf_interop.h
index 76f1c37c13..a45a69e5af 100644
--- a/video/out/hwdec/hwdec_vaapi.h
+++ b/video/out/hwdec/dmabuf_interop.h
@@ -49,7 +49,7 @@ struct priv {
void *interop_mapper_priv;
};
-typedef bool (*vaapi_interop_init)(const struct ra_hwdec *hw);
+typedef bool (*dmabuf_interop_init)(const struct ra_hwdec *hw);
-bool vaapi_gl_init(const struct ra_hwdec *hw);
-bool vaapi_pl_init(const struct ra_hwdec *hw);
+bool dmabuf_interop_gl_init(const struct ra_hwdec *hw);
+bool dmabuf_interop_pl_init(const struct ra_hwdec *hw);
diff --git a/video/out/hwdec/hwdec_vaapi_gl.c b/video/out/hwdec/dmabuf_interop_gl.c
index b8628ef8b7..0edd43d370 100644
--- a/video/out/hwdec/hwdec_vaapi_gl.c
+++ b/video/out/hwdec/dmabuf_interop_gl.c
@@ -16,7 +16,7 @@
*/
#include "config.h"
-#include "hwdec_vaapi.h"
+#include "dmabuf_interop.h"
#include <EGL/egl.h>
#include "video/out/opengl/ra_gl.h"
@@ -218,7 +218,7 @@ static void vaapi_gl_unmap(struct ra_hwdec_mapper *mapper)
}
}
-bool vaapi_gl_init(const struct ra_hwdec *hw)
+bool dmabuf_interop_gl_init(const struct ra_hwdec *hw)
{
struct priv_owner *p = hw->priv;
if (!ra_is_gl(hw->ra)) {
diff --git a/video/out/hwdec/hwdec_vaapi_pl.c b/video/out/hwdec/dmabuf_interop_pl.c
index b8b79f8070..98a749c296 100644
--- a/video/out/hwdec/hwdec_vaapi_pl.c
+++ b/video/out/hwdec/dmabuf_interop_pl.c
@@ -19,7 +19,7 @@
#include <unistd.h>
#include "config.h"
-#include "hwdec_vaapi.h"
+#include "dmabuf_interop.h"
#include "video/out/placebo/ra_pl.h"
#include "video/out/placebo/utils.h"
@@ -113,7 +113,7 @@ static void vaapi_pl_unmap(struct ra_hwdec_mapper *mapper)
ra_tex_free(mapper->ra, &mapper->tex[n]);
}
-bool vaapi_pl_init(const struct ra_hwdec *hw)
+bool dmabuf_interop_pl_init(const struct ra_hwdec *hw)
{
struct priv_owner *p = hw->priv;
pl_gpu gpu = ra_pl_get(hw->ra);
diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c
index ea0fa9e746..b62c68ccc4 100644
--- a/video/out/hwdec/hwdec_vaapi.c
+++ b/video/out/hwdec/hwdec_vaapi.c
@@ -26,7 +26,7 @@
#include "config.h"
#include "video/out/gpu/hwdec.h"
-#include "video/out/hwdec/hwdec_vaapi.h"
+#include "video/out/hwdec/dmabuf_interop.h"
#include "video/fmt-conversion.h"
#include "video/mp_image_pool.h"
#include "video/vaapi.h"
@@ -107,12 +107,12 @@ static void uninit(struct ra_hwdec *hw)
va_destroy(p->ctx);
}
-const static vaapi_interop_init interop_inits[] = {
+const static dmabuf_interop_init interop_inits[] = {
#if HAVE_VAAPI_EGL
- vaapi_gl_init,
+ dmabuf_interop_gl_init,
#endif
#if HAVE_VAAPI_LIBPLACEBO
- vaapi_pl_init,
+ dmabuf_interop_pl_init,
#endif
NULL
};