[vlc-devel] [RFC PATCH 0/2] decoder: restart module if fmt_in changes

Thomas Guillem thomas at gllm.fr
Mon Sep 7 14:48:43 CEST 2015


The goal of these patches is to set the fmt_in struct read only for the decoder
module, i.e. this struct won't change during the life cycle of the module.

I tried to keep the b_need_packetized variable:

 - If b_need_packetized is false, fmt_in won't change since there is no
   packetizer.

 - If it's true, a packetizer is created after the decoder. If the packetizer
   find a new output format, the decoder module is closed and a new one is
   created with the new format.

I have several comments:

 - When we restart the decoder module, should we insure that we re-open the
   same module than before ? Currently it's not the case.

 - Nothing force the new decoder module to need a packetizer. In the case where
   it doesn't need one, I decided to unload the packetizer and continue without
   it. Not sure it's the best thing to do.

Thomas Guillem (2):
  decoder: rearrange module load/unload
  decoder: restart module if fmt_in is changed by the packetizer

 src/input/decoder.c | 190 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 109 insertions(+), 81 deletions(-)

-- 
2.1.4



More information about the vlc-devel mailing list