Xbox Cloud Gaming app for PS5 Homebrew
C
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 RafaelNGP
// Counters of the video RTP receiver (see h264_receiver.h).
#pragma once
#include <atomic>
#include <cstdint>
namespace xc::stream {
struct VideoReceiveStats {
std::atomic<uint64_t> packets{0};
std::atomic<uint64_t> lost{0}; // sequence numbers that went missing
std::atomic<uint64_t> recovered{0}; // ...and later arrived (retransmitted)
std::atomic<uint64_t> nacks{0}; // NACK packets sent
std::atomic<uint64_t> framesOut{0};
std::atomic<uint64_t> framesDropped{0}; // incomplete, or waiting for a key frame
std::atomic<uint64_t> keyframeRequests{0};
std::atomic<uint32_t> receiveRate{0}; // bits/s, last report interval
std::atomic<uint32_t> estimate{0}; // bits/s offered to the server (REMB)
// Since the last read (StreamPlayer::stats() takes them): the longest
// wait between two video packets, the most frames handed on at once,
// and how much later a frame was ready than its RTP time says (a pause
// in delivery, or a frame held for a retransmission).
mutable std::atomic<uint64_t> maxGapMs{0}, maxBurst{0}, maxLateMs{0};
};
} // namespace xc::stream