Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
reverted: parts of r30578 that are unfortunately still used on non-win32
Browse files Browse the repository at this point in the history
(cherry picked from commit dfb11d8644c3af05a3aebc9f3e4ce435a34170e9)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33268 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
anssih committed Aug 28, 2010
1 parent b517fbc commit c238b87
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions xbmc/DetectDVDType.cpp
Expand Up @@ -129,6 +129,8 @@ VOID CDetectDVDMedia::UpdateDvdrom()
case DRIVE_OPEN:
{
// Send Message to GUI that disc been ejected
SetNewDVDShareUrl("D:\\", false, g_localizeStrings.Get(502));
m_isoReader.Reset();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_REMOVED_MEDIA);
g_windowManager.SendThreadMessage( msg );
waitLock.Leave();
Expand All @@ -140,6 +142,8 @@ VOID CDetectDVDMedia::UpdateDvdrom()
case DRIVE_NOT_READY:
{
// drive is not ready (closing, opening)
m_isoReader.Reset();
SetNewDVDShareUrl("D:\\", false, g_localizeStrings.Get(503));
m_DriveState = DRIVE_NOT_READY;
// DVD-ROM in undefined state
// better delete old CD Information
Expand All @@ -160,6 +164,8 @@ VOID CDetectDVDMedia::UpdateDvdrom()
case DRIVE_CLOSED_NO_MEDIA:
{
// nothing in there...
m_isoReader.Reset();
SetNewDVDShareUrl("D:\\", false, g_localizeStrings.Get(504));
m_DriveState = DRIVE_CLOSED_NO_MEDIA;
// Send Message to GUI that disc has changed
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_SOURCES);
Expand Down Expand Up @@ -231,6 +237,39 @@ void CDetectDVDMedia::DetectMediaType()
m_pCdInfo->GetTrackCount(),
m_pCdInfo->GetAudioTrackCount(),
m_pCdInfo->GetDataTrackCount() );

// Detect ISO9660(mode1/mode2), CDDA filesystem or UDF
if (m_pCdInfo->IsISOHFS(1) || m_pCdInfo->IsIso9660(1) || m_pCdInfo->IsIso9660Interactive(1))
{
strNewUrl = "iso9660://";
m_isoReader.Scan();
}
else
{
if (m_pCdInfo->IsUDF(1) || m_pCdInfo->IsUDFX(1))
strNewUrl = "D:\\";
else if (m_pCdInfo->IsAudio(1))
{
strNewUrl = "cdda://local/";
bCDDA = true;
}
else
strNewUrl = "D:\\";
}

if (m_pCdInfo->IsISOUDF(1))
{
if (!g_advancedSettings.m_detectAsUdf)
{
strNewUrl = "iso9660://";
m_isoReader.Scan();
}
else
{
strNewUrl = "D:\\";
}
}

CLog::Log(LOGINFO, "Using protocol %s", strNewUrl.c_str());

if (m_pCdInfo->IsValidFs())
Expand Down

0 comments on commit c238b87

Please sign in to comment.