diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2010-02-02 15:53:27 +0100 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2010-02-02 15:53:27 +0100 |
commit | 83b668640e5bd3ab5c9cb2eb9b9ecb3cce8b5e16 (patch) | |
tree | 3e657cf442577ad90838661282ab4841b47634c9 /dxr3interface.c | |
parent | 4bde94abf9ee666af633c10d4f408704c5e36af9 (diff) | |
download | vdr-plugin-dxr3-83b668640e5bd3ab5c9cb2eb9b9ecb3cce8b5e16.tar.gz vdr-plugin-dxr3-83b668640e5bd3ab5c9cb2eb9b9ecb3cce8b5e16.tar.bz2 |
set directly scr and pts vales, with out the need for m_offset
Diffstat (limited to 'dxr3interface.c')
-rw-r--r-- | dxr3interface.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/dxr3interface.c b/dxr3interface.c index 339610b..c9d748c 100644 --- a/dxr3interface.c +++ b/dxr3interface.c @@ -57,23 +57,18 @@ int cDxr3Interface::OssSetPlayMode(uint32_t mode) // ================================== void cDxr3Interface::SetSysClock(uint32_t scr) { - uint32_t sc; - Lock(); - CHECK(ioctl(m_fdControl, EM8300_IOCTL_SCR_GET, &sc)); - m_offset = scr - sc; + CHECK(ioctl(m_fdControl, EM8300_IOCTL_SCR_SET, &scr)); Unlock(); } // ================================== uint32_t cDxr3Interface::GetSysClock() { - uint32_t sc; uint32_t retval; Lock(); - CHECK(ioctl(m_fdControl, EM8300_IOCTL_SCR_GET, &sc)); - retval = sc + m_offset; + CHECK(ioctl(m_fdControl, EM8300_IOCTL_SCR_GET, &retval)); Unlock(); return retval; @@ -82,11 +77,9 @@ uint32_t cDxr3Interface::GetSysClock() // ================================== void cDxr3Interface::SetPts(uint32_t pts) { - uint32_t newPts = 0; Lock(); - newPts = pts - m_offset; - CHECK(ioctl(m_fdVideo, EM8300_IOCTL_VIDEO_SETPTS, &newPts)); + CHECK(ioctl(m_fdVideo, EM8300_IOCTL_VIDEO_SETPTS, &pts)); Unlock(); } @@ -96,7 +89,7 @@ void cDxr3Interface::SetSpuPts(uint32_t pts) uint32_t newPts = 0; Lock(); - newPts = (pts - m_offset) << 1; // fix for DVD subtitles + newPts = pts << 1; // fix for DVD subtitles CHECK(ioctl(m_fdSpu, EM8300_IOCTL_SPU_SETPTS, &newPts)); Unlock(); } |