[vlc-devel] [RFC PATCHv2 03/18] input: change InputDemuxNew arguments

Thomas Guillem thomas at gllm.fr
Wed Feb 19 09:24:54 CET 2020


On Tue, Feb 18, 2020, at 18:12, Rémi Denis-Courmont wrote:
> Hi,
> 
> I don't really get why we need a new context (1-2) if we have one layered output per source (3).

The input_source_t is not exposed in CORE API.
OK, demux modules won't need to access this context/source, they will just need to pass it around, so they don't need to know the definition.

So yeah, I could pass the input_source_t instead, but I will need to add refcount support first (because timeshift).

> 
> Le 18 février 2020 18:11:16 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>> In order to be able to specify an es_out_t per input_source_t. src/input/input.c | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>> 
>> diff --git a/src/input/input.c b/src/input/input.c
>> index 2dd0bf09821..c033cdaae91 100644
>> --- a/src/input/input.c
>> +++ b/src/input/input.c
>> @@ -2427,7 +2427,7 @@ InputStreamHandleAnchor( input_thread_t *p_input, input_source_t *source,
>>      return VLC_SUCCESS;
>>  }
>>  
>> -static demux_t *InputDemuxNew( input_thread_t *p_input,
>> +static demux_t *InputDemuxNew( input_thread_t *p_input, es_out_t *p_es_out,
>>                                 input_source_t *p_source, const char *url,
>>                                 const char *psz_demux, const char *psz_anchor )
>>  {
>> @@ -2435,7 +2435,7 @@ static demux_t *InputDemuxNew( input_thread_t *p_input,
>>      vlc_object_t *obj = VLC_OBJECT(p_input);
>>  
>>      /* create the underlying access stream */
>> -    stream_t *p_stream = stream_AccessNew( obj, p_input, priv->p_es_out,
>> +    stream_t *p_stream = stream_AccessNew( obj, p_input, p_es_out,
>>                                             priv->b_preparsing, url );
>>      if( p_stream == NULL )
>>          return NULL;
>> @@ -2469,7 +2469,7 @@ static demux_t *InputDemuxNew( input_thread_t *p_input,
>>  
>>      /* create a regular demux with the access stream created */
>>      demux_t *demux = demux_NewAdvanced( obj, p_input, psz_demux, url, p_stream,
>> -                                        priv->p_es_out, priv->b_preparsing );
>> +                                        p_es_out, priv->b_preparsing );
>>      if( demux != NULL )
>>          return demux;
>>  
>> @@ -2576,7 +2576,8 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
>>      char *url;
>>      if( likely(asprintf( &url, "%s://%s", psz_access, psz_path ) >= 0) )
>>      {
>> -        in->p_demux = InputDemuxNew( p_input, in, url, psz_demux, psz_anchor );
>> +        in->p_demux = InputDemuxNew( p_input, priv->p_es_out, in, url,
>> +                                     psz_demux, psz_anchor );
>>          free( url );
>>      }
>>      else
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200219/2030f735/attachment.html>


More information about the vlc-devel mailing list