mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[feat] implementation for qos module
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user