summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-03 21:54:04 +0100
committerwm4 <wm4@nowhere>2014-12-03 23:01:19 +0100
commit920512d358221effa851da8a64fd26a54d154605 (patch)
tree9500dedad78ed95d70b87605125cab8c1f40d6b6 /video/out/gl_common.h
parent63377744f3dfff04fe02c832b24f8537b78ee8d3 (diff)
downloadmpv-920512d358221effa851da8a64fd26a54d154605.tar.bz2
mpv-920512d358221effa851da8a64fd26a54d154605.tar.xz
vo_opengl: move hwdec parts into their own files
This wasn't done before because there was no advantage in "abstracting" it. This changed, and putting this into its own files is better than messing it into gl_common.c/h.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r--video/out/gl_common.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index fa1566b0fb..38d952ae1b 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -166,51 +166,6 @@ void mpgl_set_backend_x11(MPGLContext *ctx);
void mpgl_set_backend_x11egl(MPGLContext *ctx);
void mpgl_set_backend_wayland(MPGLContext *ctx);
-struct mp_hwdec_info;
-
-struct gl_hwdec {
- const struct gl_hwdec_driver *driver;
- struct mp_log *log;
- GL *gl;
- struct mp_hwdec_info *info;
- // For free use by hwdec driver
- void *priv;
- // hwdec backends must set this to an IMGFMT_ that has an equivalent
- // internal representation in gl_video.c as the hardware texture.
- // It's used to build the rendering chain, and also as screenshot format.
- int converted_imgfmt;
- // Normally this is GL_TEXTURE_2D, but the hwdec driver can set it to
- // GL_TEXTURE_RECTANGLE.
- GLenum gl_texture_target;
-};
-
-struct gl_hwdec_driver {
- // Same name as used by mp_hwdec_info->load_api()
- const char *api_name;
- // The hardware surface IMGFMT_ that must be passed to map_image later.
- int imgfmt;
- // Create the hwdec device. It must fill in hw->info, if applicable.
- // This also must set hw->converted_imgfmt.
- int (*create)(struct gl_hwdec *hw);
- // Prepare for rendering video. (E.g. create textures.)
- // Called on initialization, and every time the video size changes.
- int (*reinit)(struct gl_hwdec *hw, const struct mp_image_params *params);
- // Return textures that contain the given hw_image.
- // Note that the caller keeps a reference to hw_image until unmap_image
- // is called, so the hwdec driver doesn't need to do that.
- int (*map_image)(struct gl_hwdec *hw, struct mp_image *hw_image,
- GLuint *out_textures);
- // Undo map_image(). The user of map_image() calls this when the textures
- // are not needed anymore.
- void (*unmap_image)(struct gl_hwdec *hw);
- // Return a mp_image downloaded from the GPU (optional)
- struct mp_image *(*download_image)(struct gl_hwdec *hw,
- struct mp_image *hw_image);
- void (*destroy)(struct gl_hwdec *hw);
-};
-
-extern const struct gl_hwdec_driver *const mpgl_hwdec_drivers[];
-
void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
const char *ext2, struct mp_log *log);