aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/decoder.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-17 16:44:45 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-17 16:44:45 +0000
commitb96f203b700c91e463eff20889d734119530bce0 (patch)
tree0f17dba15d739889e7d4816021515341241dd2e4 /lib/dvb/decoder.cpp
parent5e8e6de17ab3140b57d21e5d2373b8a0707f1ce2 (diff)
downloadenigma2-b96f203b700c91e463eff20889d734119530bce0.tar.gz
enigma2-b96f203b700c91e463eff20889d734119530bce0.zip
use AUDIO_GET_STC, VIDEO_GET_STC
Diffstat (limited to 'lib/dvb/decoder.cpp')
-rw-r--r--lib/dvb/decoder.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp
index 8e21dcad..0e6f86d3 100644
--- a/lib/dvb/decoder.cpp
+++ b/lib/dvb/decoder.cpp
@@ -25,6 +25,12 @@
#include <sys/ioctl.h>
#include <errno.h>
+ /* these are quite new... */
+#ifndef AUDIO_GET_PTS
+#define AUDIO_GET_PTS _IOR('o', 19, __u64)
+#define VIDEO_GET_PTS _IOR('o', 57, __u64)
+#endif
+
DEFINE_REF(eDVBAudio);
eDVBAudio::eDVBAudio(eDVBDemux *demux, int dev): m_demux(demux)
@@ -130,7 +136,12 @@ void eDVBAudio::unfreeze()
if (::ioctl(m_fd, AUDIO_CONTINUE) < 0)
eDebug("video: AUDIO_CONTINUE: %m");
}
-
+
+int eDVBAudio::getPTS(pts_t &now)
+{
+ return ::ioctl(m_fd, AUDIO_GET_PTS, &now);
+}
+
eDVBAudio::~eDVBAudio()
{
if (m_fd >= 0)
@@ -236,6 +247,11 @@ int eDVBVideo::setFastForward(int skip)
m_is_fast_forward = skip;
return ::ioctl(m_fd, VIDEO_FAST_FORWARD, skip);
}
+
+int eDVBVideo::getPTS(pts_t &now)
+{
+ return ::ioctl(m_fd, VIDEO_GET_PTS, &now);
+}
eDVBVideo::~eDVBVideo()
{
@@ -642,3 +658,27 @@ RESULT eTSMPEGDecoder::setTrickmode(int what)
setState();
return 0;
}
+
+RESULT eTSMPEGDecoder::getPTS(int what, pts_t &pts)
+{
+ if (what == 0) /* auto */
+ what = m_video ? 1 : 2;
+
+ if (what == 1) /* video */
+ {
+ if (m_video)
+ return m_video->getPTS(pts);
+ else
+ return -1;
+ }
+
+ if (what == 2) /* audio */
+ {
+ if (m_audio)
+ return m_audio->getPTS(pts);
+ else
+ return -1;
+ }
+
+ return -1;
+}