aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2014-08-25 12:02:31 +0200
committerRainer Hochecker <fernetmenta@online.de>2014-08-25 12:02:31 +0200
commitf60bdf7715b6808f85a549a32d0e422e23bf765f (patch)
treeba3d52b5531b16089021a12bc3017ce064870b6b
parentfe0970cafcec61739835047f0d7ed81fa074e2b4 (diff)
parenta99bdfe6a92e93f3da45513b23d8c49644471ce5 (diff)
Merge pull request #5269 from FernetMenta/pvr
pvr: fix deadlock caused by pollling channel group name
-rw-r--r--xbmc/GUIInfoManager.cpp2
-rw-r--r--xbmc/pvr/PVRGUIInfo.cpp7
-rw-r--r--xbmc/pvr/PVRGUIInfo.h6
-rw-r--r--xbmc/pvr/PVRManager.cpp5
-rw-r--r--xbmc/pvr/PVRManager.h6
5 files changed, 25 insertions, 1 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 617faa65b8..c262c1bb24 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -3829,7 +3829,7 @@ CStdString CGUIInfoManager::GetVideoLabel(int item)
case VIDEOPLAYER_CHANNEL_GROUP:
{
if (tag && !tag->IsRadio())
- return g_PVRManager.GetPlayingGroup(false)->GroupName();
+ return g_PVRManager.GetPlayingTVGroupName();
}
}
}
diff --git a/xbmc/pvr/PVRGUIInfo.cpp b/xbmc/pvr/PVRGUIInfo.cpp
index 14872821f1..4c6cfdb723 100644
--- a/xbmc/pvr/PVRGUIInfo.cpp
+++ b/xbmc/pvr/PVRGUIInfo.cpp
@@ -258,6 +258,7 @@ void CPVRGUIInfo::UpdateMisc(void)
bool bIsPlayingEncryptedStream = bStarted && g_PVRClients->IsEncrypted();
bool bHasTVChannels = bStarted && g_PVRChannelGroups->GetGroupAllTV()->HasChannels();
bool bHasRadioChannels = bStarted && g_PVRChannelGroups->GetGroupAllRadio()->HasChannels();
+ std::string strPlayingTVGroup = (bStarted && bIsPlayingTV) ? g_PVRManager.GetPlayingGroup(false)->GroupName() : "";
/* safe to fetch these unlocked, since they're updated from the same thread as this one */
bool bHasNonRecordingTimers = bStarted && m_iTimerAmount - m_iRecordingTimerAmount > 0;
@@ -272,6 +273,7 @@ void CPVRGUIInfo::UpdateMisc(void)
m_bIsPlayingEncryptedStream = bIsPlayingEncryptedStream;
m_bHasTVChannels = bHasTVChannels;
m_bHasRadioChannels = bHasRadioChannels;
+ m_strPlayingTVGroup = strPlayingTVGroup;
}
bool CPVRGUIInfo::TranslateCharInfo(DWORD dwInfo, std::string &strValue) const
@@ -898,3 +900,8 @@ void CPVRGUIInfo::UpdatePlayingTag(void)
m_iDuration = recording.GetDuration() * 1000;
}
}
+
+std::string CPVRGUIInfo::GetPlayingTVGroup()
+{
+ return m_strPlayingTVGroup;
+}
diff --git a/xbmc/pvr/PVRGUIInfo.h b/xbmc/pvr/PVRGUIInfo.h
index 0d1500eca2..c8f8f4303e 100644
--- a/xbmc/pvr/PVRGUIInfo.h
+++ b/xbmc/pvr/PVRGUIInfo.h
@@ -77,6 +77,11 @@ namespace PVR
bool GetPlayingTag(EPG::CEpgInfoTag &tag) const;
+ /*!
+ * @brief Get playing TV group.
+ */
+ std::string GetPlayingTVGroup();
+
private:
void ResetProperties(void);
void ClearQualityInfo(PVR_SIGNAL_STATUS &qualityInfo);
@@ -162,6 +167,7 @@ namespace PVR
bool m_bIsPlayingEncryptedStream;
bool m_bHasTVChannels;
bool m_bHasRadioChannels;
+ std::string m_strPlayingTVGroup;
//@}
PVR_SIGNAL_STATUS m_qualityInfo; /*!< stream quality information */
diff --git a/xbmc/pvr/PVRManager.cpp b/xbmc/pvr/PVRManager.cpp
index dc5a85e310..ee7770f276 100644
--- a/xbmc/pvr/PVRManager.cpp
+++ b/xbmc/pvr/PVRManager.cpp
@@ -1614,3 +1614,8 @@ bool CPVRManager::CreateChannelEpgs(void)
m_bEpgsCreated = m_channelGroups->CreateChannelEpgs();
return m_bEpgsCreated;
}
+
+std::string CPVRManager::GetPlayingTVGroupName()
+{
+ return IsStarted() && m_guiInfo ? m_guiInfo->GetPlayingTVGroup() : "";
+}
diff --git a/xbmc/pvr/PVRManager.h b/xbmc/pvr/PVRManager.h
index 67ff282b73..652e5e5c86 100644
--- a/xbmc/pvr/PVRManager.h
+++ b/xbmc/pvr/PVRManager.h
@@ -548,6 +548,12 @@ namespace PVR
*/
bool CreateChannelEpgs(void);
+ /*!
+ * @brief get the name of the channel group of the current playing channel
+ * @return name of channel if tv channel is playing
+ */
+ std::string GetPlayingTVGroupName();
+
protected:
/*!
* @brief PVR update and control thread.