|
Hermes 0.7.0
Linux game streaming host
|
#include <src/video_loss_monitor.h>
Classes | |
| struct | report_t |
| One block's report. The wire format is big-endian. More... | |
Public Member Functions | |
| void | on_report (const report_t &report) |
| Count one block's report. | |
| void | on_sent (std::uint64_t packets, std::uint64_t data_packets) |
| std::uint64_t | sent_packets () const |
| Video packets sent to the client, parity included. | |
| std::uint64_t | sent_data_packets () const |
| std::uint64_t | repaired_blocks () const |
| Blocks the client rebuilt from parity: lost packets, no lost picture. | |
| std::uint64_t | dropped_frames () const |
| Frames the client dropped because a block could not be rebuilt. | |
| std::uint64_t | missing_packets () const |
| Packets missing from the blocks the client reported. | |
| std::uint64_t | reported_blocks () const |
Static Public Member Functions | |
| static std::optional< report_t > | parse (std::string_view payload) |
Static Public Attributes | |
| static constexpr std::size_t | report_size = 4 + 7 * 2 + 3 |
| The size of SS_FRAME_FEC_STATUS: a 32-bit frame index, seven 16-bit counts and three bytes. | |
What the client reported losing over a session, from its FEC status reports.
Everything the host measures is on its own side of the network. These reports are the client's view of the same packets, so they show loss the host cannot see: a congested hop, Wi-Fi, a slow port. Reports arrive on the control thread; the totals are atomic so a session can be summarized from whichever thread stops it.
Definition at line 35 of file video_loss_monitor.h.
|
inline |
Frames the client dropped because a block could not be rebuilt.
Definition at line 159 of file video_loss_monitor.h.
|
inline |
Packets missing from the blocks the client reported.
Definition at line 164 of file video_loss_monitor.h.
|
inline |
Count one block's report.
Definition at line 110 of file video_loss_monitor.h.
|
inline |
Count one FEC block sent to the client. Called by the video thread.
| packets | The block's packets, parity included. |
| data_packets | How many of them carry data. |
Definition at line 129 of file video_loss_monitor.h.
|
inlinestatic |
Parse an SS_FRAME_FEC_STATUS payload.
Definition at line 85 of file video_loss_monitor.h.
|
inline |
Blocks the client rebuilt from parity: lost packets, no lost picture.
Definition at line 154 of file video_loss_monitor.h.
|
inline |
Blocks the client reported on. Zero means it never sent SS_FRAME_FEC_STATUS, which is not the same as a link that lost nothing.
Definition at line 170 of file video_loss_monitor.h.
|
inline |
Data packets sent to the client: what a loss rate is measured against.
The client watches a block until it can rebuild it, which takes as many packets as the block has data. Parity of a block whose data all arrived, and parity behind the packet that completed a rebuild, are never looked at, so their losses are never reported. Dividing the reported loss by every packet sent would underestimate the loss rate by the parity share; dividing by the data packets does not.
Definition at line 149 of file video_loss_monitor.h.
|
inline |
Video packets sent to the client, parity included.
Definition at line 135 of file video_loss_monitor.h.
|
staticconstexpr |
The size of SS_FRAME_FEC_STATUS: a 32-bit frame index, seven 16-bit counts and three bytes.
Definition at line 79 of file video_loss_monitor.h.