Core/LibVLC API to enable passthrough for specific codecs
We have a beloved Yamaha HTR-2067 amplifier that reports a fake DTS_HD capability. DTS_HD support can be detected via Windows audio device settings and via Android AudioDeviceInfo API.
On Windows and Android, audio outputs can configure and play DTS_HD without any error, the amplifier will stay silent.
I'm afraid that this audio device won't be the only one with this kind of issues. Therefore, I would like to add an API, and add a QT settings to select what codecs you want to use for passthrough.
Something like that to select a flags that will be passed to audio outputs:
#define LIBVLC_AUDIO_PASSTHROUGH_AUTOMATIC MAX_INT
#define LIBVLC_AUDIO_PASSTHROUGH_DISABLED 0
#define LIBVLC_AUDIO_PASSTHROUGH_AC3 (1<<0)
#define LIBVLC_AUDIO_PASSTHROUGH_EAC3 (1<<1)
#define LIBVLC_AUDIO_PASSTHROUGH_TRUEHD (1<<2)
#define LIBVLC_AUDIO_PASSTHROUGH_DTS (1<<3)
#define LIBVLC_AUDIO_PASSTHROUGH_DTSHD (1<<4)
libvlc_audio_set_passthrough_codecs(mp, int codec_flags);
We can also choose to simplify it and just have a enable/disable all API/Settings (I don't like it).