From ff5a90832814fe583b006d1943fced4dd0fa786d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 5 Nov 2013 19:08:44 +0100 Subject: vo_opengl: redo aspects of initialization, change hwdec API Instead of checking for resolution and image format changes, always fully reinit on any parameter change. Let init_video do all required initializations, which simplifies things a little bit. Change the gl_video/hardware decoding interop API slightly, so that hwdec initialization gets the full image parameters. Also make some cosmetic changes. --- video/out/gl_common.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'video/out/gl_common.h') diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 531cec37fb..995dc441e7 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -189,15 +189,15 @@ struct gl_hwdec_driver { 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, int w, int h); + 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 unload_image - // is called, so the callee doesn't need to do that. - int (*load_image)(struct gl_hwdec *hw, struct mp_image *hw_image, - GLuint *out_textures); - // Undo load_image(). The user of load_image() calls this when the textures + // 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 (*unload_image)(struct gl_hwdec *hw); + void (*unmap_image)(struct gl_hwdec *hw); void (*destroy)(struct gl_hwdec *hw); }; -- cgit v1.2.3