[vlc-devel] [PATCH] [RFC] add demux filters that are similar in API to regular demuxers

Steve Lhomme robux4 at gmail.com
Mon Jun 6 16:14:09 CEST 2016


On Mon, Jun 6, 2016 at 2:42 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2016-06-06 11:11, Steve Lhomme a écrit :
>>
>> On Sun, Jun 5, 2016 at 2:15 PM, Rémi Denis-Courmont <remi at remlab.net>
>> wrote:
>>>
>>> Le 2016-06-05 13:03, Steve Lhomme a écrit :
>>>>
>>>>
>>>> The only difference is that when control/demux callbacks are called,
>>>> they
>>>> are
>>>> given the next demuxers to call in the chain
>>>>
>>>> --
>>>> replaces https://patches.videolan.org/patch/13585/
>>>> and https://patches.videolan.org/patch/13615/ with legacy patch
>>>> remaining
>>>> I do not understand how some demuxers have pf_demux to NULL, so there
>>>> might be
>>>> some simplifications possible.
>>>> ---
>>>>  NEWS                  |   3 ++
>>>>  include/vlc_demux.h   |  12 ++++++
>>>>  src/input/demux.c     | 106
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>  src/input/demux.h     |   3 ++
>>>>  src/input/input.c     |   9 +++++
>>>>  src/input/var.c       |   1 +
>>>>  src/libvlc-module.c   |   5 +++
>>>>  src/playlist/engine.c |   1 +
>>>>  8 files changed, 140 insertions(+)
>>>>
>>>> diff --git a/NEWS b/NEWS
>>>> index fd5e690..b6eeb06 100644
>>>> --- a/NEWS
>>>> +++ b/NEWS
>>>> @@ -101,6 +101,9 @@ Stream filter:
>>>>   * Added stream prebuffering plugin
>>>>   * Removed HTTP Live streaming stream filter
>>>>   * Added zlib (a.k.a. deflate) decompression filter
>>>> +
>>>> +Demux filter:
>>>> + * Added a demuxer filter chain to filter or intercept control
>>>> commands and demuxing
>>>>
>>>>  Audio output:
>>>>   * Complete rewrite of the AudioTrack Android module. This is now
>>>> the default.
>>>> diff --git a/include/vlc_demux.h b/include/vlc_demux.h
>>>> index 1153e1c..0c4bfeb 100644
>>>> --- a/include/vlc_demux.h
>>>> +++ b/include/vlc_demux.h
>>>> @@ -77,16 +77,25 @@ struct demux_t
>>>>
>>>>      /* Weak link to parent input */
>>>>      input_thread_t *p_input;
>>>> +
>>>> +    /* demux_t filter chaining */
>>>> +    demux_t        *p_next;
>>>> +    demux_t        *p_prev;
>>>
>>>
>>>
>>> Should not be needed.
>>
>>
>> For now when a demuxer changes the info values, it calls the previous
>> demux in line to inform it.
>
>
> No. For the last time, you cannot do that. It violates the memory model
> given that the demux_t "interface" is not expected or designed to be
> reentrant. More accurately, you cannot ensure that it will not violate the
> memory model (not that the subtlety matters much).

In the next version I don't do that anymore.

> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list