[rtp_rtcp] rtcp::Remb moved into own file
Cleaning/Parsing will be done in the https://codereview.webrtc.org/1552773002/ BUG=webrtc:5260 R=asapersson@webrtc.org, åsapersson Review URL: https://codereview.webrtc.org/1590883002 . Cr-Commit-Position: refs/heads/master@{#11268}
This commit is contained in:
@ -353,62 +353,6 @@ class Fir : public RtcpPacket {
|
||||
RTCPUtility::RTCPPacketPSFBFIRItem fir_item_;
|
||||
};
|
||||
|
||||
// Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb).
|
||||
//
|
||||
// 0 1 2 3
|
||||
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// |V=2|P| FMT=15 | PT=206 | length |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | SSRC of packet sender |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | SSRC of media source |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | Unique identifier 'R' 'E' 'M' 'B' |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | Num SSRC | BR Exp | BR Mantissa |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | SSRC feedback |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | ...
|
||||
|
||||
class Remb : public RtcpPacket {
|
||||
public:
|
||||
Remb() : RtcpPacket() {
|
||||
memset(&remb_, 0, sizeof(remb_));
|
||||
memset(&remb_item_, 0, sizeof(remb_item_));
|
||||
}
|
||||
|
||||
virtual ~Remb() {}
|
||||
|
||||
void From(uint32_t ssrc) {
|
||||
remb_.SenderSSRC = ssrc;
|
||||
}
|
||||
void AppliesTo(uint32_t ssrc);
|
||||
|
||||
void WithBitrateBps(uint32_t bitrate_bps) {
|
||||
remb_item_.BitRate = bitrate_bps;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool Create(uint8_t* packet,
|
||||
size_t* index,
|
||||
size_t max_length,
|
||||
RtcpPacket::PacketReadyCallback* callback) const override;
|
||||
|
||||
private:
|
||||
static const int kMaxNumberOfSsrcs = 0xff;
|
||||
|
||||
size_t BlockLength() const {
|
||||
return (remb_item_.NumberOfSSRCs + 5) * 4;
|
||||
}
|
||||
|
||||
RTCPUtility::RTCPPacketPSFBAPP remb_;
|
||||
RTCPUtility::RTCPPacketPSFBREMBItem remb_item_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(Remb);
|
||||
};
|
||||
|
||||
// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR).
|
||||
//
|
||||
// Format for XR packets:
|
||||
|
||||
Reference in New Issue
Block a user