From 45834b805b2a64fd725f1c430abe5db1fa327ce1 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 9 Feb 2021 10:53:44 +0800 Subject: [PATCH] RTC: Refine RTP header, never extends from any class --- trunk/src/kernel/srs_kernel_rtc_rtp.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/trunk/src/kernel/srs_kernel_rtc_rtp.hpp b/trunk/src/kernel/srs_kernel_rtc_rtp.hpp index b843dc201..741a4fafb 100644 --- a/trunk/src/kernel/srs_kernel_rtc_rtp.hpp +++ b/trunk/src/kernel/srs_kernel_rtc_rtp.hpp @@ -126,7 +126,8 @@ private: uint8_t ids_[kRtpExtensionNumberOfExtensions]; }; -class SrsRtpExtensionTwcc : public ISrsCodec +// Note that the extensions should never extends from any class, for performance. +class SrsRtpExtensionTwcc// : public ISrsCodec { bool has_twcc_; uint8_t id_; @@ -148,7 +149,8 @@ public: virtual uint64_t nb_bytes(); }; -class SrsRtpExtensionOneByte : public ISrsCodec +// Note that the extensions should never extends from any class, for performance. +class SrsRtpExtensionOneByte// : public ISrsCodec { bool has_ext_; int id_; @@ -169,7 +171,8 @@ public: virtual uint64_t nb_bytes() { return 2; }; }; -class SrsRtpExtensions : public ISrsCodec +// Note that the extensions should never extends from any class, for performance. +class SrsRtpExtensions// : public ISrsCodec { private: bool has_ext_; @@ -197,7 +200,8 @@ public: virtual uint64_t nb_bytes(); }; -class SrsRtpHeader : public ISrsCodec +// Note that the header should never extends from any class, for performance. +class SrsRtpHeader// : public ISrsCodec { private: uint8_t padding_length;