Permalink
Browse files

Merge branch 'master' of https://github.com/droidron/xbmc into rbp

  • Loading branch information...
2 parents cbe3cda + 42b5719 commit a0a8726ab422739d680f9bda0003b0d8682cf518 user committed Jan 3, 2013
View
@@ -2723,7 +2723,7 @@ XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
CXX="$CXX" \
CFLAGS="$TEMPCFLAGS" \
CXXFLAGS="$CXXFLAGS" \
- `if test "$host_vendor" = "apple"; then echo --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
+ `if test "$host_vendor" = "apple"; then echo --with-png=${prefix} --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
--host=$host_alias \
--build=$build_alias \
@@ -12,24 +12,24 @@ CXXFLAGS+= \
RPATH=-Wl,-rpath=$(NATIVE_ROOT_PATH)/lib
ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
-NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
-ifdef NATIVE_ROOT_PATH
-ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
-DEFINES += -DTARGET_DARWIN
-NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
-RPATH=
-endif
-NATIVE_CXXFLAGS+= -I. \
- -I$(NATIVE_ROOT_PATH)/include \
- -I@abs_top_srcdir@/lib \
- -I@abs_top_srcdir@/xbmc \
- -I@abs_top_srcdir@/xbmc/linux
-NATIVE_LIBS += -L$(NATIVE_ROOT_PATH)/lib
-endif
-NATIVE_LIBS += -lSDL_image -lSDL -llzo2
-NATIVE_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
+ NATIVE_CXXFLAGS+= -I. \
+ -I@abs_top_srcdir@/lib \
+ -I@abs_top_srcdir@/xbmc \
+ -I@abs_top_srcdir@/xbmc/linux
+ NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
+ ifdef NATIVE_ROOT_PATH
+ ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
+ DEFINES += -DTARGET_DARWIN
+ NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
+ RPATH=
+ endif
+ NATIVE_CXXFLAGS+= -I$(NATIVE_ROOT_PATH)/include
+ NATIVE_LIBS += -L$(NATIVE_ROOT_PATH)/lib
+ endif
+ NATIVE_LIBS += -lSDL_image -lSDL -llzo2
+ NATIVE_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
else
-LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
+ LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
endif
LIBS += -lSDL_image -lSDL -llzo2
View
@@ -100,6 +100,7 @@ void CEpgContainer::Clear(bool bClearDb /* = false */)
m_epgs.clear();
m_iNextEpgUpdate = 0;
m_bIsInitialising = true;
+ m_iNextEpgId = 0;
}
/* clear the database entries */
@@ -174,6 +175,8 @@ void CEpgContainer::LoadFromDB(void)
if (!m_database.IsOpen())
m_database.Open();
+ m_iNextEpgId = m_database.GetLastEPGId();
+
bool bLoaded(true);
unsigned int iCounter(0);
if (m_database.IsOpen())
@@ -517,6 +520,18 @@ bool CEpgContainer::UpdateEPG(bool bOnlyPending /* = false */)
if (bShowProgress && !bOnlyPending)
UpdateProgressDialog(++iCounter, m_epgs.size(), epg->Name());
+ // we currently only support update via pvr add-ons. skip update when the pvr manager isn't started
+ if (!g_PVRManager.IsStarted())
+ continue;
+
+ // check the pvr manager when the channel pointer isn't set
+ if (!epg->Channel())
+ {
+ CPVRChannelPtr channel = g_PVRChannelGroups->GetChannelByEpgId(epg->EpgID());
+ if (channel)
+ epg->SetChannel(channel);
+ }
+
if ((!bOnlyPending || epg->UpdatePending()) && epg->Update(start, end, m_iUpdateTime, bOnlyPending))
iUpdatedTables++;
else if (!epg->IsValid())
View
@@ -414,3 +414,12 @@ int CEpgDatabase::Persist(const CEpgInfoTag &tag, bool bSingleUpdate /* = true *
return iReturn;
}
+
+int CEpgDatabase::GetLastEPGId(void)
+{
+ CStdString strQuery = FormatSQL("SELECT MAX(idEpg) FROM epg");
+ CStdString strValue = GetSingleValue(strQuery);
+ if (!strValue.empty())
+ return atoi(strValue.c_str());
+ return 0;
+}
View
@@ -138,6 +138,11 @@ namespace EPG
*/
virtual int Persist(const CEpgInfoTag &tag, bool bSingleUpdate = true);
+ /*!
+ * @return Last EPG id in the database
+ */
+ int GetLastEPGId(void);
+
//@}
protected:
View
@@ -277,9 +277,6 @@ void CPVRManager::Stop(void)
SetState(ManagerStateStopping);
- if (g_windowManager.GetActiveWindow() == WINDOW_PVR)
- g_windowManager.ActivateWindow(WINDOW_HOME);
-
/* stop the EPG updater, since it might be using the pvr add-ons */
g_EpgContainer.Stop();
@@ -379,6 +376,11 @@ void CPVRManager::Process(void)
CLog::Log(LOGNOTICE, "PVRManager - %s - no add-ons enabled anymore. restarting the pvrmanager", __FUNCTION__);
CApplicationMessenger::Get().ExecBuiltIn("StartPVRManager", false);
}
+ else
+ {
+ if (g_windowManager.GetActiveWindow() == WINDOW_PVR)
+ g_windowManager.ActivateWindow(WINDOW_HOME);
+ }
}
bool CPVRManager::SetWakeupCommand(void)
@@ -1070,10 +1070,16 @@ int CPVRChannelGroup::GetEPGAll(CFileItemList &results)
for (unsigned int iChannelPtr = 0; iChannelPtr < m_members.size(); iChannelPtr++)
{
- if (!m_members.at(iChannelPtr).channel || m_members.at(iChannelPtr).channel->IsHidden())
- continue;
-
- m_members.at(iChannelPtr).channel->GetEPG(results);
+ if (m_members.at(iChannelPtr).channel && !m_members.at(iChannelPtr).channel->IsHidden())
+ {
+ CEpg* epg = m_members.at(iChannelPtr).channel->GetEPG();
+ if (epg)
+ {
+ // XXX channel pointers aren't set in some occasions. this works around the issue, but is not very nice
+ epg->SetChannel(m_members.at(iChannelPtr).channel);
+ epg->Get(results);
+ }
+ }
}
return results.Size() - iInitialSize;
@@ -434,31 +434,37 @@ bool CPVRTimers::GetDirectory(const CStdString& strPath, CFileItemList &items) c
bool CPVRTimers::DeleteTimersOnChannel(const CPVRChannel &channel, bool bDeleteRepeating /* = true */, bool bCurrentlyActiveOnly /* = false */)
{
bool bReturn = false;
- CSingleLock lock(m_critSection);
-
- for (map<CDateTime, vector<CPVRTimerInfoTagPtr>* >::reverse_iterator it = m_tags.rbegin(); it != m_tags.rend(); it++)
{
- for (vector<CPVRTimerInfoTagPtr>::iterator timerIt = it->second->begin(); timerIt != it->second->end(); )
+ CSingleLock lock(m_critSection);
+
+ for (map<CDateTime, vector<CPVRTimerInfoTagPtr>* >::reverse_iterator it = m_tags.rbegin(); it != m_tags.rend(); it++)
{
- bool bDeleteActiveItem = !bCurrentlyActiveOnly ||
- (CDateTime::GetCurrentDateTime() > (*timerIt)->StartAsLocalTime() &&
- CDateTime::GetCurrentDateTime() < (*timerIt)->EndAsLocalTime());
- bool bDeleteRepeatingItem = bDeleteRepeating || !(*timerIt)->m_bIsRepeating;
- bool bChannelsMatch = (*timerIt)->ChannelNumber() == channel.ChannelNumber() &&
- (*timerIt)->m_bIsRadio == channel.IsRadio();
-
- if (bDeleteActiveItem && bDeleteRepeatingItem && bChannelsMatch)
- {
- bReturn = (*timerIt)->DeleteFromClient(true) || bReturn;
- timerIt = it->second->erase(timerIt);
- }
- else
+ for (vector<CPVRTimerInfoTagPtr>::iterator timerIt = it->second->begin(); timerIt != it->second->end(); )
{
- ++timerIt;
+ bool bDeleteActiveItem = !bCurrentlyActiveOnly ||
+ (CDateTime::GetCurrentDateTime() > (*timerIt)->StartAsLocalTime() &&
+ CDateTime::GetCurrentDateTime() < (*timerIt)->EndAsLocalTime());
+ bool bDeleteRepeatingItem = bDeleteRepeating || !(*timerIt)->m_bIsRepeating;
+ bool bChannelsMatch = (*timerIt)->ChannelNumber() == channel.ChannelNumber() &&
+ (*timerIt)->m_bIsRadio == channel.IsRadio();
+
+ if (bDeleteActiveItem && bDeleteRepeatingItem && bChannelsMatch)
+ {
+ CLog::Log(LOGDEBUG,"PVRTimers - %s - deleted timer %d on client %d", __FUNCTION__, (*timerIt)->m_iClientIndex, (*timerIt)->m_iClientId);
+ bReturn = (*timerIt)->DeleteFromClient(true) || bReturn;
+ timerIt = it->second->erase(timerIt);
+ SetChanged();
+ }
+ else
+ {
+ ++timerIt;
+ }
}
}
}
+ NotifyObservers(ObservableMessageTimersReset);
+
return bReturn;
}
@@ -3090,6 +3090,7 @@ CVideoInfoTag CVideoDatabase::GetDetailsByTypeAndId(VIDEODB_CONTENT_TYPE type, i
break;
case VIDEODB_CONTENT_MUSICVIDEOS:
GetMusicVideoInfo("", details, id);
+ break;
default:
break;
}
@@ -28,6 +28,7 @@
CEGLNativeTypeAmlogic::CEGLNativeTypeAmlogic()
{
+ m_nativeWindow = NULL;
}
CEGLNativeTypeAmlogic::~CEGLNativeTypeAmlogic()
@@ -101,7 +102,7 @@ bool CEGLNativeTypeAmlogic::DestroyNativeDisplay()
bool CEGLNativeTypeAmlogic::DestroyNativeWindow()
{
- free(m_nativeWindow);
+ delete (fbdev_window*)m_nativeWindow, m_nativeWindow = NULL;
return true;
}
@@ -407,7 +408,7 @@ void CEGLNativeTypeAmlogic::DisableFreeScale()
// revert display axis
int fd0;
- std::string framebuffer = "/dev/fbo";
+ std::string framebuffer = "/dev/fb0";
if ((fd0 = open(framebuffer.c_str(), O_RDWR)) >= 0)
{

0 comments on commit a0a8726

Please sign in to comment.