Add sending Nack to RtcpTransceiver
Bug: webrtc:8239 Change-Id: Idf27bb05958d9eceaf601078019f05444232581f Reviewed-on: https://webrtc-review.googlesource.com/26260 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20907}
This commit is contained in:
committed by
Commit Bot
parent
2f061681cc
commit
327c43c29b
@ -11,6 +11,7 @@
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/nack.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "modules/rtp_rtcp/source/byte_io.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
|
||||
@ -123,9 +124,13 @@ bool Nack::Create(uint8_t* packet,
|
||||
|
||||
void Nack::SetPacketIds(const uint16_t* nack_list, size_t length) {
|
||||
RTC_DCHECK(nack_list);
|
||||
SetPacketIds(std::vector<uint16_t>(nack_list, nack_list + length));
|
||||
}
|
||||
|
||||
void Nack::SetPacketIds(std::vector<uint16_t> nack_list) {
|
||||
RTC_DCHECK(packet_ids_.empty());
|
||||
RTC_DCHECK(packed_.empty());
|
||||
packet_ids_.assign(nack_list, nack_list + length);
|
||||
packet_ids_ = std::move(nack_list);
|
||||
Pack();
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ class Nack : public Rtpfb {
|
||||
bool Parse(const CommonHeader& packet);
|
||||
|
||||
void SetPacketIds(const uint16_t* nack_list, size_t length);
|
||||
void SetPacketIds(std::vector<uint16_t> nack_list);
|
||||
const std::vector<uint16_t>& packet_ids() const { return packet_ids_; }
|
||||
|
||||
size_t BlockLength() const override;
|
||||
|
||||
Reference in New Issue
Block a user