[vlc-devel] [RFC] Sout workshop notes
thomas at gllm.fr
Mon Mar 2 13:36:44 CET 2020
Here is the synthesis of the Sout workshop notes that written on https://mensuel.framapad.org/p/9fa9-coucoutuveuxvoirmoncone?lang=fr
It's a draft. if people (attending or not attending this workshop) have questions or remarks, please comment after this mail.
Finally, I will publish the final version on this ML when everyone agree.
The goal of this workshop was principally to forward the PCR to the Sout in order to use it from muxer modules.
To forward this PCR from the demuxer to the muxer, we have to go through:
- es_out display (input/es_out.c)
- input_Decoder API (input/decoder.c)
- DecoderThread packetizers
- Sout API
Here some assertions that everyone agreed on:
- DTS >= PCR (demuxers not respecting it should be fixed)
- Demuxers and packetizers have to output in DTS order (modules should be fixed otherwise)
Here is the detailed task list:
Part 1 by Typx (WIP, cf.ML): Forward PCR to input_Decoder (input/decoder.c)
- Add the vlc_es_fifo_t API: it allows to recover the PCR used by the blocks
- Use this API from input_Decoder API
- Pass the PCR to the sout packetizers from DecoderThread
Part 2 by tguillem (WIP, will be done next week): Pass and filter PCR from packetizers
- Change the packetizer module API to do like decoders: replace pf_packetize by pf_decode, add a new owner callback: packetizer_Queueblock(block);
- Add decoder.pf_send_pcr() and fix packetizer_Queueblock() to also send the PCR of the block
Part 3 by inthewings (Waiting for Part 2): implement pf_send_pcr() on all packetizers modules.
Part 4 by inthewings: What about decoder module in the transcode case (decoder+encode) ?
- We could forward PCR to decoder modules but avcodec won't be able to handle it.
- Add an option that setup the maximum DTS delays between 2 different ES (min/max): after this delay: trash the late ES.
Part 5: align mux on "stream out"
^^^^^NEED MORE INFOS ^^^^^^^^^
Part 6 by courmish (already done/ML): remove "vlc_tick_now()<->PTS" from sout
Part 7 by courmish (WIP) : Remove p_sout_instance
Part Bonus: LibVLC sout simple API Draft
- Create module one by one with a proper function call (a module can be mux, protocol, codecs, Resolution NbChannels).
- Each modules need to be refcounted in order to re-use them
- Add setter/getters to modify modules options
More information about the vlc-devel