diff options
author | Thomas Reufer <thomas@reufer.ch> | 2014-02-19 21:16:57 +0100 |
---|---|---|
committer | Thomas Reufer <thomas@reufer.ch> | 2014-02-19 21:16:57 +0100 |
commit | 4c8dffd4f05631a1ce79679a4a00bcfd97004606 (patch) | |
tree | 8ea9eee6a9c0364ab8c27b8ff499c8690cf98ca5 | |
parent | 08fbcd71c6cf464cd0389999709a4653701952b2 (diff) | |
download | vdr-plugin-rpihddevice-4c8dffd4f05631a1ce79679a4a00bcfd97004606.tar.gz vdr-plugin-rpihddevice-4c8dffd4f05631a1ce79679a4a00bcfd97004606.tar.bz2 |
set clock latency target according omxplayer
-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); |