diff options
-rw-r--r-- | guilib/system.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/AC3CDDACodec.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/AC3Codec.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/AC3Codec.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/CodecFactory.cpp | 35 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCDDACodec.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCDDACodec.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCodec.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DTSCodec.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DllAc3codec.h | 4 | ||||
-rw-r--r-- | xbmc/cores/paplayer/DllDCACodec.h | 4 |
11 files changed, 39 insertions, 20 deletions
diff --git a/guilib/system.h b/guilib/system.h index 855b907561..8e3f605c1c 100644 --- a/guilib/system.h +++ b/guilib/system.h @@ -53,8 +53,6 @@ #define HAS_JSONRPC #define HAS_HTTPAPI -#define HAS_AC3_CODEC -#define HAS_DTS_CODEC #define HAS_CDDA_RIPPER #ifdef HAVE_ASAP_CODEC #define HAS_ASAP_CODEC diff --git a/xbmc/cores/paplayer/AC3CDDACodec.h b/xbmc/cores/paplayer/AC3CDDACodec.h index f6c53c3b55..d5951c32e8 100644 --- a/xbmc/cores/paplayer/AC3CDDACodec.h +++ b/xbmc/cores/paplayer/AC3CDDACodec.h @@ -23,7 +23,7 @@ #include "AC3Codec.h" -#ifdef HAS_AC3_CODEC +#ifdef USE_LIBA52_DECODER class AC3CDDACodec : public AC3Codec { public: diff --git a/xbmc/cores/paplayer/AC3Codec.cpp b/xbmc/cores/paplayer/AC3Codec.cpp index 93d8aae7b5..f11bf26869 100644 --- a/xbmc/cores/paplayer/AC3Codec.cpp +++ b/xbmc/cores/paplayer/AC3Codec.cpp @@ -23,7 +23,7 @@ #include "AC3Codec.h" #include "utils/log.h" -#ifdef HAS_AC3_CODEC +#ifdef USE_LIBA52_DECODER static inline int16_t convert(int32_t i) { diff --git a/xbmc/cores/paplayer/AC3Codec.h b/xbmc/cores/paplayer/AC3Codec.h index 9cb9e60f7d..4c59ff18ac 100644 --- a/xbmc/cores/paplayer/AC3Codec.h +++ b/xbmc/cores/paplayer/AC3Codec.h @@ -24,7 +24,7 @@ #include "CachingCodec.h" #include "DllAc3codec.h" -#ifdef HAS_AC3_CODEC +#ifdef USE_LIBA52_DECODER class AC3Codec : public CachingCodec { diff --git a/xbmc/cores/paplayer/CodecFactory.cpp b/xbmc/cores/paplayer/CodecFactory.cpp index e59666381e..3bee90b9aa 100644 --- a/xbmc/cores/paplayer/CodecFactory.cpp +++ b/xbmc/cores/paplayer/CodecFactory.cpp @@ -46,7 +46,7 @@ #endif #include "URL.h" #include "DVDPlayerCodec.h" -#ifdef HAS_DTS_CODEC +#ifdef USE_LIBDTS_DECODER #include "DTSCodec.h" #include "DTSCDDACodec.h" #endif @@ -67,13 +67,17 @@ ICodec* CodecFactory::CreateCodec(const CStdString& strFileType) return new FLACCodec(); else if (strFileType.Equals("wav")) return new DVDPlayerCodec(); -#ifdef HAS_DTS_CODEC else if (strFileType.Equals("dts")) +#ifdef USE_LIBDTS_DECODER return new DTSCodec(); +#else + return new DVDPlayerCodec(); #endif -#ifdef HAS_AC3_CODEC else if (strFileType.Equals("ac3")) +#ifdef USE_LIBA52_DECODER return new AC3Codec(); +#else + return new DVDPlayerCodec(); #endif else if (strFileType.Equals("m4a") || strFileType.Equals("aac")) return new DVDPlayerCodec(); @@ -153,7 +157,7 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri if (urlFile.GetFileType().Equals("wav")) { ICodec* codec; -#ifdef HAS_DTS_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 @@ -165,7 +169,7 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri } delete codec; #endif -#ifdef HAS_AC3_CODEC +#ifdef USE_LIBA52_DECODER codec = new AC3Codec(); if (codec->Init(strFile, filecache)) { @@ -173,6 +177,14 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri } delete codec; #endif +#if !defined(USE_LIBDTS_DECODER) || !defined(USE_LIBA52_DECODER) + codec = new DVDPlayerCodec(); + if (codec->Init(strFile, filecache)) + { + return codec; + } + delete codec; +#endif codec = new ADPCMCodec(); if (codec->Init(strFile, filecache)) { @@ -189,12 +201,13 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri } if (urlFile.GetFileType().Equals("cdda")) { -#ifdef HAS_DTS_CODEC + ICodec* codec; +#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 //would be better if the papcodecs could work with bitstreams instead of filenames. - ICodec* codec = new DTSCDDACodec(); + codec = new DTSCDDACodec(); if (codec->Init(strFile, filecache)) { return codec; @@ -209,6 +222,14 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri } delete codec; #endif +#if !defined(USE_LIBDTS_DECODER) || !defined(HAS_AC3_CDDA_CODEC) + codec = new DVDPlayerCodec(); + if (codec->Init(strFile, filecache)) + { + return codec; + } + delete codec; +#endif } else if (urlFile.GetFileType().Equals("ogg") || urlFile.GetFileType().Equals("oggstream") || urlFile.GetFileType().Equals("oga")) { diff --git a/xbmc/cores/paplayer/DTSCDDACodec.cpp b/xbmc/cores/paplayer/DTSCDDACodec.cpp index 2e7f48c42e..19b3edd0c6 100644 --- a/xbmc/cores/paplayer/DTSCDDACodec.cpp +++ b/xbmc/cores/paplayer/DTSCDDACodec.cpp @@ -21,7 +21,7 @@ #include "system.h" #include "DTSCDDACodec.h" -#ifdef HAS_DTS_CODEC +#ifdef USE_LIBDTS_DECODER #include <cdio/sector.h> DTSCDDACodec::DTSCDDACodec() : DTSCodec() diff --git a/xbmc/cores/paplayer/DTSCDDACodec.h b/xbmc/cores/paplayer/DTSCDDACodec.h index 4bfb2071d5..97f4ed6883 100644 --- a/xbmc/cores/paplayer/DTSCDDACodec.h +++ b/xbmc/cores/paplayer/DTSCDDACodec.h @@ -23,7 +23,7 @@ #include "DTSCodec.h" -#ifdef HAS_DTS_CODEC +#ifdef USE_LIBDTS_DECODER class DTSCDDACodec : public DTSCodec { public: diff --git a/xbmc/cores/paplayer/DTSCodec.cpp b/xbmc/cores/paplayer/DTSCodec.cpp index 9d51f6e677..d22e73bcef 100644 --- a/xbmc/cores/paplayer/DTSCodec.cpp +++ b/xbmc/cores/paplayer/DTSCodec.cpp @@ -21,7 +21,7 @@ #include "system.h"
#include "utils/log.h"
-#ifdef HAS_DTS_CODEC
+#ifdef USE_LIBDTS_DECODER
#include "DTSCodec.h"
static inline int16_t convert(int32_t i)
diff --git a/xbmc/cores/paplayer/DTSCodec.h b/xbmc/cores/paplayer/DTSCodec.h index 9849cf756a..963179c19b 100644 --- a/xbmc/cores/paplayer/DTSCodec.h +++ b/xbmc/cores/paplayer/DTSCodec.h @@ -26,7 +26,7 @@ #include "CachingCodec.h"
#include "DllDCACodec.h"
-#ifdef HAS_DTS_CODEC
+#ifdef USE_LIBDTS_DECODER
class DTSCodec : public CachingCodec
{
diff --git a/xbmc/cores/paplayer/DllAc3codec.h b/xbmc/cores/paplayer/DllAc3codec.h index af05bc23b3..509664a061 100644 --- a/xbmc/cores/paplayer/DllAc3codec.h +++ b/xbmc/cores/paplayer/DllAc3codec.h @@ -35,7 +35,7 @@ extern "C" { #include "DynamicDll.h" #include "utils/log.h" -#ifdef HAS_AC3_CODEC +#ifdef USE_LIBA52_DECODER #ifndef _LINUX typedef unsigned __int32 uint32_t; typedef unsigned __int8 uint8_t; @@ -136,4 +136,4 @@ class DllAc3Codec : public DllDynamic, DllAc3CodecInterface #endif /* (defined USE_EXTERNAL_LIBA52) */ -#endif /* HAS_AC3_CODEC */ +#endif /* USE_LIBA52_DECODER */ diff --git a/xbmc/cores/paplayer/DllDCACodec.h b/xbmc/cores/paplayer/DllDCACodec.h index d5b0e54743..fb217cca4d 100644 --- a/xbmc/cores/paplayer/DllDCACodec.h +++ b/xbmc/cores/paplayer/DllDCACodec.h @@ -34,7 +34,7 @@ extern "C" { #include "DynamicDll.h" #include "utils/log.h" -#ifdef HAS_DTS_CODEC +#ifdef USE_LIBDTS_DECODER #ifndef _LINUX typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; @@ -123,4 +123,4 @@ class DllDCACodec : public DllDynamic, DllDCACodecInterface #endif /* (defined USE_EXTERNAL_LIBDTS) */ -#endif /* HAS_DTS_CODEC */ +#endif /* USE_LIBDTS_DECODER */ |