Skip to content
This repository
Browse code

Merge pull request #1571 from Memphiz/bxaremove

[PAPlayer] Remove BXACodec and use DVDPlayerCodec instead
  • Loading branch information...
commit 7942c1e09ebabcbf5d6436776470ffbeba3217c9 2 parents 79ed7ae + b8aca98
authored October 08, 2012
6  XBMC-ATV2.xcodeproj/project.pbxproj
@@ -104,7 +104,6 @@
104 104
 		DF33C2A415509C1B0046CDCB /* XbmcContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF33C2A215509C1B0046CDCB /* XbmcContext.cpp */; };
105 105
 		DF33C2AE15509C5A0046CDCB /* ilog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF33C2AB15509C5A0046CDCB /* ilog.cpp */; };
106 106
 		DF34890913FD96390026A711 /* GUIAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF34890713FD96390026A711 /* GUIAction.cpp */; };
107  
-		DF44852F140064F40069344B /* BXAcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF44852D140064F40069344B /* BXAcodec.cpp */; };
108 107
 		DF4485351400651B0069344B /* PipesManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF4485321400651B0069344B /* PipesManager.cpp */; };
109 108
 		DF4485381400654A0069344B /* AirTunesServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF4485361400654A0069344B /* AirTunesServer.cpp */; };
110 109
 		DF527780151BAFD600B5B63B /* WebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF527777151BAFD600B5B63B /* WebSocket.cpp */; };
@@ -1258,8 +1257,6 @@
1258 1257
 		DF33C2AC15509C5A0046CDCB /* ilog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilog.h; sourceTree = "<group>"; };
1259 1258
 		DF34890713FD96390026A711 /* GUIAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIAction.cpp; sourceTree = "<group>"; };
1260 1259
 		DF34890813FD96390026A711 /* GUIAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIAction.h; sourceTree = "<group>"; };
1261  
-		DF44852D140064F40069344B /* BXAcodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BXAcodec.cpp; sourceTree = "<group>"; };
1262  
-		DF44852E140064F40069344B /* BXAcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXAcodec.h; sourceTree = "<group>"; };
1263 1260
 		DF4485321400651B0069344B /* PipesManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipesManager.cpp; sourceTree = "<group>"; };
1264 1261
 		DF4485331400651B0069344B /* PipesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PipesManager.h; sourceTree = "<group>"; };
1265 1262
 		DF4485361400654A0069344B /* AirTunesServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AirTunesServer.cpp; sourceTree = "<group>"; };
@@ -4484,8 +4481,6 @@
4484 4481
 				F56C7305131EC151000AD0F6 /* ASAPCodec.h */,
4485 4482
 				F56C730C131EC151000AD0F6 /* AudioDecoder.cpp */,
4486 4483
 				F56C730D131EC151000AD0F6 /* AudioDecoder.h */,
4487  
-				DF44852D140064F40069344B /* BXAcodec.cpp */,
4488  
-				DF44852E140064F40069344B /* BXAcodec.h */,
4489 4484
 				F56C730E131EC151000AD0F6 /* CachingCodec.h */,
4490 4485
 				F56C730F131EC151000AD0F6 /* CDDAcodec.cpp */,
4491 4486
 				F56C7310131EC151000AD0F6 /* CDDAcodec.h */,
@@ -7390,7 +7385,6 @@
7390 7385
 				18968DE814155E1D005BA742 /* ApplicationOperations.cpp in Sources */,
7391 7386
 				DFCFC53D1413F7F70004D0BF /* AFPDirectory.cpp in Sources */,
7392 7387
 				32D6D47C1423A9D8003641AC /* JpegIO.cpp in Sources */,
7393  
-				DF44852F140064F40069344B /* BXAcodec.cpp in Sources */,
7394 7388
 				DF4485351400651B0069344B /* PipesManager.cpp in Sources */,
7395 7389
 				DF4485381400654A0069344B /* AirTunesServer.cpp in Sources */,
7396 7390
 				DF98D9A81434F4B400A6EBE1 /* SkinVariable.cpp in Sources */,
6  XBMC-IOS.xcodeproj/project.pbxproj
@@ -105,7 +105,6 @@
105 105
 		DF2E329415509B2C000F5772 /* XbmcContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF2E329215509B2C000F5772 /* XbmcContext.cpp */; };
