diff options
author | scop <scop> | 2005-03-22 21:08:54 +0000 |
---|---|---|
committer | scop <scop> | 2005-03-22 21:08:54 +0000 |
commit | 0fe72c3a9fd426c66b25e9372000652396fdbdf7 (patch) | |
tree | 79ba111895118088bd8339dd5e72fa5da58c2f30 | |
parent | 27e4b6b82dffe5585ca0f563ff34c3e329652949 (diff) | |
download | vdr-plugin-dxr3-0fe72c3a9fd426c66b25e9372000652396fdbdf7.tar.gz vdr-plugin-dxr3-0fe72c3a9fd426c66b25e9372000652396fdbdf7.tar.bz2 |
Avoid high CPU usage in pause mode.
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | dxr3device.c | 11 |
2 files changed, 12 insertions, 0 deletions
@@ -281,5 +281,6 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - assume SSE support implies MMXEXT support, this enables optimized memcpy routines on more systems (Ville Skyttä) - avoid hang in pause mode with VDR >= 1.3.18 (Luca Olivetti) +- avoid high CPU usage in pause mode (Luca Olivetti, Klaus Schmidinger) - fix compilation with -fPIC, kudos to ffmpeg (Ville Skyttä) - eliminate some compiler warnings (Ville Skyttä) diff --git a/dxr3device.c b/dxr3device.c index b42ed7f..d560496 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -276,6 +276,17 @@ void cDxr3Device::StillPicture(const uchar *Data, int Length) // ================================== bool cDxr3Device::Poll(cPoller &Poller, int TimeoutMs) { + if ((m_DemuxDevice.GetDemuxMode() == DXR3_DEMUX_TRICK_MODE && + m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || + cDxr3Interface::Instance().IsExternalReleased()) + { +#if VDRVERSNUM >= 10314 + cCondWait::SleepMs(TimeoutMs); +#else + usleep(TimeoutMs * 1000); +#endif + return false; + } return m_DemuxDevice.Poll(TimeoutMs); // Poller.Poll(TimeoutMs); } |