<html><head></head><body>Hi,<br><br>Keeping same offset for the swap callbacks would make devugging a little less confusing, probably.<br><br><div class="gmail_quote">Le 2 mars 2021 09:15:16 GMT+02:00, Romain Vimont <rom1v@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><hr> include/vlc_opengl.h | 28 +++++++++++++++++-----------<br> 1 file changed, 17 insertions(+), 11 deletions(-)<br><br>diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h<br>index f91f387bf7..6736940623 100644<br>--- a/include/vlc_opengl.h<br>+++ b/include/vlc_opengl.h<br>@@ -49,24 +49,30 @@ struct vlc_gl_t<br> {<br>     struct vlc_object_t obj;<br> <br>-    struct vlc_decoder_device *device;<br>-    struct vout_window_t *surface;<br>     module_t *module;<br>     void *sys;<br> <br>-    vlc_fourcc_t offscreen_chroma_out;<br>-    struct vlc_video_context *offscreen_vctx_out;<br>-    /* Flag to indicate if the OpenGL implementation produces upside-down<br>-     * pictures */<br>-    bool offscreen_vflip;<br>+    union {<br>+        struct { /* on-screen */<br>+            struct vout_window_t *surface;<br>+<br>+            void (*swap)(vlc_gl_t *);<br>+        };<br>+        struct { /* off-screen */<br>+            struct vlc_decoder_device *device;<br>+            vlc_fourcc_t offscreen_chroma_out;<br>+            struct vlc_video_context *offscreen_vctx_out;<br>+            /* Flag to indicate if the OpenGL implementation produces upside-down<br>+             * pictures */<br>+            bool offscreen_vflip;<br>+<br>+            picture_t *(*swap_offscreen)(vlc_gl_t *);<br>+        };<br>+    };<br> <br>     int  (*make_current)(vlc_gl_t *);<br>     void (*release_current)(vlc_gl_t *);<br>     void (*resize)(vlc_gl_t *, unsigned, unsigned);<br>-    union {<br>-        void (*swap)(vlc_gl_t *);<br>-        picture_t *(*swap_offscreen)(vlc_gl_t *);<br>-    };<br>     void*(*get_proc_address)(vlc_gl_t *, const char *);<br>     void (*destroy)(vlc_gl_t *);<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>