<html><head></head><body>Hi,<br><br>It's a bit pointless change anyway, because sys and vout are part of the same object, just different offsets within the allocation.<br><br><div class="gmail_quote">Le 2 octobre 2019 09:22:43 GMT+03:00, Thomas Guillem <thomas@gllm.fr> 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"><br><br>On Tue, Oct 1, 2019, at 13:12, Steve Lhomme wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">and only pass the vout_thread_sys_t instead of the unused vout.<br><br>This will be needed when the GetDevice call will create a window without setting<br>the sys->original which is only related to the display module.<hr> src/video_output/video_output.c | 19 ++++++++++---------<br> 1 file changed, 10 insertions(+), 9 deletions(-)<br><br>diff --git a/src/video_output/video_output.c <br>b/src/video_output/video_output.c<br>index eb022fb2ac0..1e7727f9730 100644<br>--- a/src/video_output/video_output.c<br>+++ b/src/video_output/video_output.c<br>@@ -147,14 +147,15 @@ static void vout_display_SizeWindow(unsigned <br>*restrict width,<br>     *height = (h * cfg->zoom.num) / cfg->zoom.den;<br> }<br> <br>-static void vout_SizeWindow(vout_thread_t *vout, unsigned *restrict width,<br>+static void vout_SizeWindow(vout_thread_sys_t *sys,<br></blockquote><br>I disagree with the vout => sys change. If you do that, you will end up with vout_ prefixed functions using either a vout or a sys. Either all this file use a sys and functions are prefixed by vout_sys_ or you let the actual behavior.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">+                            const video_format_t *original,<br>+                            unsigned *restrict width,<br>                             unsigned *restrict height)<br> {<br>-    vout_thread_sys_t *sys = vout->p;<br>-    unsigned w = sys->original.i_visible_width;<br>-    unsigned h = sys->original.i_visible_height;<br>-    unsigned sar_num = sys->original.i_sar_num;<br>-    unsigned sar_den = sys->original.i_sar_num;<br>+    unsigned w = original->i_visible_width;<br>+    unsigned h = original->i_visible_height;<br>+    unsigned sar_num = original->i_sar_num;<br>+    unsigned sar_den = original->i_sar_num;<br> <br>     switch (sys->source.crop.mode) {<br>         case VOUT_CROP_NONE:<br>@@ -190,7 +191,7 @@ static void vout_SizeWindow(vout_thread_t *vout, <br>unsigned *restrict width,<br> <br>     /* If the vout thread is running, the window lock must be held here. */<br>     vout_display_SizeWindow(width, height, w, h, sar_num, sar_den,<br>-                            sys->original.orientation,<br>+                            original->orientation,<br>                             &sys->display_cfg);<br> }<br> <br>@@ -203,7 +204,7 @@ static void vout_UpdateWindowSizeLocked(vout_thread_t *vout)<br> <br>     vlc_mutex_lock(&sys->display_lock);<br>     if (sys->display != NULL) {<br>-        vout_SizeWindow(vout, &width, &height);<br>+        vout_SizeWindow(sys, &sys->original, &width, &height);<br>         vlc_mutex_unlock(&sys->display_lock);<br> <br>         msg_Dbg(vout, "requested window size: %ux%u", width, height);<br>@@ -1954,7 +1955,7 @@ int vout_Request(const vout_configuration_t *cfg, <br>input_thread_t *input)<br>         };<br> <br>         VoutGetDisplayCfg(vout, &original, &sys->display_cfg);<br>-        vout_SizeWindow(vout, &wcfg.width, &wcfg.height);<br>+        vout_SizeWindow(sys, &sys->original, &wcfg.width, &wcfg.height);<br> <br>         if (vout_window_Enable(sys->display_cfg.window, &wcfg)) {<br>             vlc_mutex_unlock(&sys->window_lock);<br>-- <br>2.17.1<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>