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:
@@ -190,7 +190,7 @@ class RtpPacket {
|
||||
RtpPacket &operator=(const RtpPacket &rtp_packet);
|
||||
RtpPacket &operator=(RtpPacket &&rtp_packet);
|
||||
|
||||
~RtpPacket();
|
||||
virtual ~RtpPacket();
|
||||
|
||||
public:
|
||||
// Set Header
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "rtp_packet_received.h"
|
||||
|
||||
RtpPacketReceived::RtpPacketReceived() = default;
|
||||
RtpPacketReceived::RtpPacketReceived(int64_t arrival_time)
|
||||
: arrival_time_(arrival_time) {}
|
||||
RtpPacketReceived::RtpPacketReceived(const RtpPacketReceived& packet) = default;
|
||||
RtpPacketReceived::RtpPacketReceived(RtpPacketReceived&& packet) = default;
|
||||
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "enc_mark.h"
|
||||
#include "rtp_packet.h"
|
||||
|
||||
class RtpPacketReceived : public RtpPacket {
|
||||
public:
|
||||
RtpPacketReceived();
|
||||
explicit RtpPacketReceived(
|
||||
int64_t arrival_time = (std::numeric_limits<int64_t>::min)());
|
||||
RtpPacketReceived(const RtpPacketReceived& packet);
|
||||
RtpPacketReceived(RtpPacketReceived&& packet);
|
||||
|
||||
@@ -24,8 +23,29 @@ class RtpPacketReceived : public RtpPacket {
|
||||
|
||||
~RtpPacketReceived();
|
||||
|
||||
public:
|
||||
int64_t arrival_time() const { return arrival_time_; }
|
||||
void set_arrival_time(int64_t time) { arrival_time_ = time; }
|
||||
|
||||
// Explicit Congestion Notification (ECN), RFC-3168, Section 5.
|
||||
// Used by L4S: https://www.rfc-editor.org/rfc/rfc9331.html
|
||||
EcnMarking ecn() const { return ecn_; }
|
||||
void set_ecn(EcnMarking ecn) { ecn_ = ecn; }
|
||||
|
||||
// Flag if packet was recovered via RTX or FEC.
|
||||
bool recovered() const { return recovered_; }
|
||||
void set_recovered(bool value) { recovered_ = value; }
|
||||
|
||||
int payload_type_frequency() const { return payload_type_frequency_; }
|
||||
void set_payload_type_frequency(int value) {
|
||||
payload_type_frequency_ = value;
|
||||
}
|
||||
|
||||
private:
|
||||
int64_t arrival_time_ = (std::numeric_limits<int64_t>::min)();
|
||||
int64_t arrival_time_ = std::numeric_limits<int64_t>::min();
|
||||
EcnMarking ecn_ = EcnMarking::kNotEct;
|
||||
int payload_type_frequency_ = 0;
|
||||
bool recovered_ = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user