Replace virtual RtcpPacket::SetSenderSsrc with base member
to slightly improve binary size. Bug: None Change-Id: I894c7d67a72f4a8077963d2ba0a7bb471a2e7e4d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156300 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29428}
This commit is contained in:
committed by
Commit Bot
parent
907f1548af
commit
cbbfd08423
@ -37,7 +37,7 @@ constexpr size_t App::kMaxDataSize;
|
||||
// 8 | application-dependent data ...
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
App::App() : sub_type_(0), ssrc_(0), name_(0) {}
|
||||
App::App() : sub_type_(0), name_(0) {}
|
||||
|
||||
App::~App() = default;
|
||||
|
||||
@ -53,7 +53,7 @@ bool App::Parse(const CommonHeader& packet) {
|
||||
return false;
|
||||
}
|
||||
sub_type_ = packet.fmt();
|
||||
ssrc_ = ByteReader<uint32_t>::ReadBigEndian(&packet.payload()[0]);
|
||||
SetSenderSsrc(ByteReader<uint32_t>::ReadBigEndian(&packet.payload()[0]));
|
||||
name_ = ByteReader<uint32_t>::ReadBigEndian(&packet.payload()[4]);
|
||||
data_.SetData(packet.payload() + kAppBaseLength,
|
||||
packet.payload_size_bytes() - kAppBaseLength);
|
||||
@ -89,7 +89,7 @@ bool App::Create(uint8_t* packet,
|
||||
const size_t index_end = *index + BlockLength();
|
||||
CreateHeader(sub_type_, kPacketType, HeaderLength(), packet, index);
|
||||
|
||||
ByteWriter<uint32_t>::WriteBigEndian(&packet[*index + 0], ssrc_);
|
||||
ByteWriter<uint32_t>::WriteBigEndian(&packet[*index + 0], sender_ssrc());
|
||||
ByteWriter<uint32_t>::WriteBigEndian(&packet[*index + 4], name_);
|
||||
memcpy(&packet[*index + 8], data_.data(), data_.size());
|
||||
*index += (8 + data_.size());
|
||||
|
||||
Reference in New Issue
Block a user