diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-11-07 14:16:25 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-11-07 14:16:25 +0100 |
commit | 85767a54058ac2de21a51fe58c33fbd1c5bb4628 (patch) | |
tree | 4cd157a7f1bf004447bb4a5ea479eaa86603c81e /dvbdevice.c | |
parent | 2a7467aed5a0b96e64bc5e7493c96d89583d3a6d (diff) | |
download | vdr-85767a54058ac2de21a51fe58c33fbd1c5bb4628.tar.gz vdr-85767a54058ac2de21a51fe58c33fbd1c5bb4628.tar.bz2 |
Added cDevice::GetSTC()
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index b6d96b2c..953d2787 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.70 2003/10/24 15:45:15 kls Exp $ + * $Id: dvbdevice.c 1.71 2003/11/07 14:16:25 kls Exp $ */ #include "dvbdevice.h" @@ -325,6 +325,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): @@ -868,6 +869,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) |