From 5ae90e8bc84404e62a2463b4c8f949cae467c1e5 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 16 Oct 2009 16:17:27 +0200 Subject: current implementation of StillPicture in cDxr3DemuxDevice is wrong We call 3 times DemuxPes - wow. The big problem is that a still picture can not only contain a pes packet. Also I want to refactor out as much as possible from the demuxdevice as i dont like it and want to remove it in the long term. --- dxr3demuxdevice.c | 8 +------- dxr3demuxdevice.h | 2 +- dxr3device.c | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c index 181756f..04abaf3 100644 --- a/dxr3demuxdevice.c +++ b/dxr3demuxdevice.c @@ -164,18 +164,12 @@ void cDxr3DemuxDevice::SetTrickMode(eDxr3TrickState trickState, int Speed) } // ================================== -void cDxr3DemuxDevice::StillPicture(const uint8_t* buf, int length) +void cDxr3DemuxDevice::StillPicture() { m_vBuf.Clear(); m_aBuf.Clear(); m_demuxMode = DXR3_DEMUX_TRICK_MODE; m_trickState = DXR3_FREEZE; - - dsyslog("dxr3: demux: stillpicture length: %d", length); - - DemuxPes(buf, length); - DemuxPes(buf, length); - DemuxPes(buf, length); } // ================================== diff --git a/dxr3demuxdevice.h b/dxr3demuxdevice.h index 60de113..35a5a21 100644 --- a/dxr3demuxdevice.h +++ b/dxr3demuxdevice.h @@ -50,7 +50,7 @@ public: int DemuxPes(const uint8_t* buf, int length, bool bAc3Dts = false); int DemuxAudioPes(const uint8_t* buf, int length); - void StillPicture(const uint8_t* buf, int length); + void StillPicture(); eDxr3DemuxMode GetDemuxMode() { return m_demuxMode; } eDxr3TrickState GetTrickState() { return m_trickState; }; diff --git a/dxr3device.c b/dxr3device.c index d57afbe..4cc89b2 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -156,7 +156,7 @@ void cDxr3Device::Mute() //! displays the given I-frame as a still picture. void cDxr3Device::StillPicture(const uchar *Data, int Length) { - m_DemuxDevice.StillPicture(Data, Length); + m_DemuxDevice.StillPicture(); } // ================================== -- cgit v1.2.3