aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheuni <theuni-nospam-@xbmc.org>2012-01-20 19:19:57 -0500
committertheuni <theuni-nospam-@xbmc.org>2012-01-20 19:19:57 -0500
commitd4178b1d647afa6ac959af63788b5f719defaac7 (patch)
tree9a232e3478f14a35b9b825f0f514e2be24a5a97d
parent9ddc38a785346ee1cdfeb9f7915ebfc4786364ef (diff)
parentb6b04984cf5e631d43ba15fb0e9e6b648411a031 (diff)
Merge remote-tracking branch 'origin/master' into Eden
-rw-r--r--xbmc/Application.cpp1
-rw-r--r--xbmc/addons/AddonManager.cpp2
-rw-r--r--xbmc/cores/AudioRenderers/ALSADirectSound.cpp16
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp4
-rw-r--r--xbmc/interfaces/AnnouncementManager.cpp12
-rw-r--r--xbmc/settings/AdvancedSettings.cpp2
-rw-r--r--xbmc/settings/AdvancedSettings.h1
-rw-r--r--xbmc/settings/Settings.cpp3
-rw-r--r--xbmc/windows/GUIWindowLoginScreen.cpp3
9 files changed, 27 insertions, 17 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index fb7a45cb6e..a1c4d2dc37 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -1203,6 +1203,7 @@ bool CApplication::Initialize()
#ifdef HAS_JSONRPC
CJSONRPC::Initialize();
#endif
+ ADDON::CAddonMgr::Get().StartServices(false);
g_windowManager.ActivateWindow(g_SkinInfo->GetFirstWindow());
}
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index 26bf04f21e..4a61c7edb9 100644
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -760,7 +760,7 @@ bool CAddonMgr::StartServices(const bool beforelogin)
if (service)
{
if ( (beforelogin && service->GetStartOption() == CService::STARTUP)
- || (service->GetStartOption() == CService::LOGIN) )
+ || (!beforelogin && service->GetStartOption() == CService::LOGIN) )
ret &= service->Start();
}
}
diff --git a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
index 708c20a59d..1e766c365e 100644
--- a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
+++ b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
@@ -60,17 +60,8 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
PCM_FRONT_CENTER, PCM_LOW_FREQUENCY,
PCM_SIDE_LEFT , PCM_SIDE_RIGHT
};
- static enum PCMChannels HDMIChannelMap[] = { PCM_FRONT_LEFT, PCM_FRONT_RIGHT
- , PCM_FRONT_CENTER, PCM_LOW_FREQUENCY
- , PCM_BACK_LEFT, PCM_BACK_RIGHT
- , PCM_FRONT_LEFT_OF_CENTER, PCM_FRONT_RIGHT_OF_CENTER
- , PCM_BACK_CENTER, PCM_SIDE_LEFT, PCM_SIDE_RIGHT};
- CStdString deviceuse(device);
-
- enum PCMChannels *output_map = ALSAChannelMap;
- if((deviceuse + ":").Left(5) == "hdmi:")
- output_map = HDMIChannelMap;
+ CStdString deviceuse;
/* setup the channel mapping */
m_uiDataChannels = iChannels;
@@ -85,7 +76,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
while(outLayout[ch] != PCM_INVALID)
{
for(map = 0; map < 8; ++map)
- if (outLayout[ch] == output_map[map])
+ if (outLayout[ch] == ALSAChannelMap[map])
{
if (map > outChannels)
outChannels = map;
@@ -94,7 +85,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
++ch;
}
- m_remap.SetOutputFormat(++outChannels, output_map);
+ m_remap.SetOutputFormat(++outChannels, ALSAChannelMap);
if (m_remap.CanRemap())
{
iChannels = outChannels;
@@ -136,6 +127,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
snd_config_update();
snd_config_t *config = snd_config;
+ deviceuse = device;
nErr = snd_config_copy(&config, snd_config);
CHECK_ALSA_RETURN(LOGERROR,"config_copy",nErr);
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 5d94d1ca8f..5bfb733fb5 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -101,7 +101,9 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
}
#endif
#ifdef HAVE_LIBVA
- if(*cur == PIX_FMT_VAAPI_VLD && g_guiSettings.GetBool("videoplayer.usevaapi"))
+ // mpeg4 vaapi decoding is disabled
+ if(*cur == PIX_FMT_VAAPI_VLD && g_guiSettings.GetBool("videoplayer.usevaapi")
+ && (avctx->codec_id != CODEC_ID_MPEG4 || g_advancedSettings.m_videoAllowMpeg4VAAPI))
{
VAAPI::CDecoder* dec = new VAAPI::CDecoder();
if(dec->Open(avctx, *cur))
diff --git a/xbmc/interfaces/AnnouncementManager.cpp b/xbmc/interfaces/AnnouncementManager.cpp
index 166ad10f0b..6463112bd6 100644
--- a/xbmc/interfaces/AnnouncementManager.cpp
+++ b/xbmc/interfaces/AnnouncementManager.cpp
@@ -39,12 +39,18 @@ vector<IAnnouncer *> CAnnouncementManager::m_announcers;
void CAnnouncementManager::AddAnnouncer(IAnnouncer *listener)
{
+ if (!listener)
+ return;
+
CSingleLock lock (m_critSection);
m_announcers.push_back(listener);
}
void CAnnouncementManager::RemoveAnnouncer(IAnnouncer *listener)
{
+ if (!listener)
+ return;
+
CSingleLock lock (m_critSection);
for (unsigned int i = 0; i < m_announcers.size(); i++)
{
@@ -78,6 +84,12 @@ void CAnnouncementManager::Announce(EAnnouncementFlag flag, const char *sender,
void CAnnouncementManager::Announce(EAnnouncementFlag flag, const char *sender, const char *message, CFileItemPtr item, CVariant &data)
{
+ if (!item.get())
+ {
+ Announce(flag, sender, message, data);
+ return;
+ }
+
// Extract db id of item
CVariant object = data.isNull() || data.isObject() ? data : CVariant::VariantTypeObject;
CStdString type;
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index ea31ddc84a..a0e845d8c2 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -93,6 +93,7 @@ void CAdvancedSettings::Initialize()
m_videoEnableHighQualityHwScalers = false;
m_videoAutoScaleMaxFps = 30.0f;
m_videoAllowMpeg4VDPAU = false;
+ m_videoAllowMpeg4VAAPI = false;
m_videoDisableBackgroundDeinterlace = false;
m_videoCaptureUseOcclusionQuery = -1; //-1 is auto detect
m_DXVACheckCompatibility = false;
@@ -454,6 +455,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
XMLUtils::GetBoolean(pElement,"enablehighqualityhwscalers", m_videoEnableHighQualityHwScalers);
XMLUtils::GetFloat(pElement,"autoscalemaxfps",m_videoAutoScaleMaxFps, 0.0f, 1000.0f);
XMLUtils::GetBoolean(pElement,"allowmpeg4vdpau",m_videoAllowMpeg4VDPAU);
+ XMLUtils::GetBoolean(pElement,"allowmpeg4vaapi",m_videoAllowMpeg4VAAPI);
XMLUtils::GetBoolean(pElement, "disablebackgrounddeinterlace", m_videoDisableBackgroundDeinterlace);
XMLUtils::GetInt(pElement, "useocclusionquery", m_videoCaptureUseOcclusionQuery, -1, 1);
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index bb7062bac7..47e25fc96f 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -123,6 +123,7 @@ class CAdvancedSettings
bool m_videoEnableHighQualityHwScalers;
float m_videoAutoScaleMaxFps;
bool m_videoAllowMpeg4VDPAU;
+ bool m_videoAllowMpeg4VAAPI;
std::vector<RefreshOverride> m_videoAdjustRefreshOverrides;
bool m_videoDisableBackgroundDeinterlace;
int m_videoCaptureUseOcclusionQuery;
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 686172e9fb..6d266934a3 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -57,7 +57,6 @@
#include "utils/URIUtils.h"
#include "input/MouseStat.h"
#include "filesystem/File.h"
-#include "addons/AddonManager.h"
using namespace std;
using namespace XFILE;
@@ -983,8 +982,6 @@ bool CSettings::LoadProfile(unsigned int index)
CUtil::DeleteMusicDatabaseDirectoryCache();
CUtil::DeleteVideoDatabaseDirectoryCache();
- ADDON::CAddonMgr::Get().StartServices(false);
-
return true;
}
diff --git a/xbmc/windows/GUIWindowLoginScreen.cpp b/xbmc/windows/GUIWindowLoginScreen.cpp
index 50ef84c58c..c07e88ce82 100644
--- a/xbmc/windows/GUIWindowLoginScreen.cpp
+++ b/xbmc/windows/GUIWindowLoginScreen.cpp
@@ -45,6 +45,7 @@
#include "settings/GUISettings.h"
#include "FileItem.h"
#include "guilib/LocalizeStrings.h"
+#include "addons/AddonManager.h"
#define CONTROL_BIG_LIST 52
#define CONTROL_LABEL_HEADER 2
@@ -296,6 +297,8 @@ void CGUIWindowLoginScreen::LoadProfile(unsigned int profile)
JSONRPC::CJSONRPC::Initialize();
#endif
+ ADDON::CAddonMgr::Get().StartServices(false);
+
g_windowManager.ChangeActiveWindow(g_SkinInfo->GetFirstWindow());
g_application.UpdateLibraries();