<!doctype html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body>There was never a rule of sending specifically "core" changes for review outside code freeze. This is just a bad faith excuse to not admit that you are picking on me.<br><br><div class="gmail_quote">Le 9 mai 2019 13:15:34 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;">
<div><br></div><div>On Thu, May 9, 2019, at 11:48, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>It does simplify the code on objective complexity metrics. And that ship has sailed about ten years ago.<br></div><div><br></div><div>And I don't think it's okay to pick on one developer. I was not the first to push code without review lately. And I am also not the only person to disagree with systematic review.<br></div></blockquote><div><br></div><div>I don't think someone pushed in VLC core without a review since we decided to move to gitlab.<br></div><div><br></div><div>From the vote poll result, it seems the vast majority of people agreed to use gitalb and systematic reviews.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div class="qt-gmail_quote"><div>Le 9 mai 2019 10:35:47 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>Hello,<br></div><div><br></div><div>This doesn't simplify at all, thread_cancel is very complicated, I wold have preferred a cond + bool.<br></div><div><br></div><div>You should propose all your patches changing the core to the ML. Since they always have to be reviewed anyway when we switch to gitlab soon.<br></div><div><br></div><div>On Wed, May 8, 2019, at 20:21, Rémi Denis-Courmont wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>vlc | branch: master | Rémi Denis-Courmont <remi@remlab.net> | Wed May  <br></div><div>8 19:20:53 2019 +0300| [949204f27498bd21e8d269b5aa9b80c7ec84a435] | <br></div><div>committer: Rémi Denis-Courmont<br></div><div><br></div><div>vout: cancel the thread and simplify<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><a href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=949204f27498bd21e8d269b5aa9b80c7ec84a435">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=949204f27498bd21e8d269b5aa9b80c7ec84a435</a><br></blockquote><div><hr>  src/video_output/control.h      |  7 -------<br></div><div>  src/video_output/video_output.c | 24 ++++++++++++------------<br></div><div>  2 files changed, 12 insertions(+), 19 deletions(-)<br></div><div> <br></div><div> diff --git a/src/video_output/control.h b/src/video_output/control.h<br></div><div> index 46b78122e4..b189b6478a 100644<br></div><div> --- a/src/video_output/control.h<br></div><div> +++ b/src/video_output/control.h<br></div><div> @@ -27,13 +27,6 @@<br></div><div>  <br></div><div>  /* */<br></div><div>  enum {<br></div><div> -    VOUT_CONTROL_CLEAN,<br></div><div> -<br></div><div> -#if 0<br></div><div> -    /* */<br></div><div> -    VOUT_CONTROL_START,<br></div><div> -    VOUT_CONTROL_STOP,<br></div><div> -#endif<br></div><div>      VOUT_CONTROL_CHANGE_FILTERS,        /* string */<br></div><div>      VOUT_CONTROL_CHANGE_INTERLACE,      /* boolean */<br></div><div>  <br></div><div> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c<br></div><div> index 2a76ad5c00..b84336ac23 100644<br></div><div> --- a/src/video_output/video_output.c<br></div><div> +++ b/src/video_output/video_output.c<br></div><div> @@ -33,6 +33,8 @@<br></div><div>  # include "config.h"<br></div><div>  #endif<br></div><div>  <br></div><div> +#include <stdnoreturn.h><br></div><div> +<br></div><div>  #include <vlc_common.h><br></div><div>  <br></div><div>  #include <math.h><br></div><div> @@ -1527,11 +1529,9 @@ void vout_Cancel(vout_thread_t *vout, bool canceled)<br></div><div>      vout_control_Release(&sys->control);<br></div><div>  }<br></div><div>  <br></div><div> -static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)<br></div><div> +static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)<br></div><div>  {<br></div><div>      switch(cmd.type) {<br></div><div> -    case VOUT_CONTROL_CLEAN:<br></div><div> -        return 1;<br></div><div>      case VOUT_CONTROL_CHANGE_FILTERS:<br></div><div>          ThreadChangeFilters(vout, NULL,<br></div><div>                              cmd.string != NULL ?<br></div><div> @@ -1579,7 +1579,6 @@ static int ThreadControl(vout_thread_t *vout, <br></div><div> vout_control_cmd_t cmd)<br></div><div>          break;<br></div><div>      }<br></div><div>      vout_control_cmd_Clean(&cmd);<br></div><div> -    return 0;<br></div><div>  }<br></div><div>  <br></div><div>  <br></div><div> /*****************************************************************************<br></div><div> @@ -1589,7 +1588,7 @@ static int ThreadControl(vout_thread_t *vout, <br></div><div> vout_control_cmd_t cmd)<br></div><div>   * terminated. It handles the pictures arriving in the video heap and <br></div><div> the<br></div><div>   * display device events.<br></div><div>   <br></div><div> *****************************************************************************/<br></div><div> -static void *Thread(void *object)<br></div><div> +noreturn static void *Thread(void *object)<br></div><div>  {<br></div><div>      vout_thread_t *vout = object;<br></div><div>      vout_thread_sys_t *sys = vout->p;<br></div><div> @@ -1607,20 +1606,21 @@ static void *Thread(void *object)<br></div><div>          } else {<br></div><div>              deadline = VLC_TICK_INVALID;<br></div><div>          }<br></div><div> -        while (!vout_control_Pop(&sys->control, &cmd, deadline))<br></div><div> -            if (ThreadControl(vout, cmd))<br></div><div> -                goto out;<br></div><div> +        while (!vout_control_Pop(&sys->control, &cmd, deadline)) {<br></div><div> +            int canc = vlc_savecancel();<br></div><div> +            ThreadControl(vout, cmd);<br></div><div> +            vlc_restorecancel(canc);<br></div><div> +        }<br></div><div>  <br></div><div> +        int canc = vlc_savecancel();<br></div><div>          deadline = VLC_TICK_INVALID;<br></div><div>          wait = ThreadDisplayPicture(vout, &deadline) != VLC_SUCCESS;<br></div><div>  <br></div><div>          const bool picture_interlaced = sys->displayed.is_interlaced;<br></div><div>  <br></div><div>          vout_SetInterlacingState(vout, picture_interlaced);<br></div><div> +        vlc_restorecancel(canc);<br></div><div>      }<br></div><div> -<br></div><div> -out:<br></div><div> -    return NULL;<br></div><div>  }<br></div><div>  <br></div><div>  static void vout_StopDisplay(vout_thread_t *vout)<br></div><div> @@ -1628,7 +1628,7 @@ static void vout_StopDisplay(vout_thread_t *vout)<br></div><div>      vout_thread_sys_t *sys = vout->p;<br></div><div>  <br></div><div>      assert(sys->original.i_chroma != 0);<br></div><div> -    vout_control_PushVoid(&sys->control, VOUT_CONTROL_CLEAN);<br></div><div> +    vlc_cancel(sys->thread);<br></div><div>      vlc_join(sys->thread, NULL);<br></div><div>  <br></div><div>      if (sys->spu_blend != NULL)<hr> vlc-commits mailing list<br></div><div> vlc-commits@videolan.org<br></div><div> <a href="https://mailman.videolan.org/listinfo/vlc-commits">https://mailman.videolan.org/listinfo/vlc-commits</a><br></div><div><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>