disabled mpeg4 for vdpau
authorbobo1on1 <bobo1on1@svn>
Sat, 24 Jul 2010 19:19:37 +0000 (19:19 +0000)
committerbobo1on1 <bobo1on1@svn>
Sat, 24 Jul 2010 19:19:37 +0000 (19:19 +0000)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@32131 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

xbmc/AdvancedSettings.cpp
xbmc/AdvancedSettings.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp

index 72f99e2..d5b80fe 100644 (file)
@@ -91,6 +91,7 @@ void CAdvancedSettings::Initialize()
   m_videoVDPAUScaling = false;
   m_videoNonLinStretchRatio = 0.5f;
   m_videoAllowLanczos3 = false;
+  m_videoAllowMpeg4VDPAU = false;
 
   m_musicUseTimeSeeking = true;
   m_musicTimeSeekForward = 10;
@@ -414,6 +415,7 @@ bool CAdvancedSettings::Load()
     XMLUtils::GetBoolean(pElement,"vdpauscaling",m_videoVDPAUScaling);
     XMLUtils::GetFloat(pElement, "nonlinearstretchratio", m_videoNonLinStretchRatio, 0.01f, 1.0f);
     XMLUtils::GetBoolean(pElement,"allowlanczos3",m_videoAllowLanczos3);
+    XMLUtils::GetBoolean(pElement,"allowmpeg4vdpau",m_videoAllowMpeg4VDPAU);
   }
 
   pElement = pRootElement->FirstChildElement("musiclibrary");
index 8adc19f..773412d 100644 (file)
@@ -108,6 +108,7 @@ class CAdvancedSettings
     bool  m_videoVDPAUScaling;
     float m_videoNonLinStretchRatio;
     bool  m_videoAllowLanczos3;
+    bool  m_videoAllowMpeg4VDPAU;
 
     CStdString m_videoDefaultPlayer;
     CStdString m_videoDefaultDVDPlayer;
index de9f009..e3a4e96 100644 (file)
@@ -182,6 +182,9 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
       if(pCodec->id == hints.codec
       && pCodec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
       {
+        if ((pCodec->id == CODEC_ID_MPEG4 || pCodec->id == CODEC_ID_XVID) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
+          continue;
+
         CLog::Log(LOGNOTICE,"CDVDVideoCodecFFmpeg::Open() Creating VDPAU(%ix%i, %d)",hints.width, hints.height, hints.codec);
         CVDPAU* vdp = new CVDPAU();
         m_pCodecContext->codec_id = hints.codec;