<html><head></head><body>Hi,<br><br>I don't know on top of my head. What is the concern here?<br><br><div class="gmail_quote">Le 17 septembre 2020 14:01:56 GMT+03:00, Alexandre Janniaux <ajanni@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">Hi,<br><br>On Wed, Sep 16, 2020 at 06:34:08PM +0300, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le keskiviikkona 16. syyskuuta 2020, 16.54.09 EEST Hugo Beauzée-Luyssen a<br>écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><hr>  include/vlc_demux.h  | 6 ++++++<br>  include/vlc_stream.h | 1 +<br>  src/input/input.c    | 8 ++++++++<br>  3 files changed, 15 insertions(+)<br><br> diff --git a/include/vlc_demux.h b/include/vlc_demux.h<br> index 5d67813fc0..af7f766c1d 100644<br> --- a/include/vlc_demux.h<br> +++ b/include/vlc_demux.h<br> @@ -119,6 +119,12 @@ enum demux_query_e<br>       * arg1=double *quality, arg2=double *strength */<br>      DEMUX_GET_SIGNAL = 0x107,<br><br> +    /** Retrieves the demuxed content type<br> +     * Can fail if the control is not implemented<br> +     *<br> +     * arg1= enum input_item_type_e* */<br> +    DEMUX_GET_TYPE = 0x109,<br> +<br>      /** Sets the paused or playing/resumed state.<br>       *<br>       * Streams are initially in playing state. The control always specifies<br> a diff --git a/include/vlc_stream.h b/include/vlc_stream.h<br> index bc6c0d30b7..85055a8a35 100644<br> --- a/include/vlc_stream.h<br> +++ b/include/vlc_stream.h<br> @@ -168,6 +168,7 @@ enum stream_query_e<br>      STREAM_GET_CONTENT_TYPE,    /**< arg1= char **         res=can fail */<br>      STREAM_GET_SIGNAL,      /**< arg1=double *pf_quality, arg2=double<br> *pf_strength   res=can fail */ STREAM_GET_TAGS,        /**< arg1=const<br> block_t ** res=can fail */ +    STREAM_GET_TYPE,        /**<<br> arg1=input_item_type_e*    res=can fail */<br><br>      STREAM_SET_PAUSE_STATE = 0x200, /**< arg1= bool        res=can fail */<br>      STREAM_SET_TITLE,       /**< arg1= int          res=can fail */<br> diff --git a/src/input/input.c b/src/input/input.c<br> index 28de738f8a..c31b1d3060 100644<br> --- a/src/input/input.c<br> +++ b/src/input/input.c<br> @@ -2791,6 +2791,14 @@ static int InputSourceInit( input_source_t *in,<br> input_thread_t *p_input, if( demux_Control( in->p_demux, DEMUX_GET_FPS,<br> &in->f_fps ) ) in->f_fps = 0.f;<br><br> +    enum input_item_type_e type;<br></blockquote>I'm not sure if an enum is safe w.r.t. ABI and aliasing, as opposed to int.<br></blockquote><br>If it's not safe, don't we have an issue with the module entry<br>opcodes too?<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">+    if( !demux_Control( in->p_demux, DEMUX_GET_TYPE, &type ) )<br>+    {<br>+        vlc_mutex_lock( &input_priv(p_input)->p_item->lock );<br>+        input_priv(p_input)->p_item->i_type = type;<br>+        vlc_mutex_unlock( &input_priv(p_input)->p_item->lock );<br>+    }<br>+<br>     if( var_GetInteger( p_input, "clock-synchro" ) != -1 )<br>         in->b_can_pace_control = !var_GetInteger( p_input, "clock-synchro"<br>);<br></blockquote></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>