summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index ebb236e..4e7b50c 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.67.1.2 2003/10/24 14:32:20 kls Exp $
+ * $Id: dvbdevice.c 1.67.1.3 2003/11/07 13:24:49 kls Exp $
*/
#include "dvbdevice.h"
@@ -326,6 +326,7 @@ cDvbDevice::cDvbDevice(int n)
fd_osd = DvbOpen(DEV_DVB_OSD, n, O_RDWR);
fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK);
fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK);
+ fd_stc = DvbOpen(DEV_DVB_DEMUX, n, O_RDWR);
// The DVR device (will be opened and closed as needed):
@@ -869,6 +870,20 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
return true;
}
+int64_t cDvbDevice::GetSTC(void)
+{
+ if (fd_stc >= 0) {
+ struct dmx_stc stc;
+ stc.num = 0;
+ if (ioctl(fd_stc, DMX_GET_STC, &stc) == -1) {
+ esyslog("ERROR: stc %d: %m", CardIndex() + 1);
+ return -1;
+ }
+ return stc.stc / stc.base;
+ }
+ return -1;
+}
+
void cDvbDevice::TrickSpeed(int Speed)
{
if (fd_video >= 0)