F56A084B0F4A18FB003F9F87 /* karaokewindowbackground.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56A084A0F4A18FB003F9F87 /* karaokewindowbackground.cpp */; };
F56A08E00F4D3C20003F9F87 /* GUITexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56A08DF0F4D3C20003F9F87 /* GUITexture.cpp */; };
F56A08E50F4D3C2E003F9F87 /* GUITextureGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56A08E20F4D3C2E003F9F87 /* GUITextureGL.cpp */; };
+ F57A83E912D3C713000525C5 /* FileUDF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A83E812D3C713000525C5 /* FileUDF.cpp */; };
+ F57A83F812D3C764000525C5 /* UDFDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A83F712D3C764000525C5 /* UDFDirectory.cpp */; };
+ F57A840112D3C775000525C5 /* udf25.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A840012D3C775000525C5 /* udf25.cpp */; };
+ F57A840C12D3C7CD000525C5 /* udf25.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A840012D3C775000525C5 /* udf25.cpp */; };
+ F57A840D12D3C7D5000525C5 /* UDFDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A83F712D3C764000525C5 /* UDFDirectory.cpp */; };
+ F57A840E12D3C7E1000525C5 /* FileUDF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57A83E812D3C713000525C5 /* FileUDF.cpp */; };
F57B6F801071B8B500079ACB /* JobManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57B6F7E1071B8B500079ACB /* JobManager.cpp */; };
F57B6F811071B8B500079ACB /* JobManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F57B6F7E1071B8B500079ACB /* JobManager.cpp */; };
F57E213F0E3C3AB300700C9D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F57E213E0E3C3AB200700C9D /* libiconv.dylib */; };
F56A08DF0F4D3C20003F9F87 /* GUITexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUITexture.cpp; sourceTree = "<group>"; };
F56A08E20F4D3C2E003F9F87 /* GUITextureGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUITextureGL.cpp; sourceTree = "<group>"; };
F56A08E30F4D3C2E003F9F87 /* GUITextureGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUITextureGL.h; sourceTree = "<group>"; };
+ F57A83E712D3C713000525C5 /* FileUDF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileUDF.h; sourceTree = "<group>"; };
+ F57A83E812D3C713000525C5 /* FileUDF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileUDF.cpp; sourceTree = "<group>"; };
+ F57A83F612D3C764000525C5 /* UDFDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UDFDirectory.h; sourceTree = "<group>"; };
+ F57A83F712D3C764000525C5 /* UDFDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UDFDirectory.cpp; sourceTree = "<group>"; };
+ F57A83FF12D3C775000525C5 /* udf25.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udf25.h; sourceTree = "<group>"; };
+ F57A840012D3C775000525C5 /* udf25.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = udf25.cpp; sourceTree = "<group>"; };
F57B6F7E1071B8B500079ACB /* JobManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JobManager.cpp; sourceTree = "<group>"; };
F57B6F7F1071B8B500079ACB /* JobManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JobManager.h; sourceTree = "<group>"; };
F57E213E0E3C3AB200700C9D /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = /opt/local/lib/libiconv.dylib; sourceTree = "<absolute>"; };
F584E1280F257BD800DB26A5 /* FileSpecialProtocol.h */,
E38E16DE0D25F9FA00618676 /* FileTuxBox.cpp */,
E38E16DF0D25F9FA00618676 /* FileTuxBox.h */,
+ F57A83E812D3C713000525C5 /* FileUDF.cpp */,
+ F57A83E712D3C713000525C5 /* FileUDF.h */,
F5DC880E110A4A0B00EE1B15 /* FileXBMSP.cpp */,
F5DC880D110A4A0B00EE1B15 /* FileXBMSP.h */,
E38E16E20D25F9FA00618676 /* FileZip.cpp */,
E38E17560D25F9FA00618676 /* SMBDirectory.h */,
E38E17590D25F9FA00618676 /* StackDirectory.cpp */,
E38E175A0D25F9FA00618676 /* StackDirectory.h */,
+ F57A840012D3C775000525C5 /* udf25.cpp */,
+ F57A83FF12D3C775000525C5 /* udf25.h */,
+ F57A83F712D3C764000525C5 /* UDFDirectory.cpp */,
+ F57A83F612D3C764000525C5 /* UDFDirectory.h */,
E38E175B0D25F9FA00618676 /* UPnPDirectory.cpp */,
E38E175C0D25F9FA00618676 /* UPnPDirectory.h */,
F5FAB0750EFABE2C00BAD4AE /* VTPDirectory.cpp */,
C8D0B2AF1265A9A800F0C0AC /* SystemGlobals.cpp in Sources */,
7CBEBB8412912BA400431822 /* fstrcmp.c in Sources */,
184C472F1296BC6E0006DB3E /* Service.cpp in Sources */,
+ F57A83E912D3C713000525C5 /* FileUDF.cpp in Sources */,
+ F57A83F812D3C764000525C5 /* UDFDirectory.cpp in Sources */,
+ F57A840112D3C775000525C5 /* udf25.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C8D0B2B01265A9A800F0C0AC /* SystemGlobals.cpp in Sources */,
7CBEBB8312912BA300431822 /* fstrcmp.c in Sources */,
184C47301296BC6E0006DB3E /* Service.cpp in Sources */,
+ F57A840C12D3C7CD000525C5 /* udf25.cpp in Sources */,
+ F57A840D12D3C7D5000525C5 /* UDFDirectory.cpp in Sources */,
+ F57A840E12D3C7E1000525C5 /* FileUDF.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\CrystalHD.cpp" />
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamBluray.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.cpp" />
+ <ClCompile Include="..\..\xbmc\FileSystem\FileUDF.cpp" />
+ <ClCompile Include="..\..\xbmc\FileSystem\udf25.cpp" />
+ <ClCompile Include="..\..\xbmc\FileSystem\UDFDirectory.cpp" />
<ClCompile Include="..\..\xbmc\FileSystem\VideoDatabaseDirectory\DirectoryNodeCountry.cpp" />
<ClCompile Include="..\..\xbmc\GUIDialogAddonInfo.cpp" />
<ClCompile Include="..\..\xbmc\GUIDialogTextViewer.cpp" />
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\CrystalHD.h" />
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamBluray.h" />
<ClInclude Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.h" />
+ <ClInclude Include="..\..\xbmc\FileSystem\FileUDF.h" />
+ <ClInclude Include="..\..\xbmc\FileSystem\udf25.h" />
+ <ClInclude Include="..\..\xbmc\FileSystem\UDFDirectory.h" />
<ClInclude Include="..\..\xbmc\FileSystem\VideoDatabaseDirectory\DirectoryNodeCountry.h" />
<ClInclude Include="..\..\xbmc\GUIDialogAddonInfo.h" />
<ClInclude Include="..\..\xbmc\GUIDialogTextViewer.h" />
<ClCompile Include="..\..\xbmc\addons\Service.cpp">
<Filter>Source Files\Addons</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\FileSystem\FileUDF.cpp">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\FileSystem\udf25.cpp">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\FileSystem\UDFDirectory.cpp">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\NetworkWin32.h">
<ClInclude Include="..\..\xbmc\addons\Service.h">
<Filter>Source Files\Addons</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\FileSystem\FileUDF.h">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\FileSystem\udf25.h">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\FileSystem\UDFDirectory.h">
+ <Filter>Source Files\Filesystem</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\xbmc\win32\XBMC.ico">
CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IDVDPlayer* pPlayer, const std::string& file, const std::string& content)
{
CFileItem item(file.c_str(), false);
- if (item.IsDVDFile(false, true) || item.IsDVDImage() ||
+ if (content != "bluray/iso" && (item.IsDVDFile(false, true) || item.IsDVDImage() ||
#ifdef HAS_DVD_DRIVE
- file.compare(g_mediaManager.TranslateDevicePath("")) == 0 )
+ file.compare(g_mediaManager.TranslateDevicePath("")) == 0 ))
#else
- 0 )
+ 0 ))
#endif
{
return (new CDVDInputStreamNavigator(pPlayer));
}
#ifdef HAVE_LIBBLURAY
- else if (item.IsType(".bdmv") || item.IsType(".mpls"))
+ else if (item.IsType(".bdmv") || item.IsType(".mpls") || content == "bluray/iso")
return new CDVDInputStreamBluray();
#endif
else if(file.substr(0, 6) == "rtp://"
using namespace std;
using namespace XFILE;
+static bool is_udf_iso_path(const char* filename)
+{
+ bool bResult = false;
+
+ const char* ptr = strcasestr(filename, ".iso");
+ if(ptr)
+ {
+ ptr += strlen(".iso");
+ if(*ptr == '/' && strlen(++ptr) > 0)
+ {
+ bResult = true;
+ }
+ }
+ return bResult;
+}
+
static void file_close(BD_FILE_H *file)
{
if (file)
{
BD_FILE_H *file = new BD_FILE_H;
- CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Opening file %s... (%p)", filename, file);
+ CStdString strFilename(filename);
+
+ if(is_udf_iso_path(filename))
+ {
+ CUtil::URLEncode(strFilename);
+ strFilename.Format("udf://%s", strFilename);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Opening file udf iso file %s... (%p)", strFilename.c_str(), file);
+ }
+ else
+ {
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Opening file %s... (%p)", strFilename.c_str(), file);
+ }
+
file->close = file_close;
file->seek = file_seek;
file->read = file_read;
file->eof = file_eof;
CFile* fp = new CFile();
- if(fp->Open(filename))
+ if(fp->Open(strFilename))
{
file->internal = (void*)fp;
return file;
struct SDirState
{
- SDirState()
+ SDirState()
: curr(0)
{}
static BD_DIR_H *dir_open(const char* dirname)
{
CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Opening dir %s\n", dirname);
-
-
SDirState *st = new SDirState();
- if(!CDirectory::GetDirectory(dirname, st->list))
+ CStdString strDirname(dirname);
+ if(is_udf_iso_path(dirname))
+ {
+ CUtil::URLEncode(strDirname);
+ strDirname.Format("udf://%s", strDirname);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Opening udf dir %s...", strDirname.c_str());
+ }
+
+ if(!CDirectory::GetDirectory(strDirname, st->list))
{
CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - Error opening dir! (%s)\n", dirname);
delete st;
t = m_dll->bd_get_title_info(m_bd, i);;
if(!t)
{
- CLog::Log(LOGDEBUG, "get_playlist_title - unable to get title %d", i);
+ CLog::Log(LOGDEBUG, "get_playlist_title - unable to get title %d", i);
continue;
}
if(t->playlist == playlist)
int64_t pos = m_dll->bd_seek(m_bd, offset);
if(pos < 0)
{
- CLog::Log(LOGERROR, "CDVDInputStreamBluray::Seek - seek to %"PRId64", failed with %"PRId64, offset, pos);
+ CLog::Log(LOGERROR, "CDVDInputStreamBluray::Seek - seek to %"PRId64", failed with %"PRId64, offset, pos);
return -1;
}
if(pos != offset)
- CLog::Log(LOGWARNING, "CDVDInputStreamBluray::Seek - seek to %"PRId64", ended at %"PRId64, offset, pos);
+ CLog::Log(LOGWARNING, "CDVDInputStreamBluray::Seek - seek to %"PRId64", ended at %"PRId64, offset, pos);
return offset;
#else
{
m_filename = g_mediaManager.TranslateDevicePath("");
}
-
+retry:
m_pInputStream = CDVDFactoryInputStream::CreateInputStream(this, m_filename, m_mimetype);
if(m_pInputStream == NULL)
{
if (!m_pInputStream->Open(m_filename.c_str(), m_mimetype))
{
+ if(m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
+ {
+ CLog::Log(LOGERROR, "CDVDPlayer::OpenInputStream - failed to open [%s] as DVD ISO, trying Bluray", m_filename.c_str());
+ m_mimetype = "bluray/iso";
+ filename = m_filename;
+ filename = filename + "/BDMV/index.bdmv";
+ int title = m_item.GetPropertyInt("BlurayStartingTitle");
+ if( title )
+ filename.AppendFormat("?title=%d",title);
+
+ m_filename = filename;
+ goto retry;
+ }
CLog::Log(LOGERROR, "CDVDPlayer::OpenInputStream - error opening [%s]", m_filename.c_str());
return false;
}
#ifndef strcasecmp
#define strcasecmp strcmpi
#endif
+#ifndef strncasecmp
+#define strncasecmp strnicmp
+#endif
#define INT16_MAX SHRT_MAX
#define INT16_MIN SHRT_MIN
extern "C" char * strptime(const char *buf, const char *fmt, struct tm *tm);
extern "C" int strverscmp (const char *s1, const char *s2);
+extern "C" char * strcasestr(const char* haystack, const char* needle);
#endif // _WIN32
SetThreadExecutionState(ES_SYSTEM_REQUIRED);
CStopWatch::StartZero();
}
+
+extern "C"
+{
+ /* case-independent string matching, similar to strstr but
+ * matching */
+ char * strcasestr(const char* haystack, const char* needle)
+ {
+ int i;
+ int nlength = (int) strlen (needle);
+ int hlength = (int) strlen (haystack);
+
+ if (nlength > hlength) return NULL;
+ if (hlength <= 0) return NULL;
+ if (nlength <= 0) return (char *)haystack;
+ /* hlength and nlength > 0, nlength <= hlength */
+ for (i = 0; i <= (hlength - nlength); i++)
+ {
+ if (strncasecmp (haystack + i, needle, nlength) == 0)
+ {
+ return (char *)haystack + i;
+ }
+ }
+ /* substring not found */
+ return NULL;
+ }
+}