106 106
 		DF33C29415509BF50046CDCB /* ilog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF33C29115509BF50046CDCB /* ilog.cpp */; };
107 107
 		DF3488F813FD961A0026A711 /* GUIAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF3488F613FD961A0026A711 /* GUIAction.cpp */; };
108  
-		DF44856C140065C60069344B /* BXAcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF44856A140065C60069344B /* BXAcodec.cpp */; };
109 108
 		DF448572140065E10069344B /* PipesManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF44856F140065E10069344B /* PipesManager.cpp */; };
110 109
 		DF4485751400662D0069344B /* AirTunesServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF4485731400662D0069344B /* AirTunesServer.cpp */; };
111 110
 		DF527757151BAF8200B5B63B /* WebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52774E151BAF8200B5B63B /* WebSocket.cpp */; };
@@ -1264,8 +1263,6 @@
1264 1263
 		DF33C29215509BF50046CDCB /* ilog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilog.h; sourceTree = "<group>"; };
1265 1264
 		DF3488F613FD961A0026A711 /* GUIAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIAction.cpp; sourceTree = "<group>"; };
1266 1265
 		DF3488F713FD961A0026A711 /* GUIAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIAction.h; sourceTree = "<group>"; };
1267  
-		DF44856A140065C60069344B /* BXAcodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BXAcodec.cpp; sourceTree = "<group>"; };
1268  
-		DF44856B140065C60069344B /* BXAcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXAcodec.h; sourceTree = "<group>"; };
1269 1266
 		DF44856F140065E10069344B /* PipesManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipesManager.cpp; sourceTree = "<group>"; };
1270 1267
 		DF448570140065E10069344B /* PipesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PipesManager.h; sourceTree = "<group>"; };
1271 1268
 		DF4485731400662D0069344B /* AirTunesServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AirTunesServer.cpp; sourceTree = "<group>"; };
@@ -4871,8 +4868,6 @@
4871 4868
 				F56C8307131F42E7000AD0F6 /* ASAPCodec.h */,
4872 4869
 				F56C830E131F42E7000AD0F6 /* AudioDecoder.cpp */,
4873 4870
 				F56C830F131F42E7000AD0F6 /* AudioDecoder.h */,
4874  
-				DF44856A140065C60069344B /* BXAcodec.cpp */,
4875  
-				DF44856B140065C60069344B /* BXAcodec.h */,
4876 4871
 				F56C8310131F42E7000AD0F6 /* CachingCodec.h */,
4877 4872
 				F56C8311131F42E7000AD0F6 /* CDDAcodec.cpp */,
4878 4873
 				F56C8312131F42E7000AD0F6 /* CDDAcodec.h */,
@@ -7420,7 +7415,6 @@
7420 7415
 				18968DDE14155E01005BA742 /* ApplicationOperations.cpp in Sources */,
7421 7416
 				DFCFC52A1413F7D60004D0BF /* AFPDirectory.cpp in Sources */,
7422 7417
 				3291892B1423A9B700E878CD /* JpegIO.cpp in Sources */,
7423  
-				DF44856C140065C60069344B /* BXAcodec.cpp in Sources */,
7424 7418
 				DF448572140065E10069344B /* PipesManager.cpp in Sources */,
7425 7419
 				DF4485751400662D0069344B /* AirTunesServer.cpp in Sources */,
7426 7420
 				DF98D9991434F49500A6EBE1 /* SkinVariable.cpp in Sources */,
6  XBMC.xcodeproj/project.pbxproj
@@ -381,7 +381,6 @@
381 381
 		DF34898213FDAAF60026A711 /* HttpParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF34898113FDAAF60026A711 /* HttpParser.cpp */; };
382 382
 		DF448457140048A60069344B /* AirTunesServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF448455140048A60069344B /* AirTunesServer.cpp */; };
383 383
 		DF44845E140048C80069344B /* PipesManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF44845B140048C80069344B /* PipesManager.cpp */; };
384  
-		DF4484EE140054530069344B /* BXAcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF4484EC140054530069344B /* BXAcodec.cpp */; };
385 384
 		DF5276E1151BAEDA00B5B63B /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52769A151BAEDA00B5B63B /* Base64.cpp */; };
386 385
 		DF5276E2151BAEDA00B5B63B /* HttpResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52769C151BAEDA00B5B63B /* HttpResponse.cpp */; };
