Permalink
Browse files

MediaPortal pvr addon: add timeshift support

  • Loading branch information...
1 parent d7897cd commit 32cc869dbbc1e420c31ff9002bc5672de41d7343 @margro margro committed Oct 8, 2012
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.mediaportal.tvserver"
- version="1.2.3.116"
+ version="1.2.3.117"
name="MediaPortal PVR Client"
provider-name="Marcel Groothuis">
<requires>
@@ -1,3 +1,6 @@
+v1.2.3.117
+- Added: timeshift support for XBMC Frodo
+
v1.2.3.116:
- Fixed: playback of recordings with non-ASCII characters
- Added: Hungarian translation
@@ -441,7 +441,6 @@ PVR_ERROR GetAddonCapabilities(PVR_ADDON_CAPABILITIES *pCapabilities)
{
XBMC->Log(LOG_DEBUG, "->GetProperties()");
- //pCapabilities->bSupportsTimeshift = true; //removed from Frodo API
pCapabilities->bSupportsEPG = true;
pCapabilities->bSupportsRecordings = true;
pCapabilities->bSupportsTimers = true;
@@ -814,6 +813,28 @@ const char * GetLiveStreamURL(const PVR_CHANNEL &channel)
return g_client->GetLiveStreamURL(channel);
}
+bool CanPauseStream(void)
+{
+ if (g_client)
+ return g_client->CanPauseAndSeek();
+
+ return false;
+}
+
+void PauseStream(bool bPaused)
+{
+ if (g_client)
+ g_client->PauseStream(bPaused);
+}
+
+bool CanSeekStream(void)
+{
+ if (g_client)
+ return g_client->CanPauseAndSeek();
+
+ return false;
+}
+
/** UNUSED API FUNCTIONS */
PVR_ERROR MoveChannel(const PVR_CHANNEL &channel) { return PVR_ERROR_NOT_IMPLEMENTED; }
DemuxPacket* DemuxRead(void) { return NULL; }
@@ -42,13 +42,13 @@ using namespace ADDON;
int g_iTVServerXBMCBuild = 0;
/* PVR client version (don't forget to update also the addon.xml and the Changelog.txt files) */
-#define PVRCLIENT_MEDIAPORTAL_VERSION_STRING "1.2.3.116"
+#define PVRCLIENT_MEDIAPORTAL_VERSION_STRING "1.2.3.117"
/* TVServerXBMC plugin supported versions */
#define TVSERVERXBMC_MIN_VERSION_STRING "1.1.0.90"
#define TVSERVERXBMC_MIN_VERSION_BUILD 90
-#define TVSERVERXBMC_RECOMMENDED_VERSION_STRING "1.2.3.115"
-#define TVSERVERXBMC_RECOMMENDED_VERSION_BUILD 115
+#define TVSERVERXBMC_RECOMMENDED_VERSION_STRING "1.2.3.116"
+#define TVSERVERXBMC_RECOMMENDED_VERSION_BUILD 116
/************************************************************/
/** Class interface */
@@ -1754,3 +1754,17 @@ const char* cPVRClientMediaPortal::GetLiveStreamURL(const PVR_CHANNEL &channelin
return m_PlaybackURL.c_str();
}
}
+
+void cPVRClientMediaPortal::PauseStream(bool bPaused)
+{
+ if (m_tsreader)
+ m_tsreader->Pause();
+}
+
+bool cPVRClientMediaPortal::CanPauseAndSeek()
+{
+ if (m_tsreader)
+ return true;
+ else
+ return false;
+}
@@ -91,6 +91,8 @@ class cPVRClientMediaPortal
long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET);
long long LengthLiveStream(void);
long long PositionLiveStream(void);
+ bool CanPauseAndSeek(void);
+ void PauseStream(bool bPaused);
/* Record stream handling */
bool OpenRecordedStream(const PVR_RECORDING &recording);

0 comments on commit 32cc869

Please sign in to comment.