From 5c65728d0f8e094403e4cb009445e0bfaf64c971 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 2 Feb 2010 15:39:51 +0100 Subject: add final code to PlayVideo... a/v sync should work now.. ...but sources needs some cleanups and missing methods needs to worked out. --- dxr3interface.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'dxr3interface.c') diff --git a/dxr3interface.c b/dxr3interface.c index 1c1a392..b04d08e 100644 --- a/dxr3interface.c +++ b/dxr3interface.c @@ -275,10 +275,17 @@ void cDxr3Interface::Pause() } // ================================== -void cDxr3Interface::PlayVideoFrame(cDxr3PesFrame *frame) +void cDxr3Interface::PlayVideoFrame(cDxr3PesFrame *frame, uint32_t pts) { - if (!m_VideoActive) { - return; + //if (!m_VideoActive) { + // return; + //} + + if (pts > 0) { + pts += 45000; + dsyslog("setting pts %d", pts); + this->SetPts(pts); + m_lastSeenPts = pts; } Lock(); @@ -298,10 +305,7 @@ void cDxr3Interface::PlayVideoFrame(cDxr3PesFrame *frame) Unlock(); - SetAspectRatio(frame->GetAspectRatio()); - uint32_t pts = frame->GetPts(); - if (pts > 0) - m_lastSeenPts = pts; + //SetAspectRatio(frame->GetAspectRatio()); } // ================================== -- cgit v1.2.3