387 386
 		DF527734151BAF4C00B5B63B /* WebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52772B151BAF4C00B5B63B /* WebSocket.cpp */; };
@@ -1865,8 +1864,6 @@
1865 1864
 		DF448456140048A60069344B /* AirTunesServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AirTunesServer.h; sourceTree = "<group>"; };
1866 1865
 		DF44845B140048C80069344B /* PipesManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipesManager.cpp; sourceTree = "<group>"; };
1867 1866
 		DF44845C140048C80069344B /* PipesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PipesManager.h; sourceTree = "<group>"; };
1868  
-		DF4484EC140054530069344B /* BXAcodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BXAcodec.cpp; sourceTree = "<group>"; };
1869  
-		DF4484ED140054530069344B /* BXAcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXAcodec.h; sourceTree = "<group>"; };
1870 1867
 		DF52769A151BAEDA00B5B63B /* Base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base64.cpp; sourceTree = "<group>"; };
1871 1868
 		DF52769B151BAEDA00B5B63B /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = "<group>"; };
1872 1869
 		DF52769C151BAEDA00B5B63B /* HttpResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpResponse.cpp; sourceTree = "<group>"; };
@@ -5149,8 +5146,6 @@
5149 5146
 				88ACB01D0DCF409E0083CFDF /* ASAPCodec.h */,
5150 5147
 				E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */,
5151 5148
 				E38E15E40D25F9FA00618676 /* AudioDecoder.h */,
5152  
-				DF4484EC140054530069344B /* BXAcodec.cpp */,
5153  
-				DF4484ED140054530069344B /* BXAcodec.h */,
5154 5149
 				E38E15E50D25F9FA00618676 /* CachingCodec.h */,
5155 5150
 				E38E15E60D25F9FA00618676 /* CDDAcodec.cpp */,
5156 5151
 				E38E15E70D25F9FA00618676 /* CDDAcodec.h */,
@@ -7458,7 +7453,6 @@
7458 7453
 				32C631281423A90F00F18420 /* JpegIO.cpp in Sources */,
7459 7454
 				DF448457140048A60069344B /* AirTunesServer.cpp in Sources */,
7460 7455
 				DF44845E140048C80069344B /* PipesManager.cpp in Sources */,
7461  
-				DF4484EE140054530069344B /* BXAcodec.cpp in Sources */,
7462 7456
 				DF98D98C1434F47D00A6EBE1 /* SkinVariable.cpp in Sources */,
7463 7457
 				F5E10537140AA38100175026 /* PeripheralBusUSB.cpp in Sources */,
7464 7458
 				F5E10538140AA38100175026 /* PeripheralBus.cpp in Sources */,
2  project/VS2010Express/XBMC.vcxproj
@@ -398,7 +398,6 @@
398 398
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDDemuxers\DVDDemuxPVRClient.cpp" />
399 399
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamBluray.cpp" />
400 400
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamPVRManager.cpp" />
401  
-    <ClCompile Include="..\..\xbmc\cores\paplayer\BXAcodec.cpp" />
402 401
     <ClCompile Include="..\..\xbmc\cores\paplayer\PCMCodec.cpp" />
403 402
     <ClCompile Include="..\..\xbmc\cores\VideoRenderers\RenderCapture.cpp" />
404 403
     <ClCompile Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.cpp" />
@@ -1942,7 +1941,6 @@
1942 1941
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDDemuxers\DVDDemuxPVRClient.h" />
1943 1942
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamBluray.h" />
1944 1943
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamPVRManager.h" />
1945  
-    <ClInclude Include="..\..\xbmc\cores\paplayer\BXAcodec.h" />
1946 1944
     <ClInclude Include="..\..\xbmc\cores\VideoRenderers\RenderCapture.h" />
1947 1945
     <ClInclude Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.h" />
1948 1946
     <ClInclude Include="..\..\xbmc\CueDocument.h" />
6  project/VS2010Express/XBMC.vcxproj.filters
@@ -1993,9 +1993,6 @@
1993 1993
     <ClCompile Include="..\..\xbmc\guilib\JpegIO.cpp">
1994 1994
       <Filter>guilib</Filter>
1995 1995
     </ClCompile>
1996  
-    <ClCompile Include="..\..\xbmc\cores\paplayer\BXAcodec.cpp">
1997  
-      <Filter>cores\paplayer</Filter>
1998  
-    </ClCompile>
1999 1996
     <ClCompile Include="..\..\xbmc\interfaces\info\SkinVariable.cpp">
