[feat] use the io statistics module to collect network information

This commit is contained in:
dijunkun
2024-11-29 17:53:30 +08:00
parent 11d84068a4
commit daef6f19dc
34 changed files with 405 additions and 102 deletions

View File

@@ -0,0 +1,46 @@
/*
* @Author: DI JUNKUN
* @Date: 2024-04-22
* Copyright (c) 2024 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _OBU_PARSER_H_
#define _OBU_PARSER_H_
#include <cstddef>
#include <cstdint>
#include <vector>
#include "obu.h"
#include "rtp_packet.h"
namespace obu {
typedef enum {
OBU_SEQUENCE_HEADER = 1,
OBU_TEMPORAL_DELIMITER = 2,
OBU_FRAME_HEADER = 3,
OBU_TILE_GROUP = 4,
OBU_METADATA = 5,
OBU_FRAME = 6,
OBU_REDUNDANT_FRAME_HEADER = 7,
OBU_TILE_LIST = 8,
OBU_PADDING = 15,
} OBU_TYPE;
std::vector<Obu> ParseObus(uint8_t* payload, int payload_size);
std::vector<Packet> Packetize(std::vector<Obu> obus);
bool NextPacket(RtpPacket* packet);
const char* ObuTypeToString(OBU_TYPE type);
bool ObuHasExtension(uint8_t obu_header);
bool ObuHasSize(uint8_t obu_header);
int ObuType(uint8_t obu_header);
} // namespace obu
#endif