[feat] implementation for qos module

This commit is contained in:
dijunkun
2025-01-08 17:30:13 +08:00
parent 7a84b25b5c
commit de212a8e75
32 changed files with 482 additions and 249 deletions

View File

@@ -24,7 +24,7 @@
// --------------------------------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Common header for all RTCP packets, 4 octets.
bool CommonHeader::Parse(const uint8_t* buffer, size_t size_bytes) {
bool RtcpCommonHeader::Parse(const uint8_t* buffer, size_t size_bytes) {
const uint8_t kVersion = 2;
if (size_bytes < kHeaderSizeBytes) {

View File

@@ -13,13 +13,13 @@
#include <stddef.h>
#include <stdint.h>
class CommonHeader {
class RtcpCommonHeader {
public:
static constexpr size_t kHeaderSizeBytes = 4;
CommonHeader() {}
CommonHeader(const CommonHeader&) = default;
CommonHeader& operator=(const CommonHeader&) = default;
RtcpCommonHeader() {}
RtcpCommonHeader(const RtcpCommonHeader&) = default;
RtcpCommonHeader& operator=(const RtcpCommonHeader&) = default;
bool Parse(const uint8_t* buffer, size_t size_bytes);

View File

@@ -11,6 +11,7 @@
#include <stdint.h>
#include <functional>
#include <memory>
#include <vector>
class RtcpPacket {
@@ -59,4 +60,7 @@ class RtcpPacket {
uint32_t sender_ssrc_ = 0;
};
using RtcpSender =
std::function<void(std::vector<std::unique_ptr<RtcpPacket>> packets)>;
#endif