From: ghost Date: Fri, 22 Jan 2010 14:06:12 +0000 (+0100) Subject: add possibility to stopTimeshift but not switch back to live (not used in e2.. but... X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=39bcbbae7cd1d2db59ddbf6cbae665313a322f3a add possibility to stopTimeshift but not switch back to live (not used in e2.. but usable for external plugins) this fixes bug #411 --- diff --git a/lib/service/iservice.h b/lib/service/iservice.h index c477f11..8b64f16 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -593,7 +593,7 @@ class iTimeshiftService: public iObject #endif public: virtual RESULT startTimeshift()=0; - virtual RESULT stopTimeshift()=0; + virtual RESULT stopTimeshift(bool switchToLive=true)=0; virtual int isTimeshiftActive()=0; /* this essentially seeks to the relative end of the timeshift buffer */ diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 615329c..25e723e 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -2089,12 +2089,13 @@ RESULT eDVBServicePlay::startTimeshift() return 0; } -RESULT eDVBServicePlay::stopTimeshift() +RESULT eDVBServicePlay::stopTimeshift(bool switchToLive=true) { if (!m_timeshift_enabled) return -1; - switchToLive(); + if (switchToLive) + switchToLive(); m_timeshift_enabled = 0; diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 42647b9..6ab3b34 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -159,7 +159,7 @@ public: // iTimeshiftService RESULT startTimeshift(); - RESULT stopTimeshift(); + RESULT stopTimeshift(bool switchToLive=true); int isTimeshiftActive(); RESULT activateTimeshift();