Style fixes in rtcp_packet/
1. To make the files conform to chromium-style guidelines, and stop the compiler from complaing: 1.1. Move constructors out of .h file. 1.2. Move destructors out of .h file. 1.3. Move virtual functions out of .h file. 2. BlockLength() and Create() did not have consistent access modifiers in the various subclasses of RtcpPacket. Change the access level to public throughout. 3. Reorder BlockLength() and Create() where necessary, to reflect the order defined in the parent class (RtcpPacket). BUG=None Review-Url: https://codereview.webrtc.org/2937403002 Cr-Commit-Position: refs/heads/master@{#18633}
This commit is contained in:
@ -26,8 +26,8 @@ class Remb : public Psfb {
|
||||
static constexpr uint8_t kFeedbackMessageType = 15;
|
||||
static constexpr size_t kMaxNumberOfSsrcs = 0xff;
|
||||
|
||||
Remb() : bitrate_bps_(0) {}
|
||||
~Remb() override {}
|
||||
Remb();
|
||||
~Remb() override;
|
||||
|
||||
// Parse assumes header is already parsed and validated.
|
||||
bool Parse(const CommonHeader& packet);
|
||||
@ -38,16 +38,13 @@ class Remb : public Psfb {
|
||||
uint64_t bitrate_bps() const { return bitrate_bps_; }
|
||||
const std::vector<uint32_t>& ssrcs() const { return ssrcs_; }
|
||||
|
||||
protected:
|
||||
size_t BlockLength() const override;
|
||||
|
||||
bool Create(uint8_t* packet,
|
||||
size_t* index,
|
||||
size_t max_length,
|
||||
RtcpPacket::PacketReadyCallback* callback) const override;
|
||||
|
||||
size_t BlockLength() const override {
|
||||
return kHeaderLength + kCommonFeedbackLength + (2 + ssrcs_.size()) * 4;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr uint32_t kUniqueIdentifier = 0x52454D42; // 'R' 'E' 'M' 'B'.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user