aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-12-20 01:05:02 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-12-20 01:05:02 +0000
commit06d78eb689babb22f1a315203a8c6871d9ae121d (patch)
treebf195bae19b0a72e93a1bed38d869df6f8ae89fa /lib/dvb
parent549b871981647add9697e4e2eb10469b91bc16c9 (diff)
downloadenigma2-06d78eb689babb22f1a315203a8c6871d9ae121d.tar.gz
enigma2-06d78eb689babb22f1a315203a8c6871d9ae121d.zip
use video stc for display. make skipping look a bit better.
Diffstat (limited to 'lib/dvb')
-rw-r--r--lib/dvb/demux.cpp4
-rw-r--r--lib/dvb/demux.h2
-rw-r--r--lib/dvb/dvb.cpp7
-rw-r--r--lib/dvb/dvb.h2
-rw-r--r--lib/dvb/idvb.h4
5 files changed, 10 insertions, 9 deletions
diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp
index d7fcaccf..78c55bfe 100644
--- a/lib/dvb/demux.cpp
+++ b/lib/dvb/demux.cpp
@@ -96,7 +96,7 @@ RESULT eDVBDemux::getMPEGDecoder(ePtr<iTSMPEGDecoder> &decoder)
return 0;
}
-RESULT eDVBDemux::getSTC(pts_t &pts)
+RESULT eDVBDemux::getSTC(pts_t &pts, int num)
{
int fd = openDemux();
@@ -104,7 +104,7 @@ RESULT eDVBDemux::getSTC(pts_t &pts)
return -ENODEV;
struct dmx_stc stc;
- stc.num = 0;
+ stc.num = num;
stc.base = 1;
if (ioctl(fd, DMX_GET_STC, &stc) < 0)
diff --git a/lib/dvb/demux.h b/lib/dvb/demux.h
index d3a369f9..869c2e9b 100644
--- a/lib/dvb/demux.h
+++ b/lib/dvb/demux.h
@@ -20,7 +20,7 @@ public:
RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader);
- RESULT getSTC(pts_t &pts);
+ RESULT getSTC(pts_t &pts, int num);
RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; }
RESULT flush();
RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 0a5bb45e..7e937e6f 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -702,7 +702,7 @@ RESULT eDVBChannel::getLength(pts_t &len)
return m_tstools.calcLen(len);
}
-RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos)
+RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode)
{
if (!decoding_demux)
return -1;
@@ -718,7 +718,8 @@ RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos)
pts_t now;
- r = decoding_demux->getSTC(now);
+ /* TODO: this is a gross hack. */
+ r = decoding_demux->getSTC(now, mode ? 128 : 0);
if (r)
{
@@ -753,7 +754,7 @@ RESULT eDVBChannel::seekTo(iDVBDemux *decoding_demux, int relative, pts_t &pts)
if (relative)
{
pts_t now;
- if (getCurrentPosition(decoding_demux, now))
+ if (getCurrentPosition(decoding_demux, now, 0))
{
eDebug("seekTo: getCurrentPosition failed!");
return -1;
diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h
index a7be0a71..23dd7778 100644
--- a/lib/dvb/dvb.h
+++ b/lib/dvb/dvb.h
@@ -215,7 +215,7 @@ public:
/* iDVBPVRChannel */
RESULT playFile(const char *file);
RESULT getLength(pts_t &len);
- RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos);
+ RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode);
RESULT seekTo(iDVBDemux *decoding_demux, int relative, pts_t &pts);
/* seeking to relative positions won't work -
there is an unknown amount of buffers in between */
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index 6c45bb29..93d3b52a 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -429,7 +429,7 @@ public:
can be shared between multiple decoders.
Of couse skipping doesn't make much sense
then, but getCurrentPosition does. */
- virtual RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos) = 0;
+ virtual RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode) = 0;
virtual RESULT seekTo(iDVBDemux *decoding_demux, int relative, pts_t &pts) = 0;
virtual RESULT seekToPosition(iDVBDemux *decoding_demux, const off_t &pts) = 0;
};
@@ -444,7 +444,7 @@ public:
virtual RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader)=0;
virtual RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder)=0;
virtual RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader)=0;
- virtual RESULT getSTC(pts_t &pts)=0;
+ virtual RESULT getSTC(pts_t &pts, int num=0)=0;
virtual RESULT getCADemuxID(uint8_t &id)=0;
virtual RESULT flush()=0;
};