aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/demux.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-08-17 02:16:32 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-08-17 02:16:32 +0000
commit0af11516cabc973907890f548925a66313c8d18c (patch)
treec31b0f76274fbc23d24f0b0188c54282b96442bc /lib/dvb/demux.cpp
parent17647e30993cc20d8f94f2de4a0bc78ce6b593cb (diff)
downloadenigma2-0af11516cabc973907890f548925a66313c8d18c.tar.gz
enigma2-0af11516cabc973907890f548925a66313c8d18c.zip
- add iSeekableService, implement it for serviceDvb
Diffstat (limited to 'lib/dvb/demux.cpp')
-rw-r--r--lib/dvb/demux.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp
index bdd8e67d..3e05065b 100644
--- a/lib/dvb/demux.cpp
+++ b/lib/dvb/demux.cpp
@@ -59,6 +59,38 @@ RESULT eDVBDemux::getMPEGDecoder(ePtr<iTSMPEGDecoder> &decoder)
return 0;
}
+RESULT eDVBDemux::getSTC(pts_t &pts)
+{
+ char filename[128];
+#if HAVE_DVB_API_VERSION < 3
+ sprintf(filename, "/dev/dvb/card%d/demux%d", adapter, demux);
+#else
+ sprintf(filename, "/dev/dvb/adapter%d/demux%d", adapter, demux);
+#endif
+ int fd = ::open(filename, O_RDWR);
+
+ if (fd < 0)
+ return -ENODEV;
+
+ struct dmx_stc stc;
+ stc.num = 0;
+ stc.base = 1;
+
+ if (ioctl(fd, DMX_GET_STC, &stc) < 0)
+ {
+ ::close(fd);
+ return -1;
+ }
+
+ pts = stc.stc;
+ eDebug("got demux stc: %08llx", pts);
+
+ ::close(fd);
+
+ return 0;
+}
+
+
void eDVBSectionReader::data(int)
{
__u8 data[4096]; // max. section size