Deduplicate set of the rtp header extension uri constants

Bug: webrtc:7472
Change-Id: Ic0b4f2cc3374ba70a043310b5046d8bf91f0acbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231949
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34990}
This commit is contained in:
Danil Chapovalov
2021-09-14 12:58:51 +02:00
committed by WebRTC LUCI CQ
parent dc8fc72204
commit d0321c5e5a
20 changed files with 205 additions and 129 deletions

View File

@ -856,7 +856,7 @@ struct UncopyableValue {
};
struct UncopyableExtension {
static constexpr RTPExtensionType kId = kRtpExtensionGenericFrameDescriptor02;
static constexpr char kUri[] = "uri";
static constexpr absl::string_view Uri() { return "uri"; }
static size_t ValueSize(const UncopyableValue& value) { return 1; }
static bool Write(rtc::ArrayView<uint8_t> data,
@ -869,7 +869,6 @@ struct UncopyableExtension {
}
};
constexpr RTPExtensionType UncopyableExtension::kId;
constexpr char UncopyableExtension::kUri[];
TEST(RtpPacketTest, SetUncopyableExtension) {
RtpPacket::ExtensionManager extensions;