aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorace20022 <ace20022@ymail.com>2016-03-04 17:50:21 +0100
committerace20022 <ace20022@ymail.com>2016-03-11 09:19:14 +0100
commit0ed08f64996f43bc46c6d1ee677cd23a79476c54 (patch)
tree5ac5e9a9479ea391ba3b2a988a85d9cd73c41c2b
parent351143a7f74298dbbe0b1e7f8c06ae150f17efb1 (diff)
[videoplayer] Add InputStreamMultiSource to open/handle input streams from multiple sources (at once).
-rw-r--r--Kodi.xcodeproj/project.pbxproj10
-rw-r--r--project/VS2010Express/XBMC.vcxproj3
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters9
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt7
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp20
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.h3
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h3
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.cpp154
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.h55
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiStreams.h42
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/Makefile1
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayer.cpp2
12 files changed, 303 insertions, 6 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj
index 32357d27b0..30ce85a0cc 100644
--- a/Kodi.xcodeproj/project.pbxproj
+++ b/Kodi.xcodeproj/project.pbxproj
@@ -632,6 +632,8 @@
7CF80DCA19710DC2003B2B34 /* KeyboardLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF80DC719710DC2003B2B34 /* KeyboardLayout.cpp */; };
7CFC08381C5BA7D0000E5E73 /* DVDDemuxClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFC08361C5BA7D0000E5E73 /* DVDDemuxClient.cpp */; };
7CFC08391C5BA7D0000E5E73 /* DVDDemuxClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFC08361C5BA7D0000E5E73 /* DVDDemuxClient.cpp */; };
+ 80204F121C91CD3600E8C88B /* InputStreamMultiSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 80204F0F1C91CD3600E8C88B /* InputStreamMultiSource.cpp */; };
+ 80204F131C91CD3600E8C88B /* InputStreamMultiSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 80204F0F1C91CD3600E8C88B /* InputStreamMultiSource.cpp */; };
815EE6350E17F1DC009FBE3C /* DVDInputStreamRTMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 815EE6330E17F1DC009FBE3C /* DVDInputStreamRTMP.cpp */; };
83E0B2490F7C95FF0091643F /* Atomics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83E0B2480F7C95FF0091643F /* Atomics.cpp */; };
880DBE4E0DC223FF00E26B71 /* MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 880DBE4B0DC223FF00E26B71 /* MediaSource.cpp */; };
@@ -3258,6 +3260,9 @@
7CF80DC819710DC2003B2B34 /* KeyboardLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyboardLayout.h; sourceTree = "<group>"; };
7CFC08361C5BA7D0000E5E73 /* DVDDemuxClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDDemuxClient.cpp; sourceTree = "<group>"; };
7CFC08371C5BA7D0000E5E73 /* DVDDemuxClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDDemuxClient.h; sourceTree = "<group>"; };
+ 80204F0F1C91CD3600E8C88B /* InputStreamMultiSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputStreamMultiSource.cpp; sourceTree = "<group>"; };
+ 80204F101C91CD3600E8C88B /* InputStreamMultiSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputStreamMultiSource.h; sourceTree = "<group>"; };
+ 80204F111C91CD3600E8C88B /* InputStreamMultiStreams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputStreamMultiStreams.h; sourceTree = "<group>"; };
815EE6330E17F1DC009FBE3C /* DVDInputStreamRTMP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DVDInputStreamRTMP.cpp; sourceTree = "<group>"; };
815EE6340E17F1DC009FBE3C /* DVDInputStreamRTMP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVDInputStreamRTMP.h; sourceTree = "<group>"; };
82F6F0EA16F269BB0081CC3C /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Buffer.h; path = commons/Buffer.h; sourceTree = "<group>"; };
@@ -7737,6 +7742,9 @@
815EE6340E17F1DC009FBE3C /* DVDInputStreamRTMP.h */,
E38E15740D25F9FA00618676 /* DVDStateSerializer.cpp */,
E38E15750D25F9FA00618676 /* DVDStateSerializer.h */,
+ 80204F0F1C91CD3600E8C88B /* InputStreamMultiSource.cpp */,
+ 80204F101C91CD3600E8C88B /* InputStreamMultiSource.h */,
+ 80204F111C91CD3600E8C88B /* InputStreamMultiStreams.h */,
);
path = DVDInputStreams;
sourceTree = "<group>";
@@ -9338,6 +9346,7 @@
E38E1F8F0D25F9FD00618676 /* DVDVideoPPFFmpeg.cpp in Sources */,
E38E1F910D25F9FD00618676 /* DVDDemux.cpp in Sources */,
7C8E023A1BA35D0B0072E8B2 /* PlayerBuiltins.cpp in Sources */,
+ 80204F121C91CD3600E8C88B /* InputStreamMultiSource.cpp in Sources */,
E38E1F940D25F9FD00618676 /* DVDDemuxUtils.cpp in Sources */,
E38E1F970D25F9FD00618676 /* DVDDemuxSPU.cpp in Sources */,
E38E1F980D25F9FD00618676 /* DVDFactoryInputStream.cpp in Sources */,
@@ -10513,6 +10522,7 @@
F597B05C18A804E0005AADAE /* DVDVideoCodec.cpp in Sources */,
E49911E4174E5D3700741B6D /* DVDInputStreamNavigator.cpp in Sources */,
E49911E5174E5D3700741B6D /* DVDInputStreamPVRManager.cpp in Sources */,
+ 80204F131C91CD3600E8C88B /* InputStreamMultiSource.cpp in Sources */,
E49911E6174E5D3700741B6D /* DVDInputStreamRTMP.cpp in Sources */,
E49911E8174E5D3700741B6D /* DVDStateSerializer.cpp in Sources */,
E49911E9174E5D3E00741B6D /* DVDSubtitleParserSSA.cpp in Sources */,
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index c2f6d9c1c0..bc8badca65 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -283,6 +283,7 @@
<ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxCDDA.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxClient.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\DVDInputStreamBluray.cpp" />
+ <ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiSource.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\DVDInputStreamPVRManager.cpp" />
<ClCompile Include="..\..\xbmc\cores\FFmpeg.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoPlayer\Process\ProcessInfo.cpp" />
@@ -1014,6 +1015,8 @@
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxCDDA.h" />
<ClInclude Include="..\..\xbmc\cores\FFmpeg.h" />
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxClient.h" />
+ <ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiSource.h" />
+ <ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiStreams.h" />
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxPacket.h" />
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\Process\ProcessInfo.h" />
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\VideoRenderers\BaseRenderer.h" />
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index f873a8c641..6d5332ed91 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -3304,6 +3304,9 @@
<ClCompile Include="..\..\xbmc\addons\binary\interfaces\api1\Addon\AddonCallbacksAddon.cpp">
<Filter>addons\binary\interfaces\api1\Addon</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiSource.cpp">
+ <Filter>cores\VideoPlayer\DVDInputStreams</Filter>
+ </ClCompile>
<ClCompile Include="..\..\xbmc\addons\binary\interfaces\api1\AudioDSP\AddonCallbacksAudioDSP.cpp">
<Filter>addons\binary\interfaces\api1\AudioDSP</Filter>
</ClCompile>
@@ -6341,6 +6344,9 @@
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\Process\ProcessInfo.h">
<Filter>cores\Process</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiSource.h">
+ <Filter>cores\VideoPlayer\DVDInputStreams</Filter>
+ </ClInclude>
<ClInclude Include="..\..\xbmc\addons\kodi-addon-dev-kit\include\kodi\kodi_adsp_dll.h">
<Filter>addons\include</Filter>
</ClInclude>
@@ -6413,6 +6419,9 @@
<ClInclude Include="..\..\xbmc\addons\binary\interfaces\api1\AudioDSP\AddonCallbacksAudioDSP.h">
<Filter>addons\binary\interfaces\api1\AudioDSP</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDInputStreams\InputStreamMultiStreams.h">
+ <Filter>cores\VideoPlayer\DVDInputStreams</Filter>
+ </ClInclude>
<ClInclude Include="..\..\xbmc\cores\VideoPlayer\DVDDemuxers\DVDDemuxPacket.h">
<Filter>cores\VideoPlayer\DVDDemuxers</Filter>
</ClInclude>
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt b/xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt
index 13bcb063d6..83d9fe9a1f 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt
@@ -8,7 +8,8 @@ set(SOURCES DVDFactoryInputStream.cpp
DVDInputStreamRTMP.cpp
DVDInputStreamStack.cpp
DVDStateSerializer.cpp
- InputStreamAddon.cpp)
+ InputStreamAddon.cpp
+ InputStreamMultiSource.cpp)
set(HEADERS DVDFactoryInputStream.h
DVDInputStream.h
@@ -23,7 +24,9 @@ set(HEADERS DVDFactoryInputStream.h
DVDStateSerializer.h
DllDvdNav.h
DllLibRTMP.h
- InputStreamAddon.h)
+ InputStreamAddon.h
+ InputStreamMultiStreams.h
+ InputStreamMultiSource.h)
if(BLURAY_FOUND)
list(APPEND SOURCES DVDInputStreamBluray.cpp)
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
index fb4eeaafc8..d92211e163 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
@@ -27,6 +27,7 @@
#include "DVDInputStreamPVRManager.h"
#include "DVDInputStreamRTMP.h"
#include "InputStreamAddon.h"
+#include "InputStreamMultiSource.h"
#ifdef HAVE_LIBBLURAY
#include "DVDInputStreamBluray.h"
#endif
@@ -40,11 +41,23 @@
#include "utils/URIUtils.h"
#include "addons/AddonManager.h"
#include "addons/InputStream.h"
+#include "Util.h"
-CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem)
+CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem, bool scanforextaudio)
{
std::string file = fileitem.GetPath();
+ if (scanforextaudio)
+ {
+ // find any available external audio tracks
+ std::vector<std::string> filenames;
+ filenames.push_back(file);
+ CUtil::ScanForExternalAudio(file, filenames);
+ if (filenames.size() >= 2)
+ {
+ return CreateInputStream(pPlayer, fileitem, filenames);
+ }
+ }
ADDON::VECADDONS addons;
ADDON::CAddonMgr::GetInstance().GetAddons(addons, ADDON::ADDON_INPUTSTREAM);
@@ -136,3 +149,8 @@ CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer
// our file interface handles all these types of streams
return (new CDVDInputStreamFile(fileitem));
}
+
+CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem, const std::vector<std::string>& filenames)
+{
+ return (new CInputStreamMultiSource(pPlayer, fileitem, filenames));
+}
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.h b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.h
index f63c9ff51e..0c39e884a5 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.h
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.h
@@ -29,5 +29,6 @@ class IVideoPlayer;
class CDVDFactoryInputStream
{
public:
- static CDVDInputStream* CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem);
+ static CDVDInputStream* CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem, bool scanforextaudio = false);
+ static CDVDInputStream* CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem, const std::vector<std::string>& filenames);
};
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h
index db9a449288..90d103ae1d 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h
@@ -42,7 +42,8 @@ enum DVDStreamType
DVDSTREAM_TYPE_MPLS = 10,
DVDSTREAM_TYPE_BLURAY = 11,
DVDSTREAM_TYPE_PVRMANAGER = 12,
- DVDSTREAM_TYPE_ADDON = 13
+ DVDSTREAM_TYPE_MULTIFILES = 13,
+ DVDSTREAM_TYPE_ADDON = 14
};
#define SEEK_POSSIBLE 0x10 // flag used to check if protocol allows seeks
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.cpp
new file mode 100644
index 0000000000..d515c31105
--- /dev/null
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.cpp
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2005-2015 Team XBMC
+ * http://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, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "InputStreamMultiSource.h"
+#include "DVDFactoryInputStream.h"
+#include "filesystem/File.h"
+#include "filesystem/IFile.h"
+#include "settings/AdvancedSettings.h"
+#include "utils/log.h"
+#include "utils/StringUtils.h"
+#include<map>
+
+using namespace XFILE;
+
+CInputStreamMultiSource::CInputStreamMultiSource(IVideoPlayer* pPlayer, CFileItem& fileitem, const std::vector<std::string>& filenames) : InputStreamMultiStreams(DVDSTREAM_TYPE_MULTIFILES, fileitem),
+ m_pPlayer(pPlayer),
+ m_filenames(filenames)
+{
+}
+
+CInputStreamMultiSource::~CInputStreamMultiSource()
+{
+ Close();
+}
+
+void CInputStreamMultiSource::Abort()
+{
+ for (auto iter : m_InputStreams)
+ iter->Abort();
+}
+
+void CInputStreamMultiSource::Close()
+{
+ m_InputStreams.clear();
+ CDVDInputStream::Close();
+}
+
+BitstreamStats CInputStreamMultiSource::GetBitstreamStats() const
+{
+ return m_stats;
+}
+
+int CInputStreamMultiSource::GetBlockSize()
+{
+ return 0;
+}
+
+bool CInputStreamMultiSource::GetCacheStatus(XFILE::SCacheStatus *status)
+{
+ return false;
+}
+
+int64_t CInputStreamMultiSource::GetLength()
+{
+ int64_t length = 0;
+ for (auto iter : m_InputStreams)
+ {
+ length = std::max(length, iter->GetLength());
+ }
+
+ return length;
+}
+
+bool CInputStreamMultiSource::IsEOF()
+{
+ if (m_InputStreams.empty())
+ return true;
+
+ for (auto iter : m_InputStreams)
+ {
+ if (!(iter->IsEOF()))
+ return false;
+ }
+
+ return true;
+}
+
+CDVDInputStream::ENextStream CInputStreamMultiSource::NextStream()
+{
+ bool eOF = IsEOF();
+ if (m_InputStreams.empty() || eOF)
+ return NEXTSTREAM_NONE;
+
+
+ CDVDInputStream::ENextStream next;
+ for (auto iter : m_InputStreams)
+ {
+ next = iter->NextStream();
+ if (next != NEXTSTREAM_NONE)
+ return next;
+ }
+ if (!eOF)
+ return NEXTSTREAM_RETRY;
+
+ return NEXTSTREAM_NONE;
+}
+
+bool CInputStreamMultiSource::Open()
+{
+ if (!m_pPlayer || m_filenames.empty())
+ return false;
+
+ for (unsigned int i = 0; i < m_filenames.size(); i++)
+ {
+ CFileItem fileitem = CFileItem(m_filenames[i], false);
+ InputStreamPtr inputstream(CDVDFactoryInputStream::CreateInputStream(m_pPlayer, fileitem));
+ if (!inputstream)
+ {
+ CLog::Log(LOGERROR, "CDVDPlayer::OpenInputStream - unable to create input stream for file [%s]", m_filenames[i].c_str());
+ continue;
+ }
+
+ if (!inputstream->Open())
+ {
+ CLog::Log(LOGERROR, "CDVDPlayer::OpenInputStream - error opening file [%s]", m_filenames[i].c_str());
+ continue;
+ }
+ m_InputStreams.push_back(inputstream);
+ }
+ return !m_InputStreams.empty();
+}
+
+int CInputStreamMultiSource::Read(uint8_t* buf, int buf_size)
+{
+ return -1;
+}
+
+int64_t CInputStreamMultiSource::Seek(int64_t offset, int whence)
+{
+ return -1;
+}
+
+void CInputStreamMultiSource::SetReadRate(unsigned rate)
+{
+ for (auto iter : m_InputStreams)
+ iter->SetReadRate(rate);
+}
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.h b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.h
new file mode 100644
index 0000000000..2558632584
--- /dev/null
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiSource.h
@@ -0,0 +1,55 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2015 Team XBMC
+ * http://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, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "DVDInputStream.h"
+#include "InputStreamMultiStreams.h"
+
+#include <string>
+#include <vector>
+
+class IVideoPlayer;
+
+class CInputStreamMultiSource : public InputStreamMultiStreams
+{
+
+public:
+ CInputStreamMultiSource(IVideoPlayer* pPlayer, CFileItem& fileitem, const std::vector<std::string>& filenames);
+ virtual ~CInputStreamMultiSource();
+
+ virtual void Abort() override;
+ virtual void Close() override;
+ virtual BitstreamStats GetBitstreamStats() const ;
+ virtual int GetBlockSize();
+ virtual bool GetCacheStatus(XFILE::SCacheStatus *status);
+ int64_t GetLength() override;
+ virtual bool IsEOF() override;
+ virtual CDVDInputStream::ENextStream NextStream() override;
+ virtual bool Open() override;
+ virtual bool Pause(double dTime)override { return false; };
+ virtual int Read(uint8_t* buf, int buf_size) override;
+ virtual int64_t Seek(int64_t offset, int whence) override;
+ virtual void SetReadRate(unsigned rate) override;
+
+protected:
+ IVideoPlayer* m_pPlayer;
+ std::vector<std::string> m_filenames;
+};
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiStreams.h b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiStreams.h
new file mode 100644
index 0000000000..632c474c80
--- /dev/null
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamMultiStreams.h
@@ -0,0 +1,42 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2015 Team XBMC
+ * http://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, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "DVDInputStream.h"
+
+#include <string>
+#include <vector>
+
+typedef std::shared_ptr<CDVDInputStream> InputStreamPtr;
+class IDVDPlayer;
+
+class InputStreamMultiStreams : public CDVDInputStream
+{
+
+public:
+ InputStreamMultiStreams(DVDStreamType type, CFileItem& fileitem)
+ : CDVDInputStream(type, fileitem) {}
+
+ virtual ~InputStreamMultiStreams() {};
+
+protected:
+ std::vector<InputStreamPtr> m_InputStreams; // input streams for current playing file
+};
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/Makefile b/xbmc/cores/VideoPlayer/DVDInputStreams/Makefile
index f7c26593d1..1809e63613 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/Makefile
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/Makefile
@@ -12,6 +12,7 @@ SRCS= DVDFactoryInputStream.cpp \
DVDInputStreamPVRManager.cpp \
DVDInputStreamStack.cpp \
InputStreamAddon.cpp \
+ InputStreamMultiSource.cpp\
DVDStateSerializer.cpp \
LIB= DVDInputStreams.a
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
index 11f1b21161..853bd2e852 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
@@ -779,7 +779,7 @@ bool CVideoPlayer::OpenInputStream()
m_item.SetPath(g_mediaManager.TranslateDevicePath(""));
}
- m_pInputStream = CDVDFactoryInputStream::CreateInputStream(this, m_item);
+ m_pInputStream = CDVDFactoryInputStream::CreateInputStream(this, m_item, true);
if(m_pInputStream == NULL)
{
CLog::Log(LOGERROR, "CVideoPlayer::OpenInputStream - unable to create input stream for [%s]", m_item.GetPath().c_str());