diff options
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | dxr3device.c | 2 | ||||
-rw-r--r-- | dxr3interface.c | 8 | ||||
-rw-r--r-- | dxr3interface.h | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1268226..5385974 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -22,6 +22,7 @@ Jarkko Santala Marco Schlüßler Stephan Skrodzki Ville Skyttä +Mikko Tuumanen Sascha Volkenandt Thank you very much :) diff --git a/dxr3device.c b/dxr3device.c index 4fa3980..3418f33 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -174,7 +174,7 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) // ================================== int64_t cDxr3Device::GetSTC() { - return cDxr3Interface::Instance().GetSysClock(); + return cDxr3Interface::Instance().GetPts(); } // ================================== diff --git a/dxr3interface.c b/dxr3interface.c index 1e17e11..ddda394 100644 --- a/dxr3interface.c +++ b/dxr3interface.c @@ -346,6 +346,12 @@ uint32_t cDxr3Interface::GetSysClock() const } // ================================== +int64_t cDxr3Interface::GetPts() +{ + return m_lastSeenPts << 1; +} + +// ================================== void cDxr3Interface::SetPts(uint32_t pts) { Lock(); @@ -671,6 +677,8 @@ void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times) } } SetAspectRatio(pFrame->GetAspectRatio()); + uint32_t pts = pFrame->GetPts(); + if (pts > 0) m_lastSeenPts = pts; } Unlock(); diff --git a/dxr3interface.h b/dxr3interface.h index 492c1e3..bf7bd94 100644 --- a/dxr3interface.h +++ b/dxr3interface.h @@ -68,6 +68,7 @@ public: uint32_t GetSysClock() const; void SetPts(uint32_t pts); void SetSpuPts(uint32_t pts); + int64_t GetPts(); // state changes void EnableSPU(); @@ -131,6 +132,7 @@ private: int m_fdVideo; ///< filehandle for video fifo of dxr3 card int m_fdAudio; ///< filehandle for audio fifo of dxr3 card int m_fdSpu; ///< filehandle for spu fifo of dxr3 card + uint32_t m_lastSeenPts; // dxr3 clock cDxr3SysClock* m_pClock; ///< clock used for sync |