diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | XBMC.xcodeproj/project.pbxproj | 38 | ||||
-rw-r--r-- | configure.in | 73 | ||||
-rw-r--r-- | lib/DllDCACodec.h | 126 | ||||
-rw-r--r-- | lib/Makefile.in | 28 | ||||
-rw-r--r-- | project/VS2010Express/XBMC for Windows.sln | 2 | ||||
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj | 6 | ||||
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj.filters | 18 | ||||
-rw-r--r-- | xbmc/DllPaths_generated.h.in | 1 | ||||
-rw-r--r-- | xbmc/DllPaths_win32.h | 1 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.cpp | 316 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.h | 79 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Audio/DllLibDts.h | 121 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile.in | 1 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 16 | ||||
-rw-r--r-- | xbmc/cores/paplayer/CodecFactory.cpp | 36 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCDDACodec.cpp | 62 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCDDACodec.h | 37 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCodec.cpp | 556 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCodec.h | 90 | ||||
-rw-r--r-- | xbmc/cores/paplayer/Makefile.in | 2 |
21 files changed, 4 insertions, 1606 deletions
diff --git a/.gitignore b/.gitignore index 9f3260795a..b64ee6b276 100644 --- a/.gitignore +++ b/.gitignore @@ -356,7 +356,6 @@ config.log /system/players/paplayer/libsidplay2.dll /system/players/paplayer/adpcm.dll /system/players/dvdplayer/libmad.dll -/system/players/dvdplayer/libdts.dll # /system/players/dsplayer /system/players/dsplayer/libsubs.dll diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj index 9bdd335707..05cf6b563b 100644 --- a/XBMC.xcodeproj/project.pbxproj +++ b/XBMC.xcodeproj/project.pbxproj @@ -622,7 +622,6 @@ E38E1F790D25F9FD00618676 /* DVDAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E14FC0D25F9F900618676 /* DVDAudio.cpp */; }; E38E1F7A0D25F9FD00618676 /* DVDClock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E14FE0D25F9F900618676 /* DVDClock.cpp */; }; E38E1F7B0D25F9FD00618676 /* DVDAudioCodecFFmpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15070D25F9F900618676 /* DVDAudioCodecFFmpeg.cpp */; }; - E38E1F7D0D25F9FD00618676 /* DVDAudioCodecLibDts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150B0D25F9F900618676 /* DVDAudioCodecLibDts.cpp */; }; E38E1F7E0D25F9FD00618676 /* DVDAudioCodecLibFaad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150D0D25F9F900618676 /* DVDAudioCodecLibFaad.cpp */; }; E38E1F7F0D25F9FD00618676 /* DVDAudioCodecLibMad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150F0D25F9F900618676 /* DVDAudioCodecLibMad.cpp */; }; E38E1F800D25F9FD00618676 /* DVDAudioCodecLPcm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15110D25F9F900618676 /* DVDAudioCodecLPcm.cpp */; }; @@ -1214,7 +1213,6 @@ F5A1C8E70F6B06CF00A96ABD /* DVDAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E14FC0D25F9F900618676 /* DVDAudio.cpp */; }; F5A1C8E80F6B06CF00A96ABD /* DVDClock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E14FE0D25F9F900618676 /* DVDClock.cpp */; }; F5A1C8E90F6B06CF00A96ABD /* DVDAudioCodecFFmpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15070D25F9F900618676 /* DVDAudioCodecFFmpeg.cpp */; }; - F5A1C8EB0F6B06CF00A96ABD /* DVDAudioCodecLibDts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150B0D25F9F900618676 /* DVDAudioCodecLibDts.cpp */; }; F5A1C8EC0F6B06CF00A96ABD /* DVDAudioCodecLibFaad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150D0D25F9F900618676 /* DVDAudioCodecLibFaad.cpp */; }; F5A1C8ED0F6B06CF00A96ABD /* DVDAudioCodecLibMad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E150F0D25F9F900618676 /* DVDAudioCodecLibMad.cpp */; }; F5A1C8EE0F6B06CF00A96ABD /* DVDAudioCodecLPcm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15110D25F9F900618676 /* DVDAudioCodecLPcm.cpp */; }; @@ -1716,8 +1714,6 @@ F5A1CB8F0F6B06CF00A96ABD /* SpecialProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2D6AE20F35453E00DD2E85 /* SpecialProtocol.cpp */; }; F5A1CB900F6B06CF00A96ABD /* GUIWindowKaraokeLyrics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AD1EA70F488A1A0065EB5D /* GUIWindowKaraokeLyrics.cpp */; }; F5A1CB910F6B06CF00A96ABD /* karaokewindowbackground.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56A084A0F4A18FB003F9F87 /* karaokewindowbackground.cpp */; }; - F5A1CB950F6B06CF00A96ABD /* DTSCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC52880F58504F003EEAA4 /* DTSCodec.cpp */; }; - F5A1CB960F6B06CF00A96ABD /* DTSCDDACodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC52900F58525B003EEAA4 /* DTSCDDACodec.cpp */; }; F5A1CB970F6B06CF00A96ABD /* DVDDemuxHTSP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55110440F5C3C0000955236 /* DVDDemuxHTSP.cpp */; }; F5A1CB980F6B06CF00A96ABD /* htsatomic.c in Sources */ = {isa = PBXBuildFile; fileRef = F551106D0F5C424700955236 /* htsatomic.c */; }; F5A1CB990F6B06CF00A96ABD /* htsbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = F551106F0F5C424700955236 /* htsbuf.c */; }; @@ -1790,8 +1786,6 @@ F5AACA690FB3DE2D00DBB77C /* GUIDialogSelect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AACA670FB3DE2D00DBB77C /* GUIDialogSelect.cpp */; }; F5AACA970FB3E2B800DBB77C /* GUIDialogSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AACA950FB3E2B800DBB77C /* GUIDialogSlider.cpp */; }; F5AACA980FB3E2B800DBB77C /* GUIDialogSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AACA950FB3E2B800DBB77C /* GUIDialogSlider.cpp */; }; - F5AC52890F58504F003EEAA4 /* DTSCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC52880F58504F003EEAA4 /* DTSCodec.cpp */; }; - F5AC52910F58525B003EEAA4 /* DTSCDDACodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC52900F58525B003EEAA4 /* DTSCDDACodec.cpp */; }; F5AD1EA80F488A1A0065EB5D /* GUIWindowKaraokeLyrics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AD1EA70F488A1A0065EB5D /* GUIWindowKaraokeLyrics.cpp */; }; F5BDB80C120202F400F0B710 /* DVDSubtitleTagSami.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5BDB80B120202F400F0B710 /* DVDSubtitleTagSami.cpp */; }; F5BDB80D120202F400F0B710 /* DVDSubtitleTagSami.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5BDB80B120202F400F0B710 /* DVDSubtitleTagSami.cpp */; }; @@ -2599,14 +2593,11 @@ E38E14FD0D25F9F900618676 /* DVDAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudio.h; sourceTree = "<group>"; }; E38E14FE0D25F9F900618676 /* DVDClock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDClock.cpp; sourceTree = "<group>"; }; E38E14FF0D25F9F900618676 /* DVDClock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDClock.h; sourceTree = "<group>"; }; - E38E15030D25F9F900618676 /* DllLibDts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibDts.h; sourceTree = "<group>"; }; E38E15040D25F9F900618676 /* DllLibFaad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibFaad.h; sourceTree = "<group>"; }; E38E15050D25F9F900618676 /* DllLibMad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibMad.h; sourceTree = "<group>"; }; E38E15060D25F9F900618676 /* DVDAudioCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodec.h; sourceTree = "<group>"; }; E38E15070D25F9F900618676 /* DVDAudioCodecFFmpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDAudioCodecFFmpeg.cpp; sourceTree = "<group>"; }; E38E15080D25F9F900618676 /* DVDAudioCodecFFmpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodecFFmpeg.h; sourceTree = "<group>"; }; - E38E150B0D25F9F900618676 /* DVDAudioCodecLibDts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDAudioCodecLibDts.cpp; sourceTree = "<group>"; }; - E38E150C0D25F9F900618676 /* DVDAudioCodecLibDts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodecLibDts.h; sourceTree = "<group>"; }; E38E150D0D25F9F900618676 /* DVDAudioCodecLibFaad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDAudioCodecLibFaad.cpp; sourceTree = "<group>"; }; E38E150E0D25F9F900618676 /* DVDAudioCodecLibFaad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodecLibFaad.h; sourceTree = "<group>"; }; E38E150F0D25F9F900618676 /* DVDAudioCodecLibMad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDAudioCodecLibMad.cpp; sourceTree = "<group>"; }; @@ -2617,7 +2608,6 @@ E38E15140D25F9F900618676 /* DVDAudioCodecPassthrough.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodecPassthrough.h; sourceTree = "<group>"; }; E38E15150D25F9F900618676 /* DVDAudioCodecPcm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDAudioCodecPcm.cpp; sourceTree = "<group>"; }; E38E15160D25F9F900618676 /* DVDAudioCodecPcm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDAudioCodecPcm.h; sourceTree = "<group>"; }; - E38E151A0D25F9F900618676 /* dts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dts.h; sourceTree = "<group>"; }; E38E151E0D25F9F900618676 /* mad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mad.h; sourceTree = "<group>"; }; E38E15210D25F9F900618676 /* DVDCodecs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDCodecs.h; sourceTree = "<group>"; }; E38E15220D25F9F900618676 /* DVDCodecUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDCodecUtils.cpp; sourceTree = "<group>"; }; @@ -2730,7 +2720,6 @@ E38E15E80D25F9FA00618676 /* CodecFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodecFactory.cpp; sourceTree = "<group>"; }; E38E15E90D25F9FA00618676 /* CodecFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodecFactory.h; sourceTree = "<group>"; }; E38E15EF0D25F9FA00618676 /* DllAdpcm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllAdpcm.h; sourceTree = "<group>"; }; - E38E15F20D25F9FA00618676 /* DllDCACodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllDCACodec.h; sourceTree = "<group>"; }; E38E15F50D25F9FA00618676 /* DllLibFlac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibFlac.h; sourceTree = "<group>"; }; E38E15FA0D25F9FA00618676 /* DllNosefart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllNosefart.h; sourceTree = "<group>"; }; E38E15FB0D25F9FA00618676 /* DllSidplay2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllSidplay2.h; sourceTree = "<group>"; }; @@ -3757,10 +3746,6 @@ F5AACA670FB3DE2D00DBB77C /* GUIDialogSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogSelect.cpp; sourceTree = "<group>"; }; F5AACA950FB3E2B800DBB77C /* GUIDialogSlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogSlider.cpp; sourceTree = "<group>"; }; F5AACA960FB3E2B800DBB77C /* GUIDialogSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogSlider.h; sourceTree = "<group>"; }; - F5AC52870F58504F003EEAA4 /* DTSCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DTSCodec.h; path = xbmc/cores/paplayer/DTSCodec.h; sourceTree = SOURCE_ROOT; }; - F5AC52880F58504F003EEAA4 /* DTSCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DTSCodec.cpp; path = xbmc/cores/paplayer/DTSCodec.cpp; sourceTree = SOURCE_ROOT; }; - F5AC528F0F58525B003EEAA4 /* DTSCDDACodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DTSCDDACodec.h; path = xbmc/cores/paplayer/DTSCDDACodec.h; sourceTree = SOURCE_ROOT; }; - F5AC52900F58525B003EEAA4 /* DTSCDDACodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DTSCDDACodec.cpp; path = xbmc/cores/paplayer/DTSCDDACodec.cpp; sourceTree = SOURCE_ROOT; }; F5ACB5370FC3DF3D00AAA056 /* eprintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eprintf.cpp; sourceTree = "<group>"; }; F5AD1EA60F488A1A0065EB5D /* GUIWindowKaraokeLyrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowKaraokeLyrics.h; sourceTree = "<group>"; }; F5AD1EA70F488A1A0065EB5D /* GUIWindowKaraokeLyrics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIWindowKaraokeLyrics.cpp; sourceTree = "<group>"; }; @@ -5267,14 +5252,11 @@ E38E15010D25F9F900618676 /* Audio */ = { isa = PBXGroup; children = ( - E38E15030D25F9F900618676 /* DllLibDts.h */, E38E15040D25F9F900618676 /* DllLibFaad.h */, E38E15050D25F9F900618676 /* DllLibMad.h */, E38E15060D25F9F900618676 /* DVDAudioCodec.h */, E38E15070D25F9F900618676 /* DVDAudioCodecFFmpeg.cpp */, E38E15080D25F9F900618676 /* DVDAudioCodecFFmpeg.h */, - E38E150B0D25F9F900618676 /* DVDAudioCodecLibDts.cpp */, - E38E150C0D25F9F900618676 /* DVDAudioCodecLibDts.h */, E38E150D0D25F9F900618676 /* DVDAudioCodecLibFaad.cpp */, E38E150E0D25F9F900618676 /* DVDAudioCodecLibFaad.h */, E38E150F0D25F9F900618676 /* DVDAudioCodecLibMad.cpp */, @@ -5288,21 +5270,12 @@ E38E15150D25F9F900618676 /* DVDAudioCodecPcm.cpp */, E38E15160D25F9F900618676 /* DVDAudioCodecPcm.h */, F5F24E801123242B009126C6 /* Encoders */, - E38E15190D25F9F900618676 /* libdts */, E38E151B0D25F9F900618676 /* libfaad */, E38E151D0D25F9F900618676 /* libmad */, ); path = Audio; sourceTree = "<group>"; }; - E38E15190D25F9F900618676 /* libdts */ = { - isa = PBXGroup; - children = ( - E38E151A0D25F9F900618676 /* dts.h */, - ); - path = libdts; - sourceTree = "<group>"; - }; E38E151B0D25F9F900618676 /* libfaad */ = { isa = PBXGroup; children = ( @@ -5503,10 +5476,6 @@ E38E15E70D25F9FA00618676 /* CDDAcodec.h */, E38E15E80D25F9FA00618676 /* CodecFactory.cpp */, E38E15E90D25F9FA00618676 /* CodecFactory.h */, - F5AC528F0F58525B003EEAA4 /* DTSCDDACodec.h */, - F5AC52900F58525B003EEAA4 /* DTSCDDACodec.cpp */, - F5AC52870F58504F003EEAA4 /* DTSCodec.h */, - F5AC52880F58504F003EEAA4 /* DTSCodec.cpp */, F5F8E1D90E427E8000A8E96F /* VGMCodec.cpp */, F5F8E1D80E427E8000A8E96F /* VGMCodec.h */, E38E160A0D25F9FA00618676 /* FLACcodec.cpp */, @@ -5896,7 +5865,6 @@ children = ( E38E15EF0D25F9FA00618676 /* DllAdpcm.h */, 88ACB01E0DCF409E0083CFDF /* DllASAP.h */, - E38E15F20D25F9FA00618676 /* DllDCACodec.h */, E38E15F50D25F9FA00618676 /* DllLibFlac.h */, E38E15FA0D25F9FA00618676 /* DllNosefart.h */, E38E15FB0D25F9FA00618676 /* DllSidplay2.h */, @@ -7309,7 +7277,6 @@ E38E1F790D25F9FD00618676 /* DVDAudio.cpp in Sources */, E38E1F7A0D25F9FD00618676 /* DVDClock.cpp in Sources */, E38E1F7B0D25F9FD00618676 /* DVDAudioCodecFFmpeg.cpp in Sources */, - E38E1F7D0D25F9FD00618676 /* DVDAudioCodecLibDts.cpp in Sources */, E38E1F7E0D25F9FD00618676 /* DVDAudioCodecLibFaad.cpp in Sources */, E38E1F7F0D25F9FD00618676 /* DVDAudioCodecLibMad.cpp in Sources */, E38E1F800D25F9FD00618676 /* DVDAudioCodecLPcm.cpp in Sources */, @@ -7811,8 +7778,6 @@ 7C2D6AE40F35453E00DD2E85 /* SpecialProtocol.cpp in Sources */, F5AD1EA80F488A1A0065EB5D /* GUIWindowKaraokeLyrics.cpp in Sources */, F56A084B0F4A18FB003F9F87 /* karaokewindowbackground.cpp in Sources */, - F5AC52890F58504F003EEAA4 /* DTSCodec.cpp in Sources */, - F5AC52910F58525B003EEAA4 /* DTSCDDACodec.cpp in Sources */, F55110450F5C3C0100955236 /* DVDDemuxHTSP.cpp in Sources */, F551107C0F5C424700955236 /* htsatomic.c in Sources */, F551107D0F5C424700955236 /* htsbuf.c in Sources */, @@ -8185,7 +8150,6 @@ F5A1C8E70F6B06CF00A96ABD /* DVDAudio.cpp in Sources */, F5A1C8E80F6B06CF00A96ABD /* DVDClock.cpp in Sources */, F5A1C8E90F6B06CF00A96ABD /* DVDAudioCodecFFmpeg.cpp in Sources */, - F5A1C8EB0F6B06CF00A96ABD /* DVDAudioCodecLibDts.cpp in Sources */, F5A1C8EC0F6B06CF00A96ABD /* DVDAudioCodecLibFaad.cpp in Sources */, F5A1C8ED0F6B06CF00A96ABD /* DVDAudioCodecLibMad.cpp in Sources */, F5A1C8EE0F6B06CF00A96ABD /* DVDAudioCodecLPcm.cpp in Sources */, @@ -8687,8 +8651,6 @@ F5A1CB8F0F6B06CF00A96ABD /* SpecialProtocol.cpp in Sources */, F5A1CB900F6B06CF00A96ABD /* GUIWindowKaraokeLyrics.cpp in Sources */, F5A1CB910F6B06CF00A96ABD /* karaokewindowbackground.cpp in Sources */, - F5A1CB950F6B06CF00A96ABD /* DTSCodec.cpp in Sources */, - F5A1CB960F6B06CF00A96ABD /* DTSCDDACodec.cpp in Sources */, F5A1CB970F6B06CF00A96ABD /* DVDDemuxHTSP.cpp in Sources */, F5A1CB980F6B06CF00A96ABD /* htsatomic.c in Sources */, F5A1CB990F6B06CF00A96ABD /* htsbuf.c in Sources */, diff --git a/configure.in b/configure.in index 94f37d01eb..1aff27f16a 100644 --- a/configure.in +++ b/configure.in @@ -94,8 +94,6 @@ external_libraries_enabled="== Use of all supported external libraries enabled. external_libraries_disabled="== Use of all supported external libraries disabled. ==" external_ffmpeg_enabled="== Use of external ffmpeg enabled. ==" external_ffmpeg_disabled="== Use of external ffmpeg disabled. ==" -external_libdts_enabled="== Use of external libdts enabled. ==" -external_libdts_disabled="== Use of external libdts disabled. ==" external_python_enabled="== Use of external python enabled. ==" external_python_disabled="== Use of external python disabled. ==" ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. ==" @@ -272,12 +270,6 @@ AC_ARG_ENABLE([optical-drive], [use_optical_drive=$enableval], [use_optical_drive=yes]) -AC_ARG_ENABLE([libdts], - [AS_HELP_STRING([--enable-libdts], - [enable deprecated libdts support])], - [use_libdts=$enableval], - [use_libdts=no]) - AC_ARG_ENABLE([libbluray], [AS_HELP_STRING([--enable-libbluray], [enable libbluray support])], @@ -304,12 +296,6 @@ AC_ARG_ENABLE([external-ffmpeg], [use_external_ffmpeg=$enableval], [use_external_ffmpeg=$use_external_libraries]) -AC_ARG_ENABLE([external-libdts], - [AS_HELP_STRING([--enable-external-libdts], - [enable use of external libdts library (default is no) 'Linux only'])], - [use_external_libdts=$enableval], - [use_external_libdts=$use_external_libraries]) - AC_ARG_ENABLE([external-python], [AS_HELP_STRING([--enable-external-python], [enable use of external python library (default is no) 'Linux only'])], @@ -876,20 +862,6 @@ else AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1], [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.]) fi -# External libdts if deprecated dts support enabled -if test "$use_libdts" = "yes" && "$use_external_libdts" = "yes"; then - AC_CHECK_LIB([dts], [main],, AC_MSG_ERROR($missing_library)) - - AC_MSG_NOTICE($external_libdts_enabled) - USE_EXTERNAL_LIBDTS=1 - AC_DEFINE([USE_EXTERNAL_LIBDTS], [1], [Whether to use external libdts library.]) - USE_INTERNAL_LIBDTS=0 - SKIP_CONFIG_LIBDTS=1 -else - AC_MSG_NOTICE($external_libdts_disabled) - USE_EXTERNAL_LIBDTS=0 -fi - # External Python if test "$use_external_python" = "yes"; then AC_CHECK_LIB([python2.6], [main], @@ -1322,33 +1294,12 @@ else final_message="$final_message\n Optical drive:\tNo" fi -if test "$use_libdts" = "yes"; then - USE_LIBDTS_DECODER=1 - AC_DEFINE([USE_LIBDTS_DECODER], [1], [Define to 1 to enable deprecated libdts support]) - if ! test "$USE_EXTERNAL_LIBDTS" = "1"; then - USE_INTERNAL_LIBDTS=1 - SKIP_CONFIG_LIBDTS=0 - fi - final_message="$final_message\n Deprecated libdts:\tYes" -else - USE_INTERNAL_LIBDTS=0 - SKIP_CONFIG_LIBDTS=1 - final_message="$final_message\n Deprecated libdts:\tNo" -fi - ### External libraries messages if test "$use_external_ffmpeg" = "yes"; then final_message="$final_message\n External FFmpeg:\tYes" else final_message="$final_message\n External FFmpeg:\tNo" fi -if test "$use_libdts" = "yes"; then - if test "$use_external_libdts" = "yes"; then - final_message="$final_message\n External libdts:\tYes" - else - final_message="$final_message\n External libdts:\tNo" - fi -fi if test "$use_external_python" = "yes"; then final_message="$final_message\n External Python:\tYes" else @@ -1443,8 +1394,6 @@ AC_SUBST(BUILD_DVDCSS) AC_SUBST(BUILD_GOOM) AC_SUBST(USE_EXTERNAL_FFMPEG) AC_SUBST(USE_EXTERNAL_LIBASS) -AC_SUBST(USE_EXTERNAL_LIBDTS) -AC_SUBST(USE_INTERNAL_LIBDTS) AC_SUBST(USE_EXTERNAL_LIBMPEG2) AC_SUBST(USE_EXTERNAL_LIBWAVPACK) AC_SUBST(USE_EXTERNAL_PYTHON) @@ -1649,28 +1598,6 @@ XB_CONFIG_MODULE([lib/ffmpeg], [ fi ], [$USE_EXTERNAL_FFMPEG]) -XB_CONFIG_MODULE([lib/libdts], [ - if test "$host_vendor" = "apple" ; then - CFLAGS="$CFLAGS -fno-common" - LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ - ./configure \ - --disable-oss \ - --disable-solaris-audio \ - --disable-al-audio \ - --disable-win - else - ./configure \ - --host=$host_alias \ - --build=$build_alias \ - --target=$target_alias \ - --disable-oss \ - --disable-solaris-audio \ - --disable-al-audio \ - --disable-win \ - CFLAGS="$CFLAGS" - fi -], [$SKIP_CONFIG_LIBDTS]) - XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [ if test "$host_vendor" = "apple" ; then ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ diff --git a/lib/DllDCACodec.h b/lib/DllDCACodec.h deleted file mode 100644 index 15927613c5..0000000000 --- a/lib/DllDCACodec.h +++ /dev/null @@ -1,126 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#if (defined HAVE_CONFIG_H) && (!defined WIN32) - #include "config.h" -#endif -extern "C" { -#if (defined USE_EXTERNAL_LIBDTS) - #include <dts.h> -#else - #include "cores/dvdplayer/DVDCodecs/Audio/libdts/dts.h" -#endif -} -#include "DynamicDll.h" -#include "utils/log.h" - -#ifdef USE_LIBDTS_DECODER -#ifndef _LINUX -typedef unsigned __int32 uint32_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int8 uint8_t; -typedef __int32 int32_t; -typedef __int16 int16_t; -#endif - -#ifdef LIBDTS_DOUBLE -typedef float convert_t; -#else -typedef sample_t convert_t; -#endif - - -class DllDCACodecInterface -{ -public: - virtual ~DllDCACodecInterface() {} - virtual dts_state_t * dts_init (uint32_t mm_accel)=0; - virtual int dts_syncinfo (dts_state_t *state, uint8_t * buf, int * flags, int * sample_rate, int * bit_rate, int *frame_length)=0; - virtual int dts_frame (dts_state_t * state, uint8_t * buf, int * flags, level_t * level, sample_t bias)=0; - virtual void dts_dynrng (dts_state_t * state, level_t (* call) (level_t, void *), void * data)=0; - virtual int dts_blocks_num (dts_state_t * state)=0; - virtual int dts_block (dts_state_t * state)=0; - virtual sample_t * dts_samples (dts_state_t * state)=0; - virtual void dts_free (dts_state_t * state)=0; -}; - -#if (defined USE_EXTERNAL_LIBDTS) - -class DllDCACodec : public DllDynamic, DllDCACodecInterface -{ -public: - virtual ~DllDCACodec() {} - virtual dts_state_t * dts_init (uint32_t mm_accel) - { return ::dts_init (mm_accel); } - virtual int dts_syncinfo (dts_state_t *state, uint8_t * buf, int * flags, int * sample_rate, int * bit_rate, int *frame_length) - { return ::dts_syncinfo (state, buf, flags, sample_rate, bit_rate, frame_length); } - virtual int dts_frame (dts_state_t * state, uint8_t * buf, int * flags, level_t * level, sample_t bias) - { return ::dts_frame (state, buf, flags, level, bias); } - virtual void dts_dynrng (dts_state_t * state, level_t (* call) (level_t, void *), void * data) - { return ::dts_dynrng (state, call, data); } - virtual int dts_blocks_num (dts_state_t * state) - { return ::dts_blocks_num (state); } - virtual int dts_block (dts_state_t * state) - { return ::dts_block (state); } - virtual sample_t * dts_samples (dts_state_t * state) - { return ::dts_samples (state); } - virtual void dts_free (dts_state_t * state) - { return ::dts_free (state); } - - // DLL faking. - virtual bool ResolveExports() { return true; } - virtual bool Load() { - CLog::Log(LOGDEBUG, "DllDCACodec: Using libdts system library"); - return true; - } - virtual void Unload() {} -}; - -#else - -class DllDCACodec : public DllDynamic, DllDCACodecInterface -{ - DECLARE_DLL_WRAPPER(DllDCACodec, DLL_PATH_LIBDTS ) - DEFINE_METHOD1(dts_state_t *, dts_init, (uint32_t p1)) - DEFINE_METHOD6(int, dts_syncinfo, (dts_state_t *p1, uint8_t * p2, int * p3, int * p4, int * p5, int *p6)) - DEFINE_METHOD5(int, dts_frame, (dts_state_t * p1, uint8_t * p2, int * p3, level_t * p4, sample_t p5)) - DEFINE_METHOD3(void, dts_dynrng, (dts_state_t * p1, level_t (* p2) (level_t, void *), void * p3)) - DEFINE_METHOD1(int, dts_blocks_num ,(dts_state_t * p1)) - DEFINE_METHOD1(int, dts_block, (dts_state_t * p1)) - DEFINE_METHOD1(sample_t *, dts_samples, (dts_state_t * p1)) - DEFINE_METHOD1(void, dts_free, (dts_state_t * p1)) - BEGIN_METHOD_RESOLVE() - RESOLVE_METHOD(dts_init) - RESOLVE_METHOD(dts_syncinfo) - RESOLVE_METHOD(dts_frame ) - RESOLVE_METHOD(dts_dynrng) - RESOLVE_METHOD(dts_blocks_num) - RESOLVE_METHOD(dts_block) - RESOLVE_METHOD(dts_samples) - RESOLVE_METHOD(dts_free) - END_METHOD_RESOLVE() -}; - -#endif /* (defined USE_EXTERNAL_LIBDTS) */ - -#endif /* USE_LIBDTS_DECODER */ diff --git a/lib/Makefile.in b/lib/Makefile.in index 3cb090356c..970dc5265e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -10,9 +10,6 @@ DIRS= ifneq (@USE_EXTERNAL_FFMPEG@,1) DIRS+=ffmpeg endif -ifeq (@USE_INTERNAL_LIBDTS@,1) - DIRS+=libdts -endif LIBS= ifneq (@USE_EXTERNAL_FFMPEG@,1) @@ -23,9 +20,6 @@ ifneq (@USE_EXTERNAL_FFMPEG@,1) postproc-51-$(ARCH).so \ swscale-0.6.1-$(ARCH).so endif -ifeq (@USE_INTERNAL_LIBDTS@,1) - LIBS+=libdts-$(ARCH).so -endif ifeq ($(findstring osx,$(ARCH)),osx) DIRS+=libmad @@ -101,14 +95,6 @@ ffmpeg/libpostproc/libpostproc.dylib : ffmpeg; ffmpeg: $(MAKE) -C $@ -$(SYSDIR)/libdts-$(ARCH).so: $(WRAPPER_OSX) libdts/libdts/libdts.a - $(CC) -bundle -flat_namespace -undefined suppress \ - -o $@ libdts/libdts/bitstream.o \ - libdts/libdts/downmix.o \ - libdts/libdts/parse.o - $(WRAPPER_OSX) $@;mv output.so $@ - chmod +x $@ - $(SYSDIR)/libfaad-$(ARCH).so: $(WRAPPER_OSX) libfaad2/libfaad/libfaad.la ld -bundle -flat_namespace -undefined suppress -o $@ \ libfaad2/libfaad/*.o $(BUNDLE1_O) @@ -119,10 +105,6 @@ $(SYSDIR)/libmad-$(ARCH).so: $(WRAPPER_OSX) libmad/libmad.la libmad/.libs/*.o $(BUNDLE1_O) $(WRAPPER_OSX) $@;mv output.so $@ -libdts/libdts/libdts.a : libdts; -libdts: - $(MAKE) -C $@ - libfaad2/libfaad/libfaad.la: libfaad2; libfaad2: $(MAKE) -C $@ @@ -167,16 +149,6 @@ ffmpeg/libpostproc/libpostproc.so : ffmpeg; ffmpeg: $(MAKE) -C $@ -$(SYSDIR)/libdts-$(ARCH).so: $(WRAPPER) libdts/libdts/libdts.a - $(CC) -o $@ $(LDFLAGS) --soname,$@ \ - libdts/libdts/bitstream.o \ - libdts/libdts/downmix.o libdts/libdts/parse.o \ - `cat $(WRAPPER:.o=.def)` $(WRAPPER) - -libdts/libdts/libdts.a : libdts; -libdts: - $(MAKE) -C $@ - endif clean: diff --git a/project/VS2010Express/XBMC for Windows.sln b/project/VS2010Express/XBMC for Windows.sln index 89814e742f..477359434f 100644 --- a/project/VS2010Express/XBMC for Windows.sln +++ b/project/VS2010Express/XBMC for Windows.sln @@ -82,8 +82,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libStSoundLibrary_dll", ".. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\lib\freetype\builds\win32\vs2010\freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdts_dll", "..\..\lib\libdts\vc++\libdts.vcxproj", "{F93133AB-EB51-4955-AEDF-639632891042}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis_static", "..\..\lib\win32\vorbisfile\libvorbis\win32\VS2010\libvorbis\libvorbis.vcxproj", "{3A214E06-B95E-4D61-A291-1F8DF2EC10FD}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbisfile_dll", "..\..\lib\win32\vorbisfile\libvorbis\win32\VS2010\libvorbisfile\libvorbisfile.vcxproj", "{CEBDE98B-A6AA-46E6-BC79-FAAF823DB9EC}" diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index 6584c3612e..38b9c3077f 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -823,8 +823,6 @@ <ClCompile Include="..\..\xbmc\cores\paplayer\AudioDecoder.cpp" /> <ClCompile Include="..\..\xbmc\cores\paplayer\CDDAcodec.cpp" /> <ClCompile Include="..\..\xbmc\cores\paplayer\CodecFactory.cpp" /> - <ClCompile Include="..\..\xbmc\cores\paplayer\DTSCDDACodec.cpp" /> - <ClCompile Include="..\..\xbmc\cores\paplayer\DTSCodec.cpp" /> <ClCompile Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.cpp" /> <ClCompile Include="..\..\xbmc\cores\paplayer\FLACcodec.cpp" /> <ClCompile Include="..\..\xbmc\cores\paplayer\ModplugCodec.cpp" /> @@ -1602,7 +1600,6 @@ <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\DVDCodecs.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\DVDCodecUtils.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\DVDFactoryCodec.h" /> - <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DllLibDts.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DllLibFaad.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DllLibMad.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DVDAudioCodec.h" /> @@ -1689,7 +1686,6 @@ <ClInclude Include="..\..\xbmc\cores\paplayer\CodecFactory.h" /> <ClInclude Include="..\..\lib\DllAdpcm.h" /> <ClInclude Include="..\..\lib\DllASAP.h" /> - <ClInclude Include="..\..\lib\DllDCACodec.h" /> <ClInclude Include="..\..\lib\DllLibFlac.h" /> <ClInclude Include="..\..\lib\DllNosefart.h" /> <ClInclude Include="..\..\lib\DllSidplay2.h" /> @@ -1698,8 +1694,6 @@ <ClInclude Include="..\..\lib\DllVorbisfile.h" /> <ClInclude Include="..\..\lib\DllWAVPack.h" /> <ClInclude Include="..\..\lib\DllWMA.h" /> - <ClInclude Include="..\..\xbmc\cores\paplayer\DTSCDDACodec.h" /> - <ClInclude Include="..\..\xbmc\cores\paplayer\DTSCodec.h" /> <ClInclude Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.h" /> <ClInclude Include="..\..\xbmc\cores\paplayer\FLACcodec.h" /> <ClInclude Include="..\..\xbmc\cores\paplayer\ICodec.h" /> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index 71f7be7dce..4446de48a1 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -483,12 +483,6 @@ <ClCompile Include="..\..\xbmc\cores\paplayer\CodecFactory.cpp"> <Filter>cores\paplayer</Filter> </ClCompile> - <ClCompile Include="..\..\xbmc\cores\paplayer\DTSCDDACodec.cpp"> - <Filter>cores\paplayer</Filter> - </ClCompile> - <ClCompile Include="..\..\xbmc\cores\paplayer\DTSCodec.cpp"> - <Filter>cores\paplayer</Filter> - </ClCompile> <ClCompile Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.cpp"> <Filter>cores\paplayer</Filter> </ClCompile> @@ -2563,9 +2557,6 @@ <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\DVDFactoryCodec.h"> <Filter>cores\dvdplayer\DVDCodecs</Filter> </ClInclude> - <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DllLibDts.h"> - <Filter>cores\dvdplayer\DVDCodecs\Audio</Filter> - </ClInclude> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DllLibFaad.h"> <Filter>cores\dvdplayer\DVDCodecs\Audio</Filter> </ClInclude> @@ -2818,9 +2809,6 @@ <ClInclude Include="..\..\lib\DllASAP.h"> <Filter>cores\paplayer</Filter> </ClInclude> - <ClInclude Include="..\..\lib\DllDCACodec.h"> - <Filter>cores\paplayer</Filter> - </ClInclude> <ClInclude Include="..\..\lib\DllLibFlac.h"> <Filter>cores\paplayer</Filter> </ClInclude> @@ -2845,12 +2833,6 @@ <ClInclude Include="..\..\lib\DllWMA.h"> <Filter>cores\paplayer</Filter> </ClInclude> - <ClInclude Include="..\..\xbmc\cores\paplayer\DTSCDDACodec.h"> - <Filter>cores\paplayer</Filter> - </ClInclude> - <ClInclude Include="..\..\xbmc\cores\paplayer\DTSCodec.h"> - <Filter>cores\paplayer</Filter> - </ClInclude> <ClInclude Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.h"> <Filter>cores\paplayer</Filter> </ClInclude> diff --git a/xbmc/DllPaths_generated.h.in b/xbmc/DllPaths_generated.h.in index b09f61f061..3794c1c4c2 100644 --- a/xbmc/DllPaths_generated.h.in +++ b/xbmc/DllPaths_generated.h.in @@ -75,7 +75,6 @@ /* dvdplayer */ #define DLL_PATH_LIBASS "special://xbmcbin/system/players/dvdplayer/libass-@ARCH@.so" -#define DLL_PATH_LIBDTS "special://xbmcbin/system/players/dvdplayer/libdts-@ARCH@.so" #define DLL_PATH_LIBMPEG2 "special://xbmcbin/system/players/dvdplayer/libmpeg2-@ARCH@.so" #define DLL_PATH_LIBDVDNAV "special://xbmcbin/system/players/dvdplayer/libdvdnav-@ARCH@.so" #if defined(_LINUX) && !defined(__APPLE__) diff --git a/xbmc/DllPaths_win32.h b/xbmc/DllPaths_win32.h index ec9b42b879..0b174b26a5 100644 --- a/xbmc/DllPaths_win32.h +++ b/xbmc/DllPaths_win32.h @@ -54,7 +54,6 @@ /* dvdplayer */ #define DLL_PATH_LIBASS "special://xbmcbin/system/players/dvdplayer/libass.dll" -#define DLL_PATH_LIBDTS "special://xbmcbin/system/players/dvdplayer/libdts.dll" #define DLL_PATH_LIBFAAD "special://xbmcbin/system/players/dvdplayer/libfaad.dll" #define DLL_PATH_LIBMAD "special://xbmcbin/system/players/dvdplayer/libmad.dll" #define DLL_PATH_LIBMPEG2 "special://xbmcbin/system/players/dvdplayer/libmpeg2.dll" diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.cpp deleted file mode 100644 index 81ffd5b17f..0000000000 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "DVDAudioCodecLibDts.h" -#ifdef USE_LIBDTS_DECODER - -#include "AdvancedSettings.h" -#include "GUISettings.h" -#include "DVDStreamInfo.h" -#include "utils/log.h" - -#define HEADER_SIZE 14 - -static inline int16_t convert(int32_t i) -{ -#ifdef LIBDTS_FIXED - i >>= 15; -#else - i -= 0x43c00000; -#endif - return (i > 32767) ? 32767 : ((i < -32768) ? -32768 : i); -} - -/** - * \brief Function to convert the "planar" float format used by libdts - * into the interleaved int16 format used by us. - * \param in the input buffer containing the planar samples. - * \param out the output buffer where the interleaved result is stored. - * \param channels the total number of channels in the decoded data - */ -static int resample_int16(sample_t * in, int16_t *out, unsigned int channels) -{ - unsigned int i, ch; - int16_t *p = out; - for(i = 0; i < 256; ++i) - { - for(ch = 0; ch < channels; ++ch) - { - *p = convert( ((int32_t*)in)[i + (ch << 8)] ); - ++p; - } - } - return p - out; -} - -CDVDAudioCodecLibDts::CDVDAudioCodecLibDts() : CDVDAudioCodec() -{ - m_pState = NULL; - SetDefault(); -} - -CDVDAudioCodecLibDts::~CDVDAudioCodecLibDts() -{ - Dispose(); -} - -bool CDVDAudioCodecLibDts::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) -{ - if (!m_dll.Load()) - return false; - - SetDefault(); - - m_pState = m_dll.dts_init(0); - if (!m_pState) - { - Dispose(); - return false; - } - - m_fSamples = m_dll.dts_samples(m_pState); - - // Output will be decided once we query the stream. - m_iOutputChannels = 0; - - return true; -} - -void CDVDAudioCodecLibDts::Dispose() -{ - if (m_pState) m_dll.dts_free(m_pState); - m_pState = NULL; -} - -void CDVDAudioCodecLibDts::SetupChannels(int flags) -{ - /* These are channel mappings that libdts outputs */ - static enum PCMChannels channelMaps[14][6] = - { - /* Without LFE */ - {/* DTS_MONO */ PCM_FRONT_CENTER }, - {/* DTS_STEREO */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT }, - {/* DTS_3F */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT }, - {/* DTS_2F1R */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_BACK_CENTER }, - {/* DTS_3F1R */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_BACK_CENTER }, - {/* DTS_2F2R */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_SIDE_LEFT , PCM_SIDE_RIGHT }, - {/* DTS_3F2R */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_SIDE_LEFT , PCM_SIDE_RIGHT }, - /* With LFE */ - {/* DTS_MONO */ PCM_FRONT_CENTER, PCM_LOW_FREQUENCY }, - {/* DTS_STEREO */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_LOW_FREQUENCY }, - {/* DTS_3F */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_LOW_FREQUENCY }, - {/* DTS_2F1R */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_BACK_CENTER }, - {/* DTS_3F1R */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_BACK_CENTER, PCM_LOW_FREQUENCY }, - {/* DTS_2F2R */ PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_SIDE_LEFT , PCM_SIDE_RIGHT , PCM_LOW_FREQUENCY }, - {/* DTS_3F2R */ PCM_FRONT_CENTER, PCM_FRONT_LEFT , PCM_FRONT_RIGHT , PCM_SIDE_LEFT , PCM_SIDE_RIGHT , PCM_LOW_FREQUENCY}, - }; - - m_iSourceFlags = flags; - - // setup channel map - int channels = 0; - int chOffset = (flags & DTS_LFE) ? 7 : 0; - switch (m_iSourceFlags &~ DTS_LFE) - { - case DTS_MONO : m_pChannelMap = channelMaps[chOffset + 0]; channels = 1; break; - case DTS_CHANNEL: - case DTS_DOLBY : - case DTS_STEREO_SUMDIFF: - case DTS_STEREO_TOTAL: - case DTS_STEREO : m_pChannelMap = channelMaps[chOffset + 1]; channels = 2; break; - case DTS_3F : m_pChannelMap = channelMaps[chOffset + 2]; channels = 3; break; - case DTS_2F1R : m_pChannelMap = channelMaps[chOffset + 3]; channels = 3; break; - case DTS_3F1R : m_pChannelMap = channelMaps[chOffset + 4]; channels = 4; break; - case DTS_2F2R : m_pChannelMap = channelMaps[chOffset + 5]; channels = 4; break; - case DTS_3F2R : m_pChannelMap = channelMaps[chOffset + 6]; channels = 5; break; - default : m_pChannelMap = NULL; break; - } - - if(m_pChannelMap == NULL) - CLog::Log(LOGERROR, "CDVDAudioCodecLibDts::SetupChannels - Invalid channel mapping"); - - if(m_iSourceChannels > 0 && m_iSourceChannels != channels) - CLog::Log(LOGINFO, "%s - Number of channels changed in stream from %d to %d, data might be truncated", __FUNCTION__, m_iOutputChannels, channels); - - m_iSourceChannels = channels; - m_iOutputChannels = m_iSourceChannels; - m_iOutputFlags = m_iSourceFlags; - - /* adjust level should always be set, to keep samples in proper range */ - /* after any downmixing has been done */ - m_iOutputFlags |= DTS_ADJUST_LEVEL; -} - -int CDVDAudioCodecLibDts::ParseFrame(BYTE* data, int size, BYTE** frame, int* framesize) -{ - int flags, len, framelen; - BYTE* orig = data; - - *frame = NULL; - *framesize = 0; - - if(m_inputSize == 0 && size > HEADER_SIZE) - { - // try to sync directly in packet - m_iFrameSize = m_dll.dts_syncinfo(m_pState, data, &flags, &m_iSourceSampleRate, &m_iSourceBitrate, &framelen); - - if(m_iFrameSize > 0) - { - - if(!m_bFlagsInitialized || m_iSourceFlags != flags) - { - SetupChannels(flags); - m_bFlagsInitialized = true; - } - - if(size >= m_iFrameSize) - { - *frame = data; - *framesize = m_iFrameSize; - return m_iFrameSize; - } - else - { - m_inputSize = size; - memcpy(m_inputBuffer, data, m_inputSize); - return m_inputSize; - } - } - } - - // attempt to fill up to 7 bytes - if(m_inputSize < HEADER_SIZE) - { - len = HEADER_SIZE-m_inputSize; - if(len > size) - len = size; - memcpy(m_inputBuffer+m_inputSize, data, len); - m_inputSize += len; - data += len; - size -= len; - } - - if(m_inputSize < HEADER_SIZE) - return data - orig; - - // attempt to sync by shifting bytes - while(true) - { - m_iFrameSize = m_dll.dts_syncinfo(m_pState, m_inputBuffer, &flags, &m_iSourceSampleRate, &m_iSourceBitrate, &framelen); - if(m_iFrameSize > 0) - break; - - if(size == 0) - return data - orig; - - memmove(m_inputBuffer, m_inputBuffer+1, HEADER_SIZE-1); - m_inputBuffer[HEADER_SIZE-1] = data[0]; - data++; - size--; - } - - if(m_iSourceFlags != flags) - SetupChannels(flags); - - len = m_iFrameSize-m_inputSize; - if(len > size) - len = size; - - memcpy(m_inputBuffer+m_inputSize, data, len); - m_inputSize += len; - data += len; - size -= len; - - if(m_inputSize >= m_iFrameSize) - { - *frame = m_inputBuffer; - *framesize = m_iFrameSize; - m_inputSize = 0; - } - - return data - orig; -} - -int CDVDAudioCodecLibDts::Decode(BYTE* pData, int iSize) -{ - int len, framesize; - BYTE* frame; - - m_decodedSize = 0; - - len = ParseFrame(pData, iSize, &frame, &framesize); - if(!frame) - return len; - - level_t level = 1.0f; - sample_t bias = 384; - int flags = m_iOutputFlags; - - m_dll.dts_frame(m_pState, frame, &flags, &level, bias); - - if (!g_advancedSettings.m_audioApplyDrc) - m_dll.dts_dynrng(m_pState, NULL, NULL); - - int blocks = m_dll.dts_blocks_num(m_pState); - for (int i = 0; i < blocks; i++) - { - if (m_dll.dts_block(m_pState) != 0) - { - CLog::Log(LOGERROR, "CDVDAudioCodecLibDts::Decode : dts_block != 0"); - break; - } - m_decodedSize += 2*resample_int16(m_fSamples, (int16_t*)(m_decodedData + m_decodedSize), m_iOutputChannels); - } - - return len; -} - -int CDVDAudioCodecLibDts::GetData(BYTE** dst) -{ - *dst = m_decodedData; - return m_decodedSize; -} - -void CDVDAudioCodecLibDts::SetDefault() -{ - m_iFrameSize = 0; - m_bFlagsInitialized = false; - m_iSourceFlags = 0; - m_iSourceChannels = 0; - m_iSourceSampleRate = 0; - m_iSourceBitrate = 0; - m_iOutputChannels = 0; - m_iOutputFlags = 0; - m_decodedSize = 0; - m_inputSize = 0; -} - -void CDVDAudioCodecLibDts::Reset() -{ - if (m_pState) m_dll.dts_free(m_pState); - - SetDefault(); - - m_pState = m_dll.dts_init(0); - m_fSamples = m_dll.dts_samples(m_pState); -} - -#endif /* USE_LIBDTS_DECODER */ diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.h b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.h deleted file mode 100644 index d167388839..0000000000 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibDts.h +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "system.h" -#ifdef USE_LIBDTS_DECODER - -#include "DVDAudioCodec.h" -#include "DllLibDts.h" - -class CDVDAudioCodecLibDts : public CDVDAudioCodec -{ -public: - CDVDAudioCodecLibDts(); - virtual ~CDVDAudioCodecLibDts(); - virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options); - virtual void Dispose(); - virtual int Decode(BYTE* pData, int iSize); - virtual int GetData(BYTE** dst); - virtual void Reset(); - virtual int GetChannels() { return m_iOutputChannels; } - virtual enum PCMChannels *GetChannelMap() { return m_pChannelMap; } - virtual int GetSampleRate() { return m_iSourceSampleRate; } - virtual int GetBufferSize() { return m_inputSize; } - virtual int GetBitsPerSample() { return 16; } - virtual const char* GetName() { return "libdts"; } - -protected: - void SetDefault(); - void SetupChannels(int flags); - int ParseFrame(BYTE* data, int size, BYTE** frame, int* framesize); - - // taken from the libdts project - static void convert2s16_multi(convert_t * _f, int16_t * s16, int flags); - - dts_state_t* m_pState; - - int m_iFrameSize; - float* m_fSamples; - - bool m_bFlagsInitialized; - int m_iSourceFlags; - int m_iSourceSampleRate; - int m_iSourceChannels; - int m_iSourceBitrate; - - int m_iOutputFlags; - int m_iOutputChannels; - enum PCMChannels *m_pChannelMap; - - DllLibDts m_dll; - - BYTE m_decodedData[131072]; // could be a bit to big - int m_decodedSize; - - BYTE m_inputBuffer[4096]; - int m_inputSize; -}; - -#endif diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DllLibDts.h b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DllLibDts.h deleted file mode 100644 index c11ee42819..0000000000 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DllLibDts.h +++ /dev/null @@ -1,121 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#if (defined HAVE_CONFIG_H) && (!defined WIN32) - #include "config.h" -#endif -extern "C" { -#if (defined USE_EXTERNAL_LIBDTS) - #include <dts.h> -#else - #include "libdts/dts.h" -#endif -} -#include "DynamicDll.h" -#include "utils/log.h" -#ifndef _LINUX -typedef unsigned __int32 uint32_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int8 uint8_t; -typedef __int32 int32_t; -typedef __int16 int16_t; -#endif -#ifdef LIBDTS_DOUBLE -typedef float convert_t; -#else -typedef sample_t convert_t; -#endif - - -class DllLibDtsInterface -{ -public: - virtual ~DllLibDtsInterface() {} - virtual dts_state_t * dts_init (uint32_t mm_accel)=0; - virtual int dts_syncinfo (dts_state_t *state, uint8_t * buf, int * flags, int * sample_rate, int * bit_rate, int *frame_length)=0; - virtual int dts_frame (dts_state_t * state, uint8_t * buf, int * flags, level_t * level, sample_t bias)=0; - virtual void dts_dynrng (dts_state_t * state, level_t (* call) (level_t, void *), void * data)=0; - virtual int dts_blocks_num (dts_state_t * state)=0; - virtual int dts_block (dts_state_t * state)=0; - virtual sample_t * dts_samples (dts_state_t * state)=0; - virtual void dts_free (dts_state_t * state)=0; -}; - -#if (defined USE_EXTERNAL_LIBDTS) - -class DllLibDts : public DllDynamic, DllLibDtsInterface -{ -public: - virtual ~DllLibDts() {} - virtual dts_state_t * dts_init (uint32_t mm_accel) - { return ::dts_init (mm_accel); } - virtual int dts_syncinfo (dts_state_t *state, uint8_t * buf, int * flags, int * sample_rate, int * bit_rate, int *frame_length) - { return ::dts_syncinfo (state, buf, flags, sample_rate, bit_rate, frame_length); } - virtual int dts_frame (dts_state_t * state, uint8_t * buf, int * flags, level_t * level, sample_t bias) - { return ::dts_frame (state, buf, flags, level, bias); } - virtual void dts_dynrng (dts_state_t * state, level_t (* call) (level_t, void *), void * data) - { return ::dts_dynrng (state, call, data); } - virtual int dts_blocks_num (dts_state_t * state) - { return ::dts_blocks_num (state); } - virtual int dts_block (dts_state_t * state) - { return ::dts_block (state); } - virtual sample_t * dts_samples (dts_state_t * state) - { return ::dts_samples (state); } - virtual void dts_free (dts_state_t * state) - { return ::dts_free (state); } - - // DLL faking. - virtual bool ResolveExports() { return true; } - virtual bool Load() { - CLog::Log(LOGDEBUG, "DllLibDts: Using libdts system library"); - return true; - } - virtual void Unload() {} -}; - -#else - -class DllLibDts : public DllDynamic, DllLibDtsInterface -{ - DECLARE_DLL_WRAPPER(DllLibDts, DLL_PATH_LIBDTS) - DEFINE_METHOD1(dts_state_t *, dts_init, (uint32_t p1)) - DEFINE_METHOD6(int, dts_syncinfo, (dts_state_t *p1, uint8_t * p2, int * p3, int * p4, int * p5, int *p6)) - DEFINE_METHOD5(int, dts_frame, (dts_state_t * p1, uint8_t * p2, int * p3, level_t * p4, sample_t p5)) - DEFINE_METHOD3(void, dts_dynrng, (dts_state_t * p1, level_t (* p2) (level_t, void *), void * p3)) - DEFINE_METHOD1(int, dts_blocks_num ,(dts_state_t * p1)) - DEFINE_METHOD1(int, dts_block, (dts_state_t * p1)) - DEFINE_METHOD1(sample_t *, dts_samples, (dts_state_t * p1)) - DEFINE_METHOD1(void, dts_free, (dts_state_t * p1)) - BEGIN_METHOD_RESOLVE() - RESOLVE_METHOD(dts_init) - RESOLVE_METHOD(dts_syncinfo) - RESOLVE_METHOD(dts_frame ) - RESOLVE_METHOD(dts_dynrng) - RESOLVE_METHOD(dts_blocks_num) - RESOLVE_METHOD(dts_block) - RESOLVE_METHOD(dts_samples) - RESOLVE_METHOD(dts_free) - END_METHOD_RESOLVE() -}; - -#endif diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile.in b/xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile.in index 96060d82b2..6592679b92 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile.in +++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile.in @@ -3,7 +3,6 @@ INCLUDES+=-I@abs_top_srcdir@/xbmc/cores/dvdplayer CXXFLAGS+=-DHAVE_MMX SRCS= DVDAudioCodecFFmpeg.cpp \ - DVDAudioCodecLibDts.cpp \ DVDAudioCodecLibFaad.cpp \ DVDAudioCodecLibMad.cpp \ DVDAudioCodecLPcm.cpp \ diff --git a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp index 7d902b437e..0cc0cc9913 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp @@ -35,18 +35,12 @@ #include "Video/DVDVideoCodecCrystalHD.h" #endif #include "Audio/DVDAudioCodecFFmpeg.h" -#ifdef USE_LIBDTS_DECODER - #include "Audio/DVDAudioCodecLibDts.h" -#endif #include "Audio/DVDAudioCodecLibMad.h" #ifdef USE_LIBFAAD_DECODER #include "Audio/DVDAudioCodecLibFaad.h" #endif #include "Audio/DVDAudioCodecPcm.h" #include "Audio/DVDAudioCodecLPcm.h" -#if defined(USE_LIBDTS_DECODER) - #include "Audio/DVDAudioCodecPassthrough.h" -#endif #include "Audio/DVDAudioCodecPassthroughFFmpeg.h" #include "Overlay/DVDOverlayCodecSSA.h" #include "Overlay/DVDOverlayCodecText.h" @@ -238,7 +232,7 @@ CDVDAudioCodec* CDVDFactoryCodec::CreateAudioCodec( CDVDStreamInfo &hint, bool p if (passthrough) { -#if (defined(USE_LIBDTS_DECODER)) && !defined(WIN32) +#if 0 && !defined(WIN32) pCodec = OpenCodec( new CDVDAudioCodecPassthrough(), hint, options ); if( pCodec ) return pCodec; #endif @@ -249,14 +243,6 @@ CDVDAudioCodec* CDVDFactoryCodec::CreateAudioCodec( CDVDStreamInfo &hint, bool p switch (hint.codec) { -#ifdef USE_LIBDTS_DECODER - case CODEC_ID_DTS: - { - pCodec = OpenCodec( new CDVDAudioCodecLibDts(), hint, options ); - if( pCodec ) return pCodec; - break; - } -#endif case CODEC_ID_MP2: case CODEC_ID_MP3: { diff --git a/xbmc/cores/paplayer/CodecFactory.cpp b/xbmc/cores/paplayer/CodecFactory.cpp index 105e7eec93..62ce25a7f0 100644 --- a/xbmc/cores/paplayer/CodecFactory.cpp +++ b/xbmc/cores/paplayer/CodecFactory.cpp @@ -43,10 +43,6 @@ #endif #include "URL.h" #include "DVDPlayerCodec.h" -#ifdef USE_LIBDTS_DECODER -#include "DTSCodec.h" -#include "DTSCDDACodec.h" -#endif ICodec* CodecFactory::CreateCodec(const CStdString& strFileType) { @@ -64,15 +60,8 @@ ICodec* CodecFactory::CreateCodec(const CStdString& strFileType) return new FLACCodec(); else if (strFileType.Equals("wav")) return new DVDPlayerCodec(); - else if (strFileType.Equals("dts")) -#ifdef USE_LIBDTS_DECODER - return new DTSCodec(); -#else - return new DVDPlayerCodec(); -#endif - else if (strFileType.Equals("ac3")) - return new DVDPlayerCodec(); - else if (strFileType.Equals("m4a") || strFileType.Equals("aac")) + else if (strFileType.Equals("dts") || strFileType.Equals("ac3") || + strFileType.Equals("m4a") || strFileType.Equals("aac")) return new DVDPlayerCodec(); else if (strFileType.Equals("wv")) return new WAVPackCodec(); @@ -149,18 +138,10 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri if (urlFile.GetFileType().Equals("wav")) { ICodec* codec; -#ifdef USE_LIBDTS_DECODER //lets see what it contains... //this kinda sucks 'cause if it's a plain wav file the file //will be opened, sniffed and closed 2 times before it is opened *again* for wav //would be better if the papcodecs could work with bitstreams instead of filenames. - codec = new DTSCodec(); - if (codec->Init(strFile, filecache)) - { - return codec; - } - delete codec; -#endif DVDPlayerCodec *dvdcodec = new DVDPlayerCodec(); dvdcodec->SetContentType("audio/x-spdif-compressed"); if (dvdcodec->Init(strFile, filecache)) @@ -184,21 +165,10 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri } if (urlFile.GetFileType().Equals("cdda")) { -#if defined(USE_LIBDTS_DECODER) - ICodec* codec; -#endif -#ifdef USE_LIBDTS_DECODER //lets see what it contains... //this kinda sucks 'cause if it's plain cdda the file - //will be opened, sniffed and closed 2 times before it is opened *again* for cdda + //will be opened, sniffed and closed before it is opened *again* for cdda //would be better if the papcodecs could work with bitstreams instead of filenames. - codec = new DTSCDDACodec(); - if (codec->Init(strFile, filecache)) - { - return codec; - } - delete codec; -#endif DVDPlayerCodec *dvdcodec = new DVDPlayerCodec(); dvdcodec->SetContentType("audio/x-spdif-compressed"); if (dvdcodec->Init(strFile, filecache)) diff --git a/xbmc/cores/paplayer/DTSCDDACodec.cpp b/xbmc/cores/paplayer/DTSCDDACodec.cpp deleted file mode 100644 index 19b3edd0c6..0000000000 --- a/xbmc/cores/paplayer/DTSCDDACodec.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "system.h" -#include "DTSCDDACodec.h" -#ifdef USE_LIBDTS_DECODER -#include <cdio/sector.h> - -DTSCDDACodec::DTSCDDACodec() : DTSCodec() -{ - m_CodecName = "DTS CDDA"; -} - -DTSCDDACodec::~DTSCDDACodec() -{ -} - -__int64 DTSCDDACodec::Seek(__int64 iSeekTime) -{ - // Calculate the next full second... - int iSeekTimeFullSec = (int)(iSeekTime + (1000 - (iSeekTime % 1000))) / 1000; - - // ...and the logical sector on the cd... - lsn_t lsnSeek = iSeekTimeFullSec * CDIO_CD_FRAMES_PER_SEC; - - // ... then seek to its position... - int iNewOffset = (int)m_file.Seek(lsnSeek * CDIO_CD_FRAMESIZE_RAW, SEEK_SET); - m_readBufferPos = 0; - - // ... and look if we really got there. - int iNewSeekTime = (iNewOffset / CDIO_CD_FRAMESIZE_RAW) / CDIO_CD_FRAMES_PER_SEC; - return iNewSeekTime * 1000; // ms -} - -bool DTSCDDACodec::CalculateTotalTime() -{ - m_TotalTime = (m_file.GetLength()/CDIO_CD_FRAMESIZE_RAW)/CDIO_CD_FRAMES_PER_SEC; - m_Bitrate = (int)((m_file.GetLength() * 8) / m_TotalTime); - m_TotalTime *= 1000; // ms - return m_TotalTime > 0; -} - -#endif - diff --git a/xbmc/cores/paplayer/DTSCDDACodec.h b/xbmc/cores/paplayer/DTSCDDACodec.h deleted file mode 100644 index 97f4ed6883..0000000000 --- a/xbmc/cores/paplayer/DTSCDDACodec.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "DTSCodec.h" - -#ifdef USE_LIBDTS_DECODER -class DTSCDDACodec : public DTSCodec -{ -public: - DTSCDDACodec(); - virtual ~DTSCDDACodec(); - virtual __int64 Seek(__int64 iSeekTime); - -protected: - virtual bool CalculateTotalTime(); -}; -#endif diff --git a/xbmc/cores/paplayer/DTSCodec.cpp b/xbmc/cores/paplayer/DTSCodec.cpp deleted file mode 100644 index 2d044b6d13..0000000000 --- a/xbmc/cores/paplayer/DTSCodec.cpp +++ /dev/null @@ -1,556 +0,0 @@ -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "system.h" -#include "utils/log.h" -#ifdef USE_LIBDTS_DECODER -#include "DTSCodec.h" - -static inline int16_t convert(int32_t i) -{ -#ifdef LIBDTS_FIXED - i >>= 15; -#else - i -= 0x43c00000; -#endif - return (i > 32767) ? 32767 : ((i < -32768) ? -32768 : i); -} - -void DTSCodec::convert2s16_2 (sample_t * _f, int16_t * s16) -{ - int i; - int32_t * f = (int32_t *) _f; - - for (i = 0; i < 256; i++) - { - s16[2*i] = convert (f[i]); - s16[2*i+1] = convert (f[i+256]); - } -} - -void DTSCodec::convert2s16_4 (sample_t * _f, int16_t * s16) -{ - int i; - int32_t * f = (int32_t *) _f; - - for (i = 0; i < 256; i++) - { - s16[4*i] = convert (f[i]); - s16[4*i+1] = convert (f[i+256]); - s16[4*i+2] = convert (f[i+512]); - s16[4*i+3] = convert (f[i+768]); - } -} - -void DTSCodec::convert2s16_5 (sample_t * _f, int16_t * s16) -{ - int i; - int32_t * f = (int32_t *) _f; - - for (i = 0; i < 256; i++) - { - s16[5*i] = convert (f[i+256]); - s16[5*i+1] = convert (f[i+512]); - s16[5*i+2] = convert (f[i+768]); - s16[5*i+3] = convert (f[i+1024]); - s16[5*i+4] = convert (f[i]); - } -} - -void DTSCodec::convert2s16_multi (sample_t * _f, int16_t * s16, int flags) -{ - int i; - int32_t * f = (int32_t *) _f; - - switch (flags) - { - case DTS_MONO: //MON 2 - for (i = 0; i < 256; i++) - { - s16[2*i] = s16[2*i+1] = convert (f[i]); - } - break; - case DTS_CHANNEL: //L R 2 - case DTS_STEREO: - case DTS_STEREO_TOTAL: - convert2s16_2 (_f, s16); - break; - case DTS_STEREO_SUMDIFF: //L+R L-R 2 - for (i = 0; i < 256; i++) - { - s16[2*i] = convert (f[i])/2 + convert (f[i+256])/2; - s16[2*i+1] = convert (f[i])/2 - convert (f[i+256])/2; - } - break; - case DTS_3F: //C L R 5 - for (i = 0; i < 256; i++) - { - s16[5*i] = convert (f[i+256]); - s16[5*i+1] = convert (f[i+512]); - s16[5*i+2] = s16[5*i+3] = 0; - s16[5*i+4] = convert (f[i]); - } - break; - case DTS_2F1R: //L R S 4 - for (i = 0; i < 256; i++) - { - s16[4*i] = convert (f[i]); - s16[4*i+1] = convert (f[i+256]); - s16[4*i+2] = s16[4*i+3] = convert (f[i+512]); - } - break; - case DTS_3F1R: //C L R S 5 - for (i = 0; i < 256; i++) - { - s16[5*i] = convert (f[i]+256); - s16[5*i+1] = convert (f[i+512]); - s16[5*i+2] = s16[5*i+3] = convert (f[i+768]); - s16[5*i+4] = convert (f[i]); - } - break; - case DTS_2F2R: //L R SL SR 4 - convert2s16_4 (_f, s16); - break; - case DTS_3F2R: //C L R SL SR 5 - convert2s16_5 (_f, s16); - break; - case DTS_MONO | DTS_LFE: //MON LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0; - s16[6*i+4] = convert (f[i]); - s16[6*i+5] = convert (f[i+256]); - } - break; - case DTS_CHANNEL | DTS_LFE: - case DTS_STEREO | DTS_LFE: - case DTS_STEREO_TOTAL | DTS_LFE: //L R LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i]); - s16[6*i+1] = convert (f[i+256]); - s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0; - s16[6*i+5] = convert (f[i+512]); - } - break; - case DTS_STEREO_SUMDIFF | DTS_LFE: //L+R L-R LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i])/2 + convert (f[i+256])/2; - s16[6*i+1] = convert (f[i])/2 - convert (f[i+256])/2; - s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0; - s16[6*i+5] = convert (f[i+512]); - } - break; - case DTS_3F | DTS_LFE: //C L R LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i+256]); - s16[6*i+1] = convert (f[i+512]); - s16[6*i+2] = s16[6*i+3] = 0; - s16[6*i+4] = convert (f[i]); - s16[6*i+5] = convert (f[i+768]); - } - break; - case DTS_2F1R | DTS_LFE: //L R S LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i]); - s16[6*i+1] = convert (f[i+256]); - s16[6*i+2] = s16[6*i+3] = convert (f[i+512]); - s16[6*i+4] = 0; - s16[6*i+5] = convert (f[i+768]); - } - break; - case DTS_3F1R | DTS_LFE: //C L R S LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i+256]); - s16[6*i+1] = convert (f[i+512]); - s16[6*i+2] = s16[6*i+3] = convert (f[i+768]); - s16[6*i+4] = convert (f[i]); - s16[6*i+5] = convert (f[i+1024]); - } - break; - case DTS_2F2R | DTS_LFE: //L R SL SR LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i]); - s16[6*i+1] = convert (f[i+256]); - s16[6*i+2] = convert (f[i+512]); - s16[6*i+3] = convert (f[i+768]); - s16[6*i+4] = 0; - s16[6*i+5] = convert (f[i+1024]); - } - break; - case DTS_3F2R | DTS_LFE: //C L R SL SR LFE 6 - for (i = 0; i < 256; i++) - { - s16[6*i] = convert (f[i+256]); - s16[6*i+1] = convert (f[i+512]); - s16[6*i+2] = convert (f[i+768]); - s16[6*i+3] = convert (f[i+1024]); - s16[6*i+4] = convert (f[i]); - s16[6*i+5] = convert (f[i+1280]); - - } - break; - } -} - -DTSCodec::DTSCodec() -{ - m_CodecName = "DTS"; - m_IsInitialized = false; - m_pState = NULL; - m_iSourceChannels = 0; - m_iSourceSampleRate = 0; - m_iSourceBitrate = 0; - m_decodedDataSize = 0; - m_pInputBuffer = NULL; - m_eof = false; - m_readBuffer = NULL; - m_decodedData = NULL; - m_readBufferPos = 0; - m_iOutputChannels = 0; -} - -DTSCodec::~DTSCodec() -{ - DeInit(); -} - -void DTSCodec::DeInit() -{ - m_IsInitialized = false; - if (m_pState) m_dll.dts_free(m_pState); - m_pState = NULL; - - CloseFile(); - m_readBufferPos = 0; - if (m_readBuffer) SAFE_DELETE_ARRAY(m_readBuffer); - if (m_decodedData) SAFE_DELETE_ARRAY(m_decodedData); -} - -__int64 DTSCodec::Seek(__int64 iSeekTime) -{ - // Calculate size of a single sample of the file - int iSampleSize = m_SampleRate * 2 * (m_BitsPerSample / 8); - // Seek to the position in the file - __int64 newPos = m_file.Seek(m_iDataStart + ((iSeekTime / 1000) * iSampleSize)); - m_readBufferPos = 0; - m_iFrameSize = 0; - if (newPos == -1) - m_eof = true; - - return iSeekTime; -} - -bool DTSCodec::CanInit() -{ - return m_dll.CanLoad(); -} - - -void DTSCodec::PrepairBuffers() -{ - m_decodingBufferSize = 131072; - m_readingBufferSize = 98304; - m_decodedData = new BYTE[m_decodingBufferSize]; - m_readBuffer = new BYTE[m_readingBufferSize]; - m_readBufferPos = m_file.Read(m_readBuffer, m_readingBufferSize); // big read, much crap sometimes before data starts.... -} - -bool DTSCodec::InitFile(const CStdString &strFile, unsigned int filecache) -{ - // Open the file to play - return m_file.Open(strFile, READ_CACHED); -} - -bool DTSCodec::CalculateTotalTime() -{ - //libdts gives half the actual bitrate sometime causing the total time to double - //don't know why this is, vlc has the same problem - m_TotalTime = (((m_file.GetLength() - m_iDataStart) * 8) / m_Bitrate) * 1000; - return m_TotalTime > 0; -} - -bool DTSCodec::Init(const CStdString &strFile, unsigned int filecache) -{ - if (m_IsInitialized) return true; - if (!InitFile(strFile, filecache)) - { - CLog::Log(LOGERROR, "DTSCodec: Can't open %s", strFile.c_str()); - return false; - } - if (!m_dll.Load()) - return false; - - SetDefault(); - - m_pState = m_dll.dts_init(0); - if (!m_pState) - return false; - - m_eof = false; - - PrepairBuffers(); - - int istart = 0; - do - { - m_iDataStart = -1; - Decode(m_readBuffer + istart, m_readBufferPos - istart); - //decoding error, could still be a valid dts-stream, try again at next byte - istart += std::max(m_iDataStart + 1, 1); - } while (m_DecoderError && (m_decodedDataSize == 0) && (m_readBufferPos - istart > 0) ); - if (m_DecoderError || m_decodedDataSize == 0) - { - return false; - } - m_Channels = m_iOutputChannels; - m_SampleRate = m_iSourceSampleRate; - m_BitsPerSample = 16; - m_Bitrate = m_iSourceBitrate; - if (m_Channels == 0 || m_SampleRate == 0) - { - return false; - } - if (!CalculateTotalTime()) - return false; - - //m_file.StartBuffering(); - m_IsInitialized = true; - return true; -} - -void DTSCodec::CloseFile() -{ - m_file.Close(); -} - -int DTSCodec::GetNrOfChannels(int iFlags) -{ - int iChannels = 0; - - switch (iFlags & DTS_CHANNEL_MASK) - { - case DTS_MONO: iChannels = 1; break; - case DTS_CHANNEL: iChannels = 1; break; // ??? - case DTS_STEREO: iChannels = 2; break; - case DTS_STEREO_SUMDIFF: iChannels = 2; break; - case DTS_STEREO_TOTAL: iChannels = 2; break; - case DTS_3F: iChannels = 3; break; - case DTS_2F1R: iChannels = 3; break; - case DTS_3F1R: iChannels = 4; break; - case DTS_2F2R: iChannels = 4; break; - case DTS_3F2R: iChannels = 5; break; - case DTS_4F2R: iChannels = 6; break; - default: iChannels = 0; break; - } - if (iFlags & DTS_LFE) iChannels++; - - return iChannels; -} - -int DTSCodec::ReadInput() -{ - int inputBufferToRead = m_readingBufferSize - m_readBufferPos; - if ( inputBufferToRead && !m_eof ) - { - int fileLeft=(int)(m_file.GetLength() - m_file.GetPosition()); - if (inputBufferToRead > fileLeft ) inputBufferToRead = fileLeft; - - DWORD dwBytesRead = m_file.Read(m_readBuffer + m_readBufferPos, inputBufferToRead); - if (!dwBytesRead) - { - CLog::Log(LOGERROR, "DTSCodec: Error reading file"); - return -1; - } - m_readBufferPos += dwBytesRead; - if ( m_file.GetLength() == m_file.GetPosition() ) - m_eof = true; - return dwBytesRead; - } - return 0; -} - -int DTSCodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize) -{ - *actualsize = 0; - // First read in data from our file - if (ReadInput() == -1) - { - return READ_ERROR; - } - // Decode data if we have some to decode - if ( size ) - { - if ((m_readBufferPos > 0) && (m_decodedDataSize < m_decodingBufferSize - 16384)) - { - // Now decode data into the vacant frame buffer - int result = Decode(m_readBuffer, m_readBufferPos); - if (result == -1) - return READ_ERROR; - memmove(m_readBuffer, m_readBuffer + result, m_readBufferPos - result); - m_readBufferPos -= result; - } - } - // check whether we can move data out of our output buffer - int amounttomove = m_decodedDataSize; - if (amounttomove > size) amounttomove = size; - if (amounttomove) - { - memcpy(pBuffer, m_decodedData, amounttomove); - m_decodedDataSize -= amounttomove; - memmove(m_decodedData, m_decodedData + amounttomove, m_decodedDataSize); - *actualsize = amounttomove; - } - if (m_eof) - return READ_EOF; - return READ_SUCCESS; -} - -#define HEADER_SIZE 14 -int DTSCodec::Decode(BYTE* pData, int iSize) -{ - level_t level = 1.0f; - sample_t bias = 384; - m_DecoderError = false; - - int iLen = 0; - BYTE* pOldDataPointer = pData; - while (iSize > 0) - { - if (m_iFrameSize == 0) - { - // no header seen : find one. We need at least 7 bytes to parse it - int i = 0; - while (i <= (iSize - HEADER_SIZE)) - { - // it's possible that m_inputBuffer already contains 6 bits from our previous run - // so use m_pInputBuffer to copy the rest of the data. We must rest it after dts_syncinfo though!! - for (int u = 0; u < HEADER_SIZE; u++) m_pInputBuffer[u] = pData[u]; - - iLen = m_dll.dts_syncinfo(m_pState, m_inputBuffer, &m_iFlags, &m_iSourceSampleRate, &m_iSourceBitrate, &m_iFrameSize); - if (iLen > 0) - { - if (m_iSourceChannels == 0) - { - m_iSourceChannels = GetNrOfChannels(m_iFlags); - } - m_iFrameSize = iLen; - //start of data in file - if (m_iDataStart == -1) - m_iDataStart = (pData - pOldDataPointer); - - pData += HEADER_SIZE; - m_pInputBuffer += HEADER_SIZE; - iSize -= HEADER_SIZE; - break; - } - - // reset the buffer pointer if needed - if ((m_pInputBuffer - m_inputBuffer) > 0) m_pInputBuffer = m_inputBuffer; - - // no sync found, shift one byte - i++; - pData++; - iSize--; - } - if (m_iFrameSize == 0 && iSize < HEADER_SIZE) - { - // we are at the end of our stream and don't have enough data for our header anymore. - // copy it to our buffer for later use; - for (int i = 0; i < iSize; i++) m_pInputBuffer[i] = pData[i]; - - m_pInputBuffer += iSize; - pData += iSize; - iSize = 0; - break; - } - } - else if (m_pInputBuffer - m_inputBuffer < m_iFrameSize) - { - // we are working on a frame that is m_iFrameSize big, but we don't have all data yet - // just copy more data to it - iLen = m_iFrameSize - (m_pInputBuffer - m_inputBuffer); - if (iSize < iLen) iLen = iSize; - memcpy(m_pInputBuffer, pData, iLen); - - m_pInputBuffer += iLen; - pData += iLen; - iSize -= iLen; - } - else - { - // we have a frame to decode - //m_iOutputChannels = 2; - int iFlags = m_iFlags; - if (m_iOutputChannels == 1) iFlags = DTS_MONO; - else if (m_iOutputChannels == 2) iFlags = DTS_STEREO; - else - { - m_iOutputChannels = m_iSourceChannels; - iFlags |= DTS_ADJUST_LEVEL; - } - - m_dll.dts_frame(m_pState, m_inputBuffer, &iFlags, &level, bias); - - // [dts_dynrng (state, ...); this is only optional] - int iNrOfBlocks = m_dll.dts_blocks_num(m_pState); - for (int i = 0; i < iNrOfBlocks; i++) - { - if (m_dll.dts_block(m_pState) != 0) - { - CLog::Log(LOGDEBUG, "Not a valid DTS frame"); - m_pInputBuffer = m_inputBuffer; - m_iFrameSize = 0; - m_DecoderError = true; - return (pData - pOldDataPointer); - } - m_fSamples = m_dll.dts_samples(m_pState); - convert2s16_multi(m_fSamples, (short*)(m_decodedData + m_decodedDataSize), iFlags & (DTS_CHANNEL_MASK | DTS_LFE)); - m_decodedDataSize += 256 * sizeof(short) * m_iOutputChannels; - } - m_pInputBuffer = m_inputBuffer; - m_iFrameSize = 0; - return (pData - pOldDataPointer); - } - } - return (pData - pOldDataPointer); -} - -void DTSCodec::SetDefault() -{ - m_pInputBuffer = m_inputBuffer; - m_iFrameSize = 0; - m_iSourceChannels = 0; - m_iSourceSampleRate = 0; - m_iSourceBitrate = 0; - m_decodedDataSize = 0; - m_readBufferPos = 0; - m_iDataStart = -1; -} - -#endif - - diff --git a/xbmc/cores/paplayer/DTSCodec.h b/xbmc/cores/paplayer/DTSCodec.h deleted file mode 100644 index b732ae1b1a..0000000000 --- a/xbmc/cores/paplayer/DTSCodec.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2008 Team XBMC - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "ICodec.h" -#include "CachingCodec.h" -#include "DllDCACodec.h" - -#ifdef USE_LIBDTS_DECODER - -class DTSCodec : public CachingCodec -{ -public: - DTSCodec(); - virtual ~DTSCodec(); - - virtual bool Init(const CStdString &strFile, unsigned int filecache); - virtual void DeInit(); - virtual __int64 Seek(__int64 iSeekTime); - virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize); - virtual bool CanInit(); - -protected: - virtual bool CalculateTotalTime(); - virtual int ReadInput(); - virtual void PrepairBuffers(); - virtual bool InitFile(const CStdString &strFile, unsigned int filecache); - virtual void CloseFile(); - virtual void SetDefault(); - - int Decode(BYTE* pData, int iSize); - int GetNrOfChannels(int flags); - - static void convert2s16_2(convert_t * _f, int16_t * s16); - static void convert2s16_3(convert_t * _f, int16_t * s16); - static void convert2s16_4(convert_t * _f, int16_t * s16); - static void convert2s16_5(convert_t * _f, int16_t * s16); - static void convert2s16_multi(convert_t * _f, int16_t * s16, int flags); - - dts_state_t* m_pState; - - BYTE m_inputBuffer[12288]; - BYTE* m_pInputBuffer; - - BYTE* m_readBuffer; - unsigned int m_readingBufferSize; - unsigned int m_readBufferPos; - - BYTE* m_decodedData; - unsigned int m_decodingBufferSize; - unsigned int m_decodedDataSize; - - bool m_eof; - int m_iDataStart; - bool m_IsInitialized; - bool m_DecoderError; - - int m_iFrameSize; - int m_iFlags; - float* m_fSamples; - - int m_iSourceSampleRate; - int m_iSourceChannels; - int m_iSourceBitrate; - - int m_iOutputChannels; - - DllDCACodec m_dll; -}; -#endif - diff --git a/xbmc/cores/paplayer/Makefile.in b/xbmc/cores/paplayer/Makefile.in index 08a2f9a175..864b5d6309 100644 --- a/xbmc/cores/paplayer/Makefile.in +++ b/xbmc/cores/paplayer/Makefile.in @@ -9,8 +9,6 @@ SRCS=ADPCMCodec.cpp \ AudioDecoder.cpp \ CDDAcodec.cpp \ CodecFactory.cpp \ - DTSCDDACodec.cpp \ - DTSCodec.cpp \ DVDPlayerCodec.cpp \ FLACcodec.cpp \ ModplugCodec.cpp \ |