2000 1997
       <Filter>interfaces\info</Filter>
2001 1998
     </ClCompile>
@@ -4906,9 +4903,6 @@
4906 4903
     <ClInclude Include="..\..\xbmc\guilib\JpegIO.h">
4907 4904
       <Filter>guilib</Filter>
4908 4905
     </ClInclude>
4909  
-    <ClInclude Include="..\..\xbmc\cores\paplayer\BXAcodec.h">
4910  
-      <Filter>cores\paplayer</Filter>
4911  
-    </ClInclude>
4912 4906
     <ClInclude Include="..\..\xbmc\interfaces\info\SkinVariable.h">
4913 4907
       <Filter>interfaces\info</Filter>
4914 4908
     </ClInclude>
2  xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp
@@ -43,6 +43,8 @@ CDVDDemux* CDVDFactoryDemuxer::CreateDemuxer(CDVDInputStream* pInputStream)
43 43
   // Try to open the AirTunes demuxer
44 44
   if (pInputStream->IsStreamType(DVDSTREAM_TYPE_FILE) && pInputStream->GetContent().compare("audio/x-xbmc-pcm") == 0 )
45 45
   {
  46
+    // audio/x-xbmc-pcm this is the used codec for AirTunes
  47
+    // (apples audio only streaming)
46 48
     auto_ptr<CDVDDemuxBXA> demuxer(new CDVDDemuxBXA());
47 49
     if(demuxer->Open(pInputStream))
48 50
       return demuxer.release();
126  xbmc/cores/paplayer/BXAcodec.cpp
... ...
@@ -1,126 +0,0 @@
1  
-/*
2  
- *      Copyright (C) 2005-2012 Team XBMC
3  
- *      http://www.xbmc.org
4  
- *
5  
- *  This Program is free software; you can redistribute it and/or modify
6  
- *  it under the terms of the GNU General Public License as published by
7  
- *  the Free Software Foundation; either version 2, or (at your option)
8  
- *  any later version.
9  
- *
10  
- *  This Program is distributed in the hope that it will be useful,
11  
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  
- *  GNU General Public License for more details.
14  
- *
15  
- *  You should have received a copy of the GNU General Public License
16  
- *  along with XBMC; see the file COPYING.  If not, see
17  
- *  <http://www.gnu.org/licenses/>.
18  
- *
19  
- */
20  
-
21  
-#include "system.h"
22  
-#include "BXAcodec.h"
23  
-#include "utils/EndianSwap.h"
24  
-#include "cores/AudioEngine/Utils/AEUtil.h"
25  
-
26  
-BXACodec::BXACodec()
27  
-{
28  
-  m_SampleRate = 0;
29  
-  m_Channels = 0;
30  
-  m_BitsPerSample = 0;
31  
-  m_Bitrate = 0;
32  
-  m_CodecName = "XBMC PCM";
33  
-}
34  
-
35  
-BXACodec::~BXACodec()
36  
-{
37  
-  DeInit();
38  
-}
39  
-
40  
-bool BXACodec::Init(const CStdString &strFile, unsigned int filecache)
41  
-{
42  
-  if (!m_file.Open(strFile))
43  
-    return false;
44  
-
45  
-  // read header
46  
-  BXA_FmtHeader bxah;
47  
-  m_file.Read(&bxah, sizeof(BXA_FmtHeader));
48  
-
49  
-  // file valid?
50  
-  if (strncmp(bxah.fourcc, "BXA ", 4) != 0 || bxah.type != BXA_PACKET_TYPE_FMT)
51  
-  {
52  
-    return false;
53  
-  }
54  
-
55  
-  m_SampleRate = bxah.sampleRate;
56  
-  m_Channels = bxah.channels;
57  
-  m_BitsPerSample = bxah.bitsPerSample;
58  
-  m_TotalTime = bxah.durationMs;
59  
-  m_Bitrate = bxah.sampleRate * bxah.channels * bxah.bitsPerSample;
60  
-  m_DataFormat = AE_FMT_S16LE;
61  
-
62  
-  if (m_SampleRate == 0 || m_Channels == 0 || m_BitsPerSample == 0)
63  
-  {
64  
-    return false;
65  
-  }
66  
-
67  
-  return true;
68  
-}
69  
-
70  
-void BXACodec::DeInit()
71  
-{
72  
-  m_file.Close();
73  
-}
74  
-
75  
-int64_t BXACodec::Seek(int64_t iSeekTime)
76  
-{
77  
-  return iSeekTime;
78  
-}
79  
-
80  
-template <class T>
81  
-class MiniScopedArray
82  
-{
83  
-public:
84  
-	MiniScopedArray(int size) {m_arr = new T[size];}
85  
-	~MiniScopedArray() {delete[] m_arr;}
86  
-	T* raw_data() {return m_arr;}
87  
-private:
88  
-	T* m_arr;
89  
-};
90  
-
91  
-int BXACodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize)
92  
-{
93  
-  *actualsize=0;
94  
-
95  
-  int iAmountRead;
96  
-  //unsigned char data[size];
97  
-  MiniScopedArray<char> data(size);
98  
-  iAmountRead = m_file.Read(data.raw_data(), size);
99  
-  if (iAmountRead > 0)
100  
-  {
101  
-    *actualsize=iAmountRead;
102  
-    memcpy(pBuffer, data.raw_data(), iAmountRead <= size ? iAmountRead : size);
103  
-    return READ_SUCCESS;
104  
-  }
105  
-
106  
-  *actualsize = 0;
107  
-  return READ_EOF;
108  
-}
109  
-
110  
-bool BXACodec::CanInit()
111  
-{
112  
-  return true;
113  
-}
114  
-
115  
-CAEChannelInfo BXACodec::GetChannelInfo()
116  
-{
117  
-  static enum AEChannel map[2][3] = {
118  
-    {AE_CH_FC, AE_CH_NULL},
119  
-    {AE_CH_FL, AE_CH_FR  , AE_CH_NULL}
120  
-  };
121  
-
122  
-  if (m_Channels > 2)
123  
-    return CAEUtil::GuessChLayout(m_Channels);
124  
-
125  
-  return CAEChannelInfo(map[m_Channels - 1]);
126  
-}
74  xbmc/cores/paplayer/BXAcodec.h
... ...
@@ -1,74 +0,0 @@
1  
-/*
2  
- *      Copyright (C) 2005-2012 Team XBMC
3  
- *      http://www.xbmc.org
4  
- *
5  
- *  This Program is free software; you can redistribute it and/or modify
6  
- *  it under the terms of the GNU General Public License as published by
7  
- *  the Free Software Foundation; either version 2, or (at your option)
8  
- *  any later version.
9  
- *
10  
- *  This Program is distributed in the hope that it will be useful,
11  
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  
- *  GNU General Public License for more details.
14  
- *
15  
- *  You should have received a copy of the GNU General Public License
16  
- *  along with XBMC; see the file COPYING.  If not, see
17  
- *  <http://www.gnu.org/licenses/>.
18  
- *
19  
- */
20  
-
21  
-#pragma once
22  
-
23  
-#include "ICodec.h"
24  
-#include "filesystem/File.h"
25  
-#include "CachingCodec.h"
26  
-#ifdef _WIN32
27  
-#define __attribute__(dummy_val)
28  
-#else
29  
-#include <config.h>
30  
-#endif
31  
-
32  
-#ifdef _WIN32
33  
-#pragma pack(push)
34  
-#pragma pack(1)
35  
-#endif
36  
-
37  
-typedef struct
38  
-{
39  
-  char fourcc[4];
40  
-  uint32_t type;
41  
-  uint32_t channels;
42  
-  uint32_t sampleRate;
43  
-  uint32_t bitsPerSample;
44  
-  uint64_t durationMs;
45  
-} __attribute__((__packed__)) BXA_FmtHeader;
46  
-
47  
-typedef struct
48  
-{
49  
-  char fourcc[4];
50  
-  uint32_t type;
51  
-  uint32_t length;
52  
-} __attribute__((__packed__)) BXA_DataHeader;
53  
-
54  
-#ifdef _WIN32
55  
-#pragma pack(pop)
56  
-#endif
57  
-
58  
-#define BXA_PACKET_TYPE_FMT  1
59  
-#define BXA_PACKET_TYPE_DATA 2
60  
-
61  
-class BXACodec : public CachingCodec
62  
-{
63  
-public:
64  
-  BXACodec();
65  
-  virtual ~BXACodec();
66  
-
67  
-  virtual bool Init(const CStdString &strFile, unsigned int filecache);
68  
-  virtual void DeInit();
69  
-  virtual int64_t Seek(int64_t iSeekTime);
70  
-  virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
71  
-  virtual bool CanInit();
72  
-  virtual CAEChannelInfo GetChannelInfo();
73  
-};
74  
-
13  xbmc/cores/paplayer/CodecFactory.cpp
@@ -40,7 +40,6 @@
40 40
 #endif
