Browse files

ForTheRecord pvr addon: add timeshift support

  • Loading branch information...
1 parent 32cc869 commit cc46fa500e4a84aa01566743ad7153e8c234b71a @margro margro committed Oct 9, 2012
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);

0 comments on commit cc46fa5

Please sign in to comment.