diff options
-rw-r--r-- | addons/skin.confluence/720p/VideoFullScreen.xml | 82 | ||||
-rwxr-xr-x | language/English/strings.po | 15 | ||||
-rw-r--r-- | project/Win32BuildSetup/buildpvraddons.bat | 2 | ||||
-rw-r--r-- | tools/depends/target/xbmc-pvr-addons/Makefile | 2 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 8 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.h | 5 | ||||
-rw-r--r-- | xbmc/addons/include/xbmc_pvr_dll.h | 23 | ||||
-rw-r--r-- | xbmc/addons/include/xbmc_pvr_types.h | 10 | ||||
-rw-r--r-- | xbmc/pvr/PVRGUIInfo.cpp | 39 | ||||
-rw-r--r-- | xbmc/pvr/PVRGUIInfo.h | 3 | ||||
-rw-r--r-- | xbmc/pvr/addons/PVRClient.cpp | 47 | ||||
-rw-r--r-- | xbmc/pvr/addons/PVRClient.h | 15 | ||||
-rw-r--r-- | xbmc/pvr/addons/PVRClients.cpp | 39 | ||||
-rw-r--r-- | xbmc/pvr/addons/PVRClients.h | 4 |
14 files changed, 279 insertions, 15 deletions
diff --git a/addons/skin.confluence/720p/VideoFullScreen.xml b/addons/skin.confluence/720p/VideoFullScreen.xml index 7ffc77ce53..a6397fe4ad 100644 --- a/addons/skin.confluence/720p/VideoFullScreen.xml +++ b/addons/skin.confluence/720p/VideoFullScreen.xml @@ -595,7 +595,7 @@ <description>BER value</description> <left>220</left> <top>165</top> - <width>1000</width> + <width>165</width> <height>25</height> <label>$INFO[PVR.ActStreamBER]</label> <align>left</align> @@ -605,7 +605,7 @@ </control> <control type="label"> <description>UNC</description> - <left>430</left> + <left>390</left> <top>165</top> <width>165</width> <height>25</height> @@ -617,9 +617,9 @@ </control> <control type="label"> <description>UNC value</description> - <left>600</left> + <left>560</left> <top>165</top> - <width>1000</width> + <width>165</width> <height>25</height> <label>$INFO[PVR.ActStreamUNC]</label> <align>left</align> @@ -628,6 +628,30 @@ <textcolor>white</textcolor> </control> <control type="label"> + <description>Service</description> + <left>730</left> + <top>165</top> + <width>165</width> + <height>25</height> + <label>$LOCALIZE[19099]:</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>grey2</textcolor> + </control> + <control type="label"> + <description>Service value</description> + <left>900</left> + <top>165</top> + <width>330</width> + <height>25</height> + <label>$INFO[PVR.ActStreamServiceName]</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>white</textcolor> + </control> + <control type="label"> <description>Encryption</description> <left>50</left> <top>190</top> @@ -643,7 +667,7 @@ <description>Encryption value</description> <left>220</left> <top>190</top> - <width>1000</width> + <width>165</width> <height>25</height> <label>$INFO[PVR.ActStreamEncryptionName]</label> <align>left</align> @@ -651,6 +675,54 @@ <font>font12</font> <textcolor>white</textcolor> </control> + <control type="label"> + <description>Provider</description> + <left>390</left> + <top>190</top> + <width>165</width> + <height>25</height> + <label>$LOCALIZE[19101]:</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>grey2</textcolor> + </control> + <control type="label"> + <description>Provider value</description> + <left>560</left> + <top>190</top> + <width>165</width> + <height>25</height> + <label>$INFO[PVR.ActStreamProviderName]</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>white</textcolor> + </control> + <control type="label"> + <description>Mux</description> + <left>730</left> + <top>190</top> + <width>165</width> + <height>25</height> + <label>$LOCALIZE[19100]:</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>grey2</textcolor> + </control> + <control type="label"> + <description>Mux value</description> + <left>900</left> + <top>190</top> + <width>330</width> + <height>25</height> + <label>$INFO[PVR.ActStreamMux]</label> + <align>left</align> + <aligny>center</aligny> + <font>font12</font> + <textcolor>white</textcolor> + </control> </control> </controls> </window> diff --git a/language/English/strings.po b/language/English/strings.po index 045b3dd73d..01c8f7b3e9 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -7562,7 +7562,20 @@ msgctxt "#19098" msgid "Warning" msgstr "" -#empty strings from id 19099 to 19101 +#: xbmc/pvr/PVRGUIInfo.cpp +msgctxt "#19099" +msgid "Service" +msgstr "" + +#: xbmc/pvr/PVRGUIInfo.cpp +msgctxt "#19100" +msgid "Mux" +msgstr "" + +#: xbmc/pvr/PVRGUIInfo.cpp +msgctxt "#19101" +msgid "Provider" +msgstr "" msgctxt "#19102" msgid "Please switch to another channel." diff --git a/project/Win32BuildSetup/buildpvraddons.bat b/project/Win32BuildSetup/buildpvraddons.bat index 6709cf26dc..5ee749e1b9 100644 --- a/project/Win32BuildSetup/buildpvraddons.bat +++ b/project/Win32BuildSetup/buildpvraddons.bat @@ -9,7 +9,7 @@ SET DEPS_DIR=..\BuildDependencies SET TMP_DIR=%DEPS_DIR%\tmp SET LIBNAME=xbmc-pvr-addons -SET VERSION=18597fd733003e3a7edfedc284b36428c4b97647 +SET VERSION=accba457b54f0a2f85b56d3b1bab1790b6fcd656 SET SOURCE=%LIBNAME% SET GIT_URL=git://github.com/opdenkamp/%LIBNAME%.git SET SOURCE_DIR=%TMP_DIR%\%SOURCE% diff --git a/tools/depends/target/xbmc-pvr-addons/Makefile b/tools/depends/target/xbmc-pvr-addons/Makefile index b7678c4dbf..691d59f3e8 100644 --- a/tools/depends/target/xbmc-pvr-addons/Makefile +++ b/tools/depends/target/xbmc-pvr-addons/Makefile @@ -2,7 +2,7 @@ include ../../Makefile.include #DEPS= ../../Makefile.include Makefile LIBNAME=xbmc-pvr-addons -VERSION=18597fd733003e3a7edfedc284b36428c4b97647 +VERSION=accba457b54f0a2f85b56d3b1bab1790b6fcd656 GIT_DIR=$(TARBALLS_LOCATION)/$(LIBNAME).git BASE_URL=git://github.com/opdenkamp/$(LIBNAME).git DYLIB=$(PLATFORM)/addons/pvr.demo/.libs/libpvrdemo-addon.so diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 49985a4538..d69c23178b 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -665,7 +665,10 @@ const infomap pvr[] = {{ "isrecording", PVR_IS_RECORDING { "actstreamprogrsignal", PVR_ACTUAL_STREAM_SIG_PROGR }, { "actstreamprogrsnr", PVR_ACTUAL_STREAM_SNR_PROGR }, { "actstreamisencrypted", PVR_ACTUAL_STREAM_ENCRYPTED }, - { "actstreamencryptionname", PVR_ACTUAL_STREAM_CRYPTION }}; + { "actstreamencryptionname", PVR_ACTUAL_STREAM_CRYPTION }, + { "actstreamservicename", PVR_ACTUAL_STREAM_SERVICE }, + { "actstreammux", PVR_ACTUAL_STREAM_MUX }, + { "actstreamprovidername", PVR_ACTUAL_STREAM_PROVIDER }}; const infomap slideshow[] = {{ "ispaused", SLIDESHOW_ISPAUSED }, { "isactive", SLIDESHOW_ISACTIVE }, @@ -1375,6 +1378,9 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa case PVR_ACTUAL_STREAM_AUDIO_BR: case PVR_ACTUAL_STREAM_DOLBY_BR: case PVR_ACTUAL_STREAM_CRYPTION: + case PVR_ACTUAL_STREAM_SERVICE: + case PVR_ACTUAL_STREAM_MUX: + case PVR_ACTUAL_STREAM_PROVIDER: g_PVRManager.TranslateCharInfo(info, strLabel); break; case WEATHER_CONDITIONS: diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 1d70720a84..8a9d6294cb 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -477,7 +477,10 @@ namespace INFO #define PVR_ACTUAL_STREAM_AUDIO_BR (PVR_STRINGS_START + 31) #define PVR_ACTUAL_STREAM_DOLBY_BR (PVR_STRINGS_START + 32) #define PVR_ACTUAL_STREAM_CRYPTION (PVR_STRINGS_START + 33) -#define PVR_STRINGS_END PVR_ACTUAL_STREAM_CRYPTION +#define PVR_ACTUAL_STREAM_SERVICE (PVR_STRINGS_START + 34) +#define PVR_ACTUAL_STREAM_MUX (PVR_STRINGS_START + 35) +#define PVR_ACTUAL_STREAM_PROVIDER (PVR_STRINGS_START + 36) +#define PVR_STRINGS_END PVR_ACTUAL_STREAM_PROVIDER #define WINDOW_PROPERTY 9993 #define WINDOW_IS_TOPMOST 9994 diff --git a/xbmc/addons/include/xbmc_pvr_dll.h b/xbmc/addons/include/xbmc_pvr_dll.h index 39f52a0982..50012b0497 100644 --- a/xbmc/addons/include/xbmc_pvr_dll.h +++ b/xbmc/addons/include/xbmc_pvr_dll.h @@ -576,6 +576,25 @@ extern "C" void SetSpeed(int speed); /*! + * Get actual playing time from addon. With timeshift enabled this is + * different to live. + * @return time as UTC + */ + time_t GetPlayingTime(); + + /*! + * Get time of oldest packet in timeshift buffer + * @return time as UTC + */ + time_t GetBufferTimeStart(); + + /*! + * Get time of latest packet in timeshift buffer + * @return time as UTC + */ + time_t GetBufferTimeEnd(); + + /*! * Called by XBMC to assign the function pointers of this add-on to pClient. * @param pClient The struct to assign the function pointers to. */ @@ -651,6 +670,10 @@ extern "C" pClient->DemuxAbort = DemuxAbort; pClient->DemuxFlush = DemuxFlush; pClient->DemuxRead = DemuxRead; + + pClient->GetPlayingTime = GetPlayingTime; + pClient->GetBufferTimeStart = GetBufferTimeStart; + pClient->GetBufferTimeEnd = GetBufferTimeEnd; }; }; diff --git a/xbmc/addons/include/xbmc_pvr_types.h b/xbmc/addons/include/xbmc_pvr_types.h index 36ef0aa051..94e1a59ae0 100644 --- a/xbmc/addons/include/xbmc_pvr_types.h +++ b/xbmc/addons/include/xbmc_pvr_types.h @@ -75,10 +75,10 @@ struct DemuxPacket; #define PVR_STREAM_MAX_STREAMS 20 /* current PVR API version */ -#define XBMC_PVR_API_VERSION "1.8.1" +#define XBMC_PVR_API_VERSION "1.9.0" /* min. PVR API version */ -#define XBMC_PVR_MIN_API_VERSION "1.8.0" +#define XBMC_PVR_MIN_API_VERSION "1.9.0" #ifdef __cplusplus extern "C" { @@ -194,6 +194,9 @@ extern "C" { { char strAdapterName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) name of the adapter that's being used */ char strAdapterStatus[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) status of the adapter that's being used */ + char strServiceName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) name of the current service */ + char strProviderName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) name of the current service's provider */ + char strMuxName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) name of the current mux */ int iSNR; /*!< @brief (optional) signal/noise ratio */ int iSignal; /*!< @brief (optional) signal strength */ long iBER; /*!< @brief (optional) bit error rate */ @@ -392,6 +395,9 @@ extern "C" { bool (__cdecl* CanSeekStream)(void); bool (__cdecl* SeekTime)(int, bool, double*); void (__cdecl* SetSpeed)(int); + time_t (__cdecl* GetPlayingTime)(void); + time_t (__cdecl* GetBufferTimeStart)(void); + time_t (__cdecl* GetBufferTimeEnd)(void); } PVRClient; #ifdef __cplusplus diff --git a/xbmc/pvr/PVRGUIInfo.cpp b/xbmc/pvr/PVRGUIInfo.cpp index f0ed5a0e6d..55074fe3ba 100644 --- a/xbmc/pvr/PVRGUIInfo.cpp +++ b/xbmc/pvr/PVRGUIInfo.cpp @@ -342,6 +342,15 @@ bool CPVRGUIInfo::TranslateCharInfo(DWORD dwInfo, CStdString &strValue) const case PVR_ACTUAL_STREAM_CRYPTION: CharInfoEncryption(strValue); break; + case PVR_ACTUAL_STREAM_SERVICE: + CharInfoService(strValue); + break; + case PVR_ACTUAL_STREAM_MUX: + CharInfoMux(strValue); + break; + case PVR_ACTUAL_STREAM_PROVIDER: + CharInfoProvider(strValue); + break; case PVR_BACKEND_NAME: CharInfoBackendName(strValue); break; @@ -620,6 +629,30 @@ void CPVRGUIInfo::CharInfoEncryption(CStdString &strValue) const strValue = StringUtils::EmptyString; } +void CPVRGUIInfo::CharInfoService(CStdString &strValue) const +{ + if (!strcmp(m_qualityInfo.strServiceName, StringUtils::EmptyString)) + strValue.Format("%s", g_localizeStrings.Get(13205)); + else + strValue.Format("%s", m_qualityInfo.strServiceName); +} + +void CPVRGUIInfo::CharInfoMux(CStdString &strValue) const +{ + if (!strcmp(m_qualityInfo.strMuxName, StringUtils::EmptyString)) + strValue.Format("%s", g_localizeStrings.Get(13205)); + else + strValue.Format("%s", m_qualityInfo.strMuxName); +} + +void CPVRGUIInfo::CharInfoProvider(CStdString &strValue) const +{ + if (!strcmp(m_qualityInfo.strProviderName, StringUtils::EmptyString)) + strValue.Format("%s", g_localizeStrings.Get(13205)); + else + strValue.Format("%s", m_qualityInfo.strProviderName); +} + void CPVRGUIInfo::UpdateBackendCache(void) { CStdString strBackendName; @@ -783,10 +816,10 @@ int CPVRGUIInfo::GetStartTime(void) const if (m_playingEpgTag) { /* Calculate here the position we have of the running live TV event. - * "position in ms" = ("current local time" - "event start local time") * 1000 + * "position in ms" = ("current UTC" - "event start UTC") * 1000 */ - CDateTime current = CDateTime::GetCurrentDateTime(); - CDateTime start = m_playingEpgTag->StartAsLocalTime(); + CDateTime current = g_PVRClients->GetPlayingTime(); + CDateTime start = m_playingEpgTag->StartAsUTC(); CDateTimeSpan time = current > start ? current - start : CDateTimeSpan(0, 0, 0, 0); return (time.GetDays() * 60 * 60 * 24 + time.GetHours() * 60 * 60 diff --git a/xbmc/pvr/PVRGUIInfo.h b/xbmc/pvr/PVRGUIInfo.h index 2967084358..34bc25813d 100644 --- a/xbmc/pvr/PVRGUIInfo.h +++ b/xbmc/pvr/PVRGUIInfo.h @@ -125,6 +125,9 @@ namespace PVR void CharInfoBackendRecordings(CStdString &strValue) const; void CharInfoPlayingClientName(CStdString &strValue) const; void CharInfoEncryption(CStdString &strValue) const; + void CharInfoService(CStdString &strValue) const; + void CharInfoMux(CStdString &strValue) const; + void CharInfoProvider(CStdString &strValue) const; /** @name GUIInfoManager data */ //@{ diff --git a/xbmc/pvr/addons/PVRClient.cpp b/xbmc/pvr/addons/PVRClient.cpp index 90da360671..349cad64c7 100644 --- a/xbmc/pvr/addons/PVRClient.cpp +++ b/xbmc/pvr/addons/PVRClient.cpp @@ -1502,3 +1502,50 @@ void CPVRClient::UpdateCharInfoSignalStatus(void) CSingleLock lock(m_critSection); m_qualityInfo = qualityInfo; } + +time_t CPVRClient::GetPlayingTime(void) const +{ + time_t time = 0; + if (IsPlaying()) + { + try + { + time = m_pStruct->GetPlayingTime(); + } + catch (exception &e) { LogException(e, __FUNCTION__); } + } + // fallback if not implemented by addon + if (time == 0) + { + CDateTime::GetUTCDateTime().GetAsTime(time); + } + return time; +} + +time_t CPVRClient::GetBufferTimeStart(void) const +{ + time_t time = 0; + if (IsPlaying()) + { + try + { + time = m_pStruct->GetBufferTimeStart(); + } + catch (exception &e) { LogException(e, __FUNCTION__); } + } + return time; +} + +time_t CPVRClient::GetBufferTimeEnd(void) const +{ + time_t time = 0; + if (IsPlaying()) + { + try + { + time = m_pStruct->GetBufferTimeEnd(); + } + catch (exception &e) { LogException(e, __FUNCTION__); } + } + return time; +} diff --git a/xbmc/pvr/addons/PVRClient.h b/xbmc/pvr/addons/PVRClient.h index 660ae2c0f8..0daca5e38b 100644 --- a/xbmc/pvr/addons/PVRClient.h +++ b/xbmc/pvr/addons/PVRClient.h @@ -511,6 +511,21 @@ namespace PVR static const char *ToString(const PVR_ERROR error); + /*! + * @brief actual playing time + */ + time_t GetPlayingTime() const; + + /*! + * @brief time of oldest packet in timeshift buffer + */ + time_t GetBufferTimeStart() const; + + /*! + * @brief time of latest packet in timeshift buffer + */ + time_t GetBufferTimeEnd() const; + private: /*! * @brief Checks whether the provided API version is compatible with XBMC diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp index 5aaf881e55..0435a34478 100644 --- a/xbmc/pvr/addons/PVRClients.cpp +++ b/xbmc/pvr/addons/PVRClients.cpp @@ -1432,3 +1432,42 @@ bool CPVRClients::IsEncrypted(void) const return client->IsPlayingEncryptedChannel(); return false; } + +time_t CPVRClients::GetPlayingTime() const +{ + PVR_CLIENT client; + time_t time = 0; + + if (GetPlayingClient(client)) + { + time = client->GetPlayingTime(); + } + + return time; +} + +time_t CPVRClients::GetBufferTimeStart() const +{ + PVR_CLIENT client; + time_t time = 0; + + if (GetPlayingClient(client)) + { + time = client->GetBufferTimeStart(); + } + + return time; +} + +time_t CPVRClients::GetBufferTimeEnd() const +{ + PVR_CLIENT client; + time_t time = 0; + + if (GetPlayingClient(client)) + { + time = client->GetBufferTimeEnd(); + } + + return time; +} diff --git a/xbmc/pvr/addons/PVRClients.h b/xbmc/pvr/addons/PVRClients.h index 8db19ec3e4..bf241e5cef 100644 --- a/xbmc/pvr/addons/PVRClients.h +++ b/xbmc/pvr/addons/PVRClients.h @@ -562,6 +562,10 @@ namespace PVR bool GetPlayingClient(PVR_CLIENT &client) const; + time_t GetPlayingTime() const; + time_t GetBufferTimeStart() const; + time_t GetBufferTimeEnd() const; + private: /*! * @brief Update add-ons from the AddonManager |