41 41
 #include "URL.h"
42 42
 #include "DVDPlayerCodec.h"
43  
-#include "BXAcodec.h" 
44 43
 #include "PCMCodec.h"
45 44
 
46 45
 ICodec* CodecFactory::CreateCodec(const CStdString& strFileType)
@@ -139,9 +138,15 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
139 138
   else if( strContent.Equals("application/ogg") || strContent.Equals("audio/ogg"))
140 139
     return CreateOGGCodec(strFile,filecache);
141 140
   else if (strContent.Equals("audio/x-xbmc-pcm"))
142  
-    return (ICodec*)new BXACodec();  
143  
-   else if (strContent.Equals("audio/flac") || strContent.Equals("audio/x-flac") || strContent.Equals("application/x-flac"))
144  
-     return new FLACCodec();
  141
+  {
  142
+    // audio/x-xbmc-pcm this is the used codec for AirTunes
  143
+    // (apples audio only streaming)
  144
+    DVDPlayerCodec *dvdcodec = new DVDPlayerCodec();
  145
+    dvdcodec->SetContentType(strContent);
  146
+    return dvdcodec;
  147
+  }
  148
+  else if (strContent.Equals("audio/flac") || strContent.Equals("audio/x-flac") || strContent.Equals("application/x-flac"))
  149
