public:
virtual RESULT getLength(pts_t &SWIG_OUTPUT)=0;
virtual RESULT seekTo(pts_t to)=0;
+ enum { dirForward = +1, dirBackward = -1 };
+ virtual RESULT seekRelative(int direction, pts_t to)=0;
virtual RESULT getPlayPosition(pts_t &SWIG_OUTPUT)=0;
};
// TODO: additional stuff, like a conversion interface?
};
+TEMPLATE_TYPEDEF(ePtr<iServiceOfflineOperations>, iServiceOfflineOperationsPtr);
+
class iServiceHandler: public iObject
{
public:
{
res.clear();
res.push_back(m_ref.path);
+ res.push_back(m_ref.path + ".meta");
return 0;
}
-
-
DEFINE_REF(eServiceFactoryDVB)
eServiceFactoryDVB::eServiceFactoryDVB()
ePtr<eDVBChannelQuery> q;
- if (m_parent.path.size())
+ if (!m_parent.path.empty())
{
eDVBChannelQuery::compile(q, m_parent.path);
if (!q)
RESULT eServiceFactoryDVB::record(const eServiceReference &ref, ePtr<iRecordableService> &ptr)
{
- ptr = new eDVBServiceRecord((eServiceReferenceDVB&)ref);
- return 0;
+ if (ref.path.empty())
+ {
+ ptr = new eDVBServiceRecord((eServiceReferenceDVB&)ref);
+ return 0;
+ } else
+ {
+ ptr = 0;
+ return -1;
+ }
}
RESULT eServiceFactoryDVB::list(const eServiceReference &ref, ePtr<iListableService> &ptr)
ptr = new eStaticServiceDVBBouquetInformation;
return 0;
}
- else if (ref.path.size())
+ else if (!ref.path.empty())
{
ptr = new eStaticServiceDVBPVRInformation(ref);
return 0;
}
}
-RESULT eServiceFactoryDVB::offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr)
+RESULT eServiceFactoryDVB::offlineOperations(const eServiceReference &ref, ePtr<iServiceOfflineOperations> &ptr)
{
- ptr = 0;
- return -1;
+ if (ref.path.empty())
+ {
+ ptr = 0;
+ return -1;
+ } else
+ {
+ ptr = new eDVBPVRServiceOfflineOperations(ref);
+ return 0;
+ }
}
RESULT eServiceFactoryDVB::lookupService(ePtr<eDVBService> &service, const eServiceReference &ref)
return -1;
}
+RESULT eDVBServicePlay::seekRelative(int direction, pts_t to)
+{
+ eDebug("eDVBServicePlay::seekRelative: jump %d, %lld", direction, to);
+
+ ePtr<iDVBPVRChannel> pvr_channel;
+
+ if (m_service_handler.getPVRChannel(pvr_channel))
+ return -1;
+
+ return pvr_channel->seekToPosition(SEEK_CUR, to);
+}
+
RESULT eDVBServicePlay::getPlayPosition(pts_t &pos)
{
ePtr<iDVBPVRChannel> pvr_channel;