#include <icy/av/fpscounter.h>Inherits:
PacketProcessor
PacketStream processor that caps packet throughput to a maximum FPS.
If the observed frame rate exceeds the configured FPS budget, packets are dropped until the rate falls back under the limit.
Note that previous processors must not fragment packets, otherwise this class will not be accurate, and the packet drop rate will be too high.
| Return | Name | Description |
|---|---|---|
PacketSignal | emitter |
PacketSignal emitter| Return | Name | Description |
|---|---|---|
FPSLimiter inline | Construct the limiter. | |
void | process virtual inline | Process a packet: forward it if within the rate limit, drop it otherwise. |
void | onStreamStateChange virtual inline | Reset the FPS counter when the stream state changes. |
inline
inline FPSLimiter(int max, bool videoOnly)Construct the limiter.
max The maximum allowed frame rate in frames per second.
videoOnly If true, non-VideoPacket packets are always forwarded regardless of rate.
virtual inline
virtual inline void process(IPacket & packet)Process a packet: forward it if within the rate limit, drop it otherwise.
packet The incoming packet to evaluate.virtual inline
virtual inline void onStreamStateChange(const PacketStreamState &)Reset the FPS counter when the stream state changes.
| Return | Name | Description |
|---|---|---|
int | _max | |
bool | _videoOnly | |
legacy::FPSCounter | _counter |
int _maxbool _videoOnlylegacy::FPSCounter _counter