diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | omx.c | 21 | ||||
-rw-r--r-- | omx.h | 1 |
3 files changed, 23 insertions, 0 deletions
@@ -3,6 +3,7 @@ VDR Plugin 'rpihddevice' Revision History - fixed: - suppress buffer stall when clock is halted + - set clock latency target according omxplayer 2014-02-10: Version 0.0.8 ------------------------- @@ -358,6 +358,7 @@ int cOmx::Init(void) DBG("started with %d video and %d audio buffers", m_freeVideoBuffers, m_freeAudioBuffers); + SetClockLatencyTarget(); SetBufferStall(1500); FlushVideo(); @@ -612,6 +613,26 @@ void cOmx::SetClockReference(eClockReference clockReference) } } +void cOmx::SetClockLatencyTarget(void) +{ + OMX_CONFIG_LATENCYTARGETTYPE latencyTarget; + OMX_INIT_STRUCT(latencyTarget); + + // values set according reference implementation in omxplayer + latencyTarget.nPortIndex = OMX_ALL; + latencyTarget.bEnabled = OMX_TRUE; + latencyTarget.nFilter = 10; + latencyTarget.nTarget = 0; + latencyTarget.nShift = 3; + latencyTarget.nSpeedFactor = -200; + latencyTarget.nInterFactor = 100; + latencyTarget.nAdjCap = 100; + + if (OMX_SetConfig(ILC_GET_HANDLE(m_comp[eClock]), + OMX_IndexConfigLatencyTarget, &latencyTarget) != OMX_ErrorNone) + ELOG("failed set clock latency target!"); +} + void cOmx::SetBufferStall(int delayMs) { if (delayMs > 0) @@ -58,6 +58,7 @@ public: }; void SetClockReference(eClockReference clockReference); + void SetClockLatencyTarget(void); void SetVolume(int vol); void SetMute(bool mute); void SendEos(void); |