diff options
author | wm4 <wm4@nowhere> | 2013-11-05 19:08:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-05 22:05:23 +0100 |
commit | ff5a90832814fe583b006d1943fced4dd0fa786d (patch) | |
tree | 3af94d05a7ce4f2c7bfc3cda96825ad0cc61331b /video/out/gl_common.h | |
parent | 91472b84c2bd5a4501d0c4ac801aefb24cd101ac (diff) | |
download | mpv-ff5a90832814fe583b006d1943fced4dd0fa786d.tar.bz2 mpv-ff5a90832814fe583b006d1943fced4dd0fa786d.tar.xz |
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.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r-- | video/out/gl_common.h | 14 |
1 files changed, 7 insertions, 7 deletions
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); }; |