|
vdr-plugin-softhddevice-drm-gles 1.6.2
|
Fill Level Low Pass Filter. More...
#include <filllevel.h>
Public Member Functions | |
| void | Reset () |
| Resets the filter state. | |
| void | ResetFramesCounters () |
| Resets the received and written frames counters. | |
| int | GetFramesReceived () |
| int | GetFramesPlayed () |
| void | ReceivedFrames (int count) |
| void | WroteFrames (int count) |
| double | GetBufferFillLevelFramesAvg () |
| void | SetMinBufferSizeFrames (int size) |
| void | UpdateAvgBufferFillLevel (int) |
| Updates the buffer fill level average. | |
| bool | IsSettled () |
Private Types | |
| enum | State { UNINITIALIZED , SETTLING , SETTLED } |
Private Member Functions | |
| const char * | StateToString (State d) |
| Converts the filter state to a string representation. | |
Private Attributes | |
| std::mutex | m_mutex |
| State | m_state = UNINITIALIZED |
| int | m_receivedFrames = 0 |
| int | m_writtenToAlsaFrames = 0 |
| double | m_bufferFillLevelFramesAvg = 0 |
| double | m_bufferFillLevelFramesTargetValue = 0 |
| int | m_frameCounter = 0 |
| double | m_floatingAverageAlpha = FLOATING_AVERAGE_ALPHA_NORMAL |
| int | m_minBufferSizeFrames = 0 |
Static Private Attributes | |
| static constexpr double | FLOATING_AVERAGE_ALPHA_SETTLING = 0.02 |
| static constexpr double | FLOATING_AVERAGE_ALPHA_NORMAL = 0.002 |
| static constexpr int | SETTLING_DURATION_PACKETS = 30 / 0.16 |
Fill Level Low Pass Filter.
Definition at line 23 of file filllevel.h.
| Enumerator | |
|---|---|
| UNINITIALIZED | |
| SETTLING | |
| SETTLED | |
Definition at line 37 of file filllevel.h.
|
inline |
Definition at line 31 of file filllevel.h.
References m_bufferFillLevelFramesAvg, and m_mutex.
Referenced by cSoftHdAudio::ClockDriftCompensation().
|
inline |
Definition at line 28 of file filllevel.h.
References m_mutex, and m_writtenToAlsaFrames.
|
inline |
Definition at line 27 of file filllevel.h.
References m_mutex, and m_receivedFrames.
|
inline |
Definition at line 34 of file filllevel.h.
References m_mutex, m_state, and SETTLED.
Referenced by cSoftHdAudio::ClockDriftCompensation().
Definition at line 29 of file filllevel.h.
References m_mutex, and m_receivedFrames.
Referenced by cSoftHdAudio::Enqueue().
Definition at line 32 of file filllevel.h.
References m_minBufferSizeFrames, and m_mutex.
Definition at line 30 of file filllevel.h.
References m_mutex, and m_writtenToAlsaFrames.
Referenced by cSoftHdAudio::DropSamplesOlderThanPtsMs(), and cSoftHdAudio::SendAudio().
|
staticconstexprprivate |
Definition at line 44 of file filllevel.h.
Referenced by UpdateAvgBufferFillLevel().
|
staticconstexprprivate |
Definition at line 43 of file filllevel.h.
Referenced by UpdateAvgBufferFillLevel().
|
private |
Definition at line 51 of file filllevel.h.
Referenced by GetBufferFillLevelFramesAvg(), Reset(), and UpdateAvgBufferFillLevel().
|
private |
Definition at line 52 of file filllevel.h.
Referenced by UpdateAvgBufferFillLevel().
|
private |
Definition at line 54 of file filllevel.h.
Referenced by UpdateAvgBufferFillLevel().
|
private |
Definition at line 53 of file filllevel.h.
Referenced by Reset(), and UpdateAvgBufferFillLevel().
|
private |
Definition at line 55 of file filllevel.h.
Referenced by SetMinBufferSizeFrames(), and UpdateAvgBufferFillLevel().
|
private |
Definition at line 47 of file filllevel.h.
Referenced by GetBufferFillLevelFramesAvg(), GetFramesPlayed(), GetFramesReceived(), IsSettled(), ReceivedFrames(), SetMinBufferSizeFrames(), UpdateAvgBufferFillLevel(), and WroteFrames().
|
private |
Definition at line 49 of file filllevel.h.
Referenced by GetFramesReceived(), ReceivedFrames(), ResetFramesCounters(), and UpdateAvgBufferFillLevel().
|
private |
Definition at line 48 of file filllevel.h.
Referenced by IsSettled(), Reset(), and UpdateAvgBufferFillLevel().
|
private |
Definition at line 50 of file filllevel.h.
Referenced by GetFramesPlayed(), ResetFramesCounters(), UpdateAvgBufferFillLevel(), and WroteFrames().
|
staticconstexprprivate |
Definition at line 45 of file filllevel.h.
Referenced by UpdateAvgBufferFillLevel().