+    return new FLACCodec();
145 150
 
146 151
   if (urlFile.GetProtocol() == "lastfm" || urlFile.GetProtocol() == "shout")
147 152
   {
1  xbmc/cores/paplayer/Makefile.in
@@ -9,7 +9,6 @@ endif
9 9
 
10 10
 SRCS  = ADPCMCodec.cpp
11 11
 SRCS += AudioDecoder.cpp
12  
-SRCS += BXAcodec.cpp
13 12
 SRCS += CDDAcodec.cpp
14 13
 SRCS += CodecFactory.cpp
15 14
 SRCS += DVDPlayerCodec.cpp
9  xbmc/network/AirTunesServer.cpp
@@ -35,7 +35,8 @@
35 35
 #include "ApplicationMessenger.h"
36 36
 #include "filesystem/PipeFile.h"
37 37
 #include "Application.h"
38  
-#include "cores/paplayer/BXAcodec.h"
  38
+#include "cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.h"
  39
+#include "filesystem/File.h"
39 40
 #include "music/tags/MusicInfoTag.h"
40 41
 #include "FileItem.h"
41 42
 #include "GUIInfoManager.h"
@@ -160,7 +161,7 @@ void* CAirTunesServer::AudioOutputFunctions::audio_init(void *cls, int bits, int
160 161
   pipe->OpenForWrite(XFILE::PipesManager::GetInstance().GetUniquePipeName());
161 162
   pipe->SetOpenThreashold(300);
162 163
 
163  
-  BXA_FmtHeader header;
  164
+  Demux_BXA_FmtHeader header;
164 165
   strncpy(header.fourcc, "BXA ", 4);
165 166
   header.type = BXA_PACKET_TYPE_FMT;
166 167
   header.bitsPerSample = bits;
@@ -328,9 +329,9 @@ ao_device* CAirTunesServer::AudioOutputFunctions::ao_open_live(int driver_id, ao
328 329
   device->pipe->OpenForWrite(XFILE::PipesManager::GetInstance().GetUniquePipeName());
329 330
   device->pipe->SetOpenThreashold(300);
330 331
 
331  
-  BXA_FmtHeader header;
  332
+  Demux_BXA_FmtHeader header;
332 333
   strncpy(header.fourcc, "BXA ", 4);
333  
-  header.type = BXA_PACKET_TYPE_FMT;
  334
+  header.type = BXA_PACKET_TYPE_FMT_DEMUX;
334 335
   header.bitsPerSample = format->bits;
335 336
   header.channels = format->channels;
336 337
   header.sampleRate = format->rate;

0 notes on commit 7942c1e

Please sign in to comment.
Something went wrong with that request. Please try again.