[vlc-devel] [RFC PATCH 00/17] AC3/DT packetizer/decoder rewrite

Thomas Guillem thomas at gllm.fr
Mon Jul 25 17:23:49 CEST 2016


So, the best way to have decoder fallback working is to fail during the probe.
To fail during the probe, the decoders (at least AC3*/DTS*/MPG4) must be
correctly packetized. If it's the case, these decoders will be able to query
the audio output capabilities from the probe function (and fails if the audio
output can't do S/PDIF).

This set of patches split the a52 and dts (and soon mpeg4) packetizers into
several packetizers and a unique S/PDIF decoder.

The S/PDIF decoder (used for AC3/DTS/MPGA and maybe more) is a really simple
decoder than only pass the input block (hence pass-throught) from the Decode
callback. This decoder also test if the audio output is able to output S/PDIF
from the Open callback.

I changed the way the "spdif" option is handled. It's now queried only from the
S/PDIF decoder to test if it should handle a S/PDIF format. Audio outputs don't
need to query it anymore, since they won't have any S/PDIF input if the spdif
decoder is disabled.

Features dropped:
 - The "a52-upmix" option is gone
 - The liba52 decoder works only if the input is correclty packetized. If it's
   not the case, libavcodec will be used.

TODO:
 - dtstofloat converter => dca codec
 - mpeg_audio converter => mad codec
 - fill audio format from mkv and mp4 demuxers
 - Pass throught for AAC (disabled by default ?) ?

Thomas Guillem (17):
  decoder: don't set dec->b_error if aout_update_format fails
  decoder: abort packetizer loop in case of error
  decoder: factor decoder reload when fmt_in changes
  a52: split decoder and packetizer
  dts: split decoder and packetizer
  spdif: add MPGA support (disabled by default)
  move a52tofloat32 converter to liba52 codec
  adummy: don't check "spdif" option
  alsa: don't check "spdif" option
  audiotrack: don't check "spdif" option
  auhal: don't check "spdif" option
  directsound: don't check "spdif" option
  oss: don't check "spdif" option
  wasapi: don't check "spdif" option
  waveout: don't check "spdif" option
  spdif: move option to codec module
  spdif: set "spdif" option true by default

 configure.ac                                  |  10 +-
 extras/package/rpm/vlc.altlinux.spec          |   7 +-
 modules/MODULES_LIST                          |   3 +-
 modules/audio_filter/Makefile.am              |   8 +-
 modules/audio_filter/converter/a52tofloat32.c | 420 ------------------
 modules/audio_output/adummy.c                 |   2 +-
 modules/audio_output/alsa.c                   |   3 +-
 modules/audio_output/audiotrack.c             |   2 +-
 modules/audio_output/auhal.c                  |   2 +-
 modules/audio_output/directsound.c            |   2 +-
 modules/audio_output/oss.c                    |   5 +-
 modules/audio_output/wasapi.c                 |   2 +-
 modules/audio_output/waveout.c                |   2 +-
 modules/codec/Makefile.am                     |  13 +-
 modules/codec/a52.c                           | 430 ------------------
 modules/codec/a52.h                           | 216 ---------
 modules/codec/avcodec/audio.c                 |  15 +
 modules/codec/avcodec/avcodec.c               |   2 +
 modules/codec/dts.c                           | 605 --------------------------
 modules/codec/dts_header.c                    | 243 -----------
 modules/codec/dts_header.h                    |  35 --
 modules/codec/liba52.c                        | 384 ++++++++++++++++
 modules/codec/spdif.c                         | 119 +++++
 modules/demux/Makefile.am                     |   4 +-
 modules/demux/mkv/mkv.cpp                     |   2 +-
 modules/demux/mpeg/es.c                       |   4 +-
 modules/packetizer/Makefile.am                |   7 +-
 modules/packetizer/a52.c                      | 328 ++++++++++++++
 modules/packetizer/a52.h                      | 216 +++++++++
 modules/packetizer/dts.c                      | 498 +++++++++++++++++++++
 modules/packetizer/dts_header.c               | 243 +++++++++++
 modules/packetizer/dts_header.h               |  35 ++
 po/POTFILES.in                                |   7 +-
 src/input/decoder.c                           |  45 +-
 src/libvlc-module.c                           |   6 -
 35 files changed, 1921 insertions(+), 2004 deletions(-)
 delete mode 100644 modules/audio_filter/converter/a52tofloat32.c
 delete mode 100644 modules/codec/a52.c
 delete mode 100644 modules/codec/a52.h
 delete mode 100644 modules/codec/dts.c
 delete mode 100644 modules/codec/dts_header.c
 delete mode 100644 modules/codec/dts_header.h
 create mode 100644 modules/codec/liba52.c
 create mode 100644 modules/codec/spdif.c
 create mode 100644 modules/packetizer/a52.c
 create mode 100644 modules/packetizer/a52.h
 create mode 100644 modules/packetizer/dts.c
 create mode 100644 modules/packetizer/dts_header.c
 create mode 100644 modules/packetizer/dts_header.h

-- 
2.8.1



More information about the vlc-devel mailing list