aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-01-27 23:56:49 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-01-27 23:56:49 +0000
commit28ddb2c21514dc49826847b38f60bf3a663be551 (patch)
tree3358e789b887bdb5a43eea50c4ee6beda38b6e9d /lib
parent65280b51bffa35ad499ee50d1a474344d9d90dd0 (diff)
downloadenigma2-28ddb2c21514dc49826847b38f60bf3a663be551.tar.gz
enigma2-28ddb2c21514dc49826847b38f60bf3a663be551.zip
add isCurrentlSeekable to iPlayableService
Diffstat (limited to 'lib')
-rw-r--r--lib/service/iservice.h1
-rw-r--r--lib/service/servicedvb.cpp14
-rw-r--r--lib/service/servicedvb.h1
3 files changed, 11 insertions, 5 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h
index bc8d0244..2f489b17 100644
--- a/lib/service/iservice.h
+++ b/lib/service/iservice.h
@@ -310,6 +310,7 @@ public:
/* if you want to do several seeks in a row, you can enable the trickmode.
audio will be switched off, sync will be disabled etc. */
virtual RESULT setTrickmode(int trick=0)=0;
+ virtual RESULT isCurrentlySeekable()=0;
};
TEMPLATE_TYPEDEF(ePtr<iSeekableService>, iSeekableServicePtr);
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index 7beb6c25..650b609e 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -712,7 +712,7 @@ RESULT eDVBServicePlay::setFastForward(int ratio)
RESULT eDVBServicePlay::seek(ePtr<iSeekableService> &ptr)
{
- if (m_is_pvr || m_timeshift_active)
+ if (m_is_pvr || m_timeshift_enabled)
{
ptr = this;
return 0;
@@ -722,15 +722,13 @@ RESULT eDVBServicePlay::seek(ePtr<iSeekableService> &ptr)
return -1;
}
+ /* TODO: when timeshift is enabled but not active, this doesn't work. */
RESULT eDVBServicePlay::getLength(pts_t &len)
{
ePtr<iDVBPVRChannel> pvr_channel;
- if (m_service_handler.getPVRChannel(pvr_channel))
- {
- eDebug("getPVRChannel failed!");
+ if ((m_timeshift_enabled ? m_service_handler_timeshift : m_service_handler).getPVRChannel(pvr_channel))
return -1;
- }
return pvr_channel->getLength(len);
}
@@ -815,6 +813,11 @@ RESULT eDVBServicePlay::setTrickmode(int trick)
return 0;
}
+RESULT eDVBServicePlay::isCurrentlySeekable()
+{
+ return m_is_pvr || m_timeshift_active;
+}
+
RESULT eDVBServicePlay::frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr)
{
ptr = this;
@@ -1140,6 +1143,7 @@ RESULT eDVBServicePlay::stopTimeshift()
m_record = 0;
close(m_timeshift_fd);
+ eDebug("remove timeshift file");
remove(m_timeshift_file.c_str());
return 0;
diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h
index 2929397a..a07e4410 100644
--- a/lib/service/servicedvb.h
+++ b/lib/service/servicedvb.h
@@ -88,6 +88,7 @@ public:
RESULT seekRelative(int direction, pts_t to);
RESULT getPlayPosition(pts_t &pos);
RESULT setTrickmode(int trick=0);
+ RESULT isCurrentlySeekable();
// iServiceInformation
RESULT getName(std::string &name);