Please sign in to comment.
Add support for E-AC3, TrueHD and DTS-HD digital passthrough.
A big thank you to Anssi Hannulafor his changes to FFmpeg and working with me to get this up and running. Thanks to foobum for his code review Details on some of the changes included in this commit are: - When creating the AudioOutput instance, only open the audio device and set all parameters when we have valid configuration information. This seriously reduces the amount of noise in the logs - Simplify locking code in audioplayer, in particular do not create more locking than necessary - E-AC3 , DTS-HD hi-res can be enabled on any platform supporting stereo 192kHz, so change the test to see if hardware supports that mode - Add ability to play audio-only files with default player. Set -O AudioOnlyPlayback=1 - Add support for 6.144Mbit/s bitrate passthrough. This allows the use of DTS-HD passthrough for card not supporting HBR (ION, 9400M or nvidia GT2xx). - Make audiooutputsettings digital features more generic and future-proof - Change digital passthrough auto-configuration: Open device with settings: AES0=6 AES1=0x82 AES2=0x00 AES3=0x01. AES0 = NON_AUDIO | PRO_MODE AES1 = original stream, original PCM coder AES2 = source and channel unspecified AES3 = sample rate unspecified by default, ALSA uses AES3=0x02 which force the sampling rate to 48kHz. This break 44.1kHz passthrough with some audio cards. On the other hand, with some cards, you need to set 48kHz sample rate to get 44.1kHz passthrough. As the later case is obviously a bug, we do the right thing and set it as it should by default. For people finding that they no longer get multi-channel AC3/DTS audio, they need to go into the Advanced Option and check the SPDIF 48k override option -Up to now, if the user had overriden the passthrough device, we assumed he knew what he was doing and it would disable all consistency tests. We now handle errors should the passthrough device not be valid. In the settings screen, an error message will now be shown. We also now handle two different AudioOutputSettings type one for PCM output, the other for passthrough. Previously capabilities would only be checked on the main audio device. -Fix some segfault should the upmixer failed to be initialised properly. Fix timestretch. -Mythmusic seems to happily supply audio frames to AudioOutput even when audio initialisation fail. As some fields weren't initialised, this could result with some division by zero error -Audio framework: Main function member will now return an error if called without audio framework properly initialised -Add an OutputSettings(bool digital) method in AudioOutputBase, get rid of alternation in Reconfigure() -Check for FORMAT_S16 support for passthru support, use canFeature instead of canAC3 / canLPCM in AO -Rewrite support for the various DTS streams. Can now properly distinguish between the various DTS types: - DTS Core - DTS-ES - DTS 96/24 - DTS-HD High-Res - DTS-HD MA Note that if not using-passthrough, only the DTS Core stream can be decoded -Change in the audio stream can now be properly monitored such as changing DTS audio type. -Move SPDIF/IEC958 encapsulation within the audio class so avfd doesn't depends directly on any of the audio code. -Fixes timestamp estimation when timestamps are missing or frames are dropped
- Loading branch information...
Showing with 1,066 additions and 700 deletions.
- +2 −5 mythplugins/mythmusic/mythmusic/musicplayer.cpp
- +7 −4 mythtv/libs/libmyth/audio/audiooutput.h
- +42 −26 mythtv/libs/libmyth/audio/audiooutputalsa.cpp
- +1 −2 mythtv/libs/libmyth/audio/audiooutputalsa.h
- +288 −117 mythtv/libs/libmyth/audio/audiooutputbase.cpp
- +44 −15 mythtv/libs/libmyth/audio/audiooutputbase.h
- +4 −3 mythtv/libs/libmyth/audio/audiooutputdigitalencoder.cpp
- +9 −7 mythtv/libs/libmyth/audio/audiooutputdx.cpp
- +1 −1 mythtv/libs/libmyth/audio/audiooutputdx.h
- +105 −33 mythtv/libs/libmyth/audio/audiooutputsettings.cpp
- +79 −23 mythtv/libs/libmyth/audio/audiooutputsettings.h
- +2 −2 mythtv/libs/libmyth/audio/audiooutpututil.cpp
- +2 −2 mythtv/libs/libmyth/audio/audiooutpututil.h
- +7 −1 mythtv/libs/libmyth/audio/audiosettings.cpp
- +14 −1 mythtv/libs/libmyth/audio/audiosettings.h
- +35 −27 mythtv/libs/libmyth/audio/spdifencoder.cpp
- +6 −3 mythtv/libs/libmyth/audio/spdifencoder.h
- +161 −146 mythtv/libs/libmythtv/audioplayer.cpp
- +16 −10 mythtv/libs/libmythtv/audioplayer.h
- +83 −189 mythtv/libs/libmythtv/avformatdecoder.cpp
- +17 −14 mythtv/libs/libmythtv/avformatdecoder.h
- +7 −6 mythtv/libs/libmythtv/mythplayer.cpp
- +115 −54 mythtv/programs/mythfrontend/audiogeneralsettings.cpp
- +4 −1 mythtv/programs/mythfrontend/audiogeneralsettings.h
- +15 −8 mythtv/programs/mythtranscode/transcode.cpp
Oops, something went wrong.