aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelupus <elupus@xbmc.org>2011-10-08 15:08:45 +0200
committerelupus <elupus@xbmc.org>2012-04-10 23:17:24 +0200
commit2c8525f89a48de8de42b8208156dc663a2e49000 (patch)
treee5cc330029dbf6bcf4a8631775145b943c128e49
parent3aad05e08382e6938c27c37d50e8a8c426bf9835 (diff)
[bluray] Check if disk is encrypted and log messages about lack of libs to decrypt
-rw-r--r--lib/DllLibbluray.h3
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp40
2 files changed, 43 insertions, 0 deletions
diff --git a/lib/DllLibbluray.h b/lib/DllLibbluray.h
index e5db1ce68e..5fe535ae64 100644
--- a/lib/DllLibbluray.h
+++ b/lib/DllLibbluray.h
@@ -68,6 +68,7 @@ public:
virtual void bd_set_debug_mask(uint32_t mask)=0;
virtual uint32_t bd_get_debug_mask(void)=0;
#endif
+ virtual const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd)=0;
};
class DllLibbluray : public DllDynamic, DllLibblurayInterface
@@ -109,6 +110,7 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
DEFINE_METHOD1(void, bd_set_debug_mask, (uint32_t p1))
DEFINE_METHOD0(uint32_t, bd_get_debug_mask)
#endif
+ DEFINE_METHOD1(const BLURAY_DISC_INFO*, bd_get_disc_info, (BLURAY *p1))
BEGIN_METHOD_RESOLVE()
RESOLVE_METHOD(bd_get_titles)
@@ -140,6 +142,7 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
RESOLVE_METHOD(bd_set_debug_mask)
RESOLVE_METHOD(bd_get_debug_mask)
#endif
+ RESOLVE_METHOD(bd_get_disc_info)
END_METHOD_RESOLVE()
#ifdef HAVE_LIBBBLURAY_HAVE_LIBBLURAY_NOANGLE
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index 8e0b4ca415..ae4a6132ba 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
@@ -315,6 +315,46 @@ bool CDVDInputStreamBluray::Open(const char* strFile, const std::string& content
return false;
}
+ const BLURAY_DISC_INFO *disc_info;
+
+ disc_info = m_dll->bd_get_disc_info(m_bd);
+
+ if (!disc_info)
+ {
+ CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - bd_get_disc_info() failed");
+ return false;
+ }
+
+ if (disc_info->bluray_detected)
+ {
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - First Play supported: %d", disc_info->first_play_supported);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - Top menu supported : %d", disc_info->top_menu_supported);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - HDMV titles : %d", disc_info->num_hdmv_titles);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - BD-J titles : %d", disc_info->num_bdj_titles);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - UNSUPPORTED titles : %d", disc_info->num_unsupported_titles);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - AACS detected : %d", disc_info->aacs_detected);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - libaacs detected : %d", disc_info->libaacs_detected);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - AACS handled : %d", disc_info->aacs_handled);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - BD+ detected : %d", disc_info->bdplus_detected);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - libbdplus detected : %d", disc_info->libbdplus_detected);
+ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - BD+ handled : %d", disc_info->bdplus_handled);
+ }
+ else
+ CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - BluRay not detected");
+
+ if (disc_info->aacs_detected && !disc_info->aacs_handled)
+ {
+ CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - Media stream scrambled/encrypted with AACS");
+ return false;
+ }
+
+ if (disc_info->bdplus_detected && !disc_info->bdplus_handled)
+ {
+ CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - Media stream scrambled/encrypted with BD+");
+ return false;
+ }
+
+
CStdString filename = URIUtils::GetFileName(strFile);
if(filename.Equals("index.bdmv"))
{