[feat] net traffic stats supported

This commit is contained in:
dijunkun
2024-11-18 17:32:42 +08:00
parent 9d2e6f0c2a
commit c5c85f0785
5 changed files with 72 additions and 31 deletions

View File

@@ -42,10 +42,21 @@ extern "C" {
typedef struct {
const char* data;
size_t size;
unsigned int width;
unsigned int height;
uint32_t width;
uint32_t height;
} XVideoFrame;
typedef struct {
uint64_t video_in;
uint64_t video_out;
uint64_t audio_in;
uint64_t audio_out;
uint64_t data_in;
uint64_t data_out;
uint64_t total_in;
uint64_t total_out;
} XNetTrafficStats;
typedef struct Peer PeerPtr;
typedef void (*OnReceiveBuffer)(const char*, size_t, const char*, const size_t,
@@ -60,8 +71,7 @@ typedef void (*OnConnectionStatus)(ConnectionStatus, const char*, const size_t,
void*);
typedef void (*NetStatusReport)(const char*, const size_t, TraversalMode,
const unsigned short, const unsigned short,
void*);
const XNetTrafficStats*, void*);
typedef struct {
bool use_cfg_file;