Skip to content
Browse files

Merge remote-tracking branch 'margro/frodo-timeshifting'. closes #50

  • Loading branch information...
2 parents 3edbf3d + cc46fa5 commit eed85b96c9bbb70277655b5b8bf5e15ea161cc9b @opdenkamp committed Oct 9, 2012
View
3 addons/pvr.demo/src/client.cpp
@@ -298,4 +298,7 @@ PVR_ERROR UpdateTimer(const PVR_TIMER &timer) { return PVR_ERROR_NOT_IMPLEMENTED
void DemuxAbort(void) {}
DemuxPacket* DemuxRead(void) { return NULL; }
unsigned int GetChannelSwitchDelay(void) { return 0; }
+void PauseStream(bool bPaused) {}
+bool CanPauseStream(void) { return false; }
+bool CanSeekStream(void) { return false; }
}
View
1 addons/pvr.fortherecord.argus/addon/changelog.txt
@@ -1,5 +1,6 @@
v0.0.1.141 (04-09-2012)
- Updated to Frodo PVR API
+- Add timeshift support for Frodo
v0.0.1.140 (03-06-2012)
- Fixed deletion of recordings due to api change
- Fixed instant-record failed due to start time set to 1970 by XBMC
View
23 addons/pvr.fortherecord.argus/src/client.cpp
@@ -319,7 +319,6 @@ PVR_ERROR GetAddonCapabilities(PVR_ADDON_CAPABILITIES *pCapabilities)
{
XBMC->Log(LOG_DEBUG, "->GetProperties()");
- //pCapabilities->bSupportsTimeshift = true; // removed in Frodo PVR API
pCapabilities->bSupportsEPG = true;
pCapabilities->bSupportsRecordings = true;
pCapabilities->bSupportsTimers = true;
@@ -590,6 +589,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; }
View
14 addons/pvr.fortherecord.argus/src/pvrclient-fortherecord.cpp
@@ -1606,3 +1606,17 @@ const char* cPVRClientForTheRecord::GetLiveStreamURL(const PVR_CHANNEL &channeli
XBMC->Log(LOG_DEBUG, "<-GetLiveStreamURL returns URL(%s)", m_PlaybackURL.c_str());
return m_PlaybackURL.c_str();
}
+
+void cPVRClientForTheRecord::PauseStream(bool bPaused)
+{
+ //TODO: add m_tsreader->Pause() her when adding RTSP streaming support
+}
+
+bool cPVRClientForTheRecord::CanPauseAndSeek()
+{
+#ifdef TSREADER
+ if (m_tsreader)
+ return true;
+#endif
+ return false;
+}
View
3 addons/pvr.fortherecord.argus/src/pvrclient-fortherecord.h
@@ -91,6 +91,8 @@ class cPVRClientForTheRecord
int GetCurrentClientChannel();
bool SwitchChannel(const PVR_CHANNEL &channel);
PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS &signalStatus);
+ bool CanPauseAndSeek(void);
+ void PauseStream(bool bPaused);
/* Record stream handling */
bool OpenRecordedStream(const PVR_RECORDING &recording);
@@ -100,7 +102,6 @@ class cPVRClientForTheRecord
long long LengthRecordedStream(void);
long long PositionRecordedStream(void);
-
/* Used for rtsp streaming */
const char* GetLiveStreamURL(const PVR_CHANNEL &channel);
View
3 addons/pvr.hts/src/client.cpp
@@ -583,4 +583,7 @@ PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING &recording, int count) { ret
PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING &recording, int lastplayedposition) { return PVR_ERROR_NOT_IMPLEMENTED; }
int GetRecordingLastPlayedPosition(const PVR_RECORDING &recording) { return -1; }
unsigned int GetChannelSwitchDelay(void) { return 0; }
+void PauseStream(bool bPaused) {}
+bool CanPauseStream(void) { return false; }
+bool CanSeekStream(void) { return false; }
}
View
2 addons/pvr.mediaportal.tvserver/addon/addon.xml
@@ -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>
View
3 addons/pvr.mediaportal.tvserver/addon/changelog.txt
@@ -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
View
23 addons/pvr.mediaportal.tvserver/src/client.cpp
@@ -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; }
View
20 addons/pvr.mediaportal.tvserver/src/pvrclient-mediaportal.cpp
@@ -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;
+}
View
2 addons/pvr.mediaportal.tvserver/src/pvrclient-mediaportal.h
@@ -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);
View
4 addons/pvr.njoy/src/client.cpp
@@ -261,5 +261,7 @@ PVR_ERROR DeleteTimer(const PVR_TIMER &timer, bool bForceDelete) { return PVR_ER
PVR_ERROR UpdateTimer(const PVR_TIMER &timer) { return PVR_ERROR_NOT_IMPLEMENTED; }
void DemuxAbort(void) {}
DemuxPacket* DemuxRead(void) { return NULL; }
-
+void PauseStream(bool bPaused) {}
+bool CanPauseStream(void) { return false; }
+bool CanSeekStream(void) { return false; }
} //end extern "C"
View
3 addons/pvr.vdr.vnsi/src/client.cpp
@@ -650,4 +650,7 @@ PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING &recording, int count) { ret
PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING &recording, int lastplayedposition) { return PVR_ERROR_NOT_IMPLEMENTED; }
int GetRecordingLastPlayedPosition(const PVR_RECORDING &recording) { return -1; }
unsigned int GetChannelSwitchDelay(void) { return 0; }
+void PauseStream(bool bPaused) {}
+bool CanPauseStream(void) { return false; }
+bool CanSeekStream(void) { return false; }
}
View
22 xbmc/xbmc_pvr_dll.h
@@ -513,6 +513,25 @@ extern "C"
unsigned int GetChannelSwitchDelay(void);
/*!
+ * Check if the backend support pausing the currently playing stream
+ * This will enable/disable the pause button in XBMC based on the return value
+ * @return false if the PVR addon/backend does not support pausing, true if possible
+ */
+ bool CanPauseStream();
+
+ /*!
+ * Check if the backend supports seeking for the currently playing stream
+ * This will enable/disable the rewind/forward buttons in XBMC based on the return value
+ * @return false if the PVR addon/backend does not support seeking, true if possible
+ */
+ bool CanSeekStream();
+
+ /*!
+ * @brief Notify the pvr addon that XBMC (un)paused the currently playing stream
+ */
+ void PauseStream(bool bPaused);
+
+ /*!
* Called by XBMC to assign the function pointers of this add-on to pClient.
* @param pClient The struct to assign the function pointers to.
*/
@@ -568,6 +587,9 @@ extern "C"
pClient->SignalStatus = SignalStatus;
pClient->GetLiveStreamURL = GetLiveStreamURL;
pClient->GetChannelSwitchDelay = GetChannelSwitchDelay;
+ pClient->CanPauseStream = CanPauseStream;
+ pClient->PauseStream = PauseStream;
+ pClient->CanSeekStream = CanSeekStream;
pClient->OpenRecordedStream = OpenRecordedStream;
pClient->CloseRecordedStream = CloseRecordedStream;
View
7 xbmc/xbmc_pvr_types.h
@@ -72,10 +72,10 @@ struct DemuxPacket;
#define PVR_STREAM_MAX_STREAMS 20
/* current PVR API version */
-#define XBMC_PVR_API_VERSION "1.4.0"
+#define XBMC_PVR_API_VERSION "1.5.0"
/* min. PVR API version */
-#define XBMC_PVR_MIN_API_VERSION "1.4.0"
+#define XBMC_PVR_MIN_API_VERSION "1.5.0"
#ifdef __cplusplus
extern "C" {
@@ -329,6 +329,9 @@ extern "C" {
void (__cdecl* DemuxFlush)(void);
DemuxPacket* (__cdecl* DemuxRead)(void);
unsigned int (__cdecl* GetChannelSwitchDelay)(void);
+ bool (__cdecl* CanPauseStream)(void);
+ void (__cdecl* PauseStream)(bool);
+ bool (__cdecl* CanSeekStream)(void);
} PVRClient;
#ifdef __cplusplus

0 comments on commit eed85b9

Please sign in to comment.
Something went wrong with that request. Please try again.