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:
committed by
WebRTC LUCI CQ
parent
dc8fc72204
commit
d0321c5e5a
@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_dependency_descriptor_extension.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_generic_frame_descriptor_extension.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
@ -23,12 +24,12 @@ namespace {
|
||||
|
||||
struct ExtensionInfo {
|
||||
RTPExtensionType type;
|
||||
const char* uri;
|
||||
absl::string_view uri;
|
||||
};
|
||||
|
||||
template <typename Extension>
|
||||
constexpr ExtensionInfo CreateExtensionInfo() {
|
||||
return {Extension::kId, Extension::kUri};
|
||||
return {Extension::kId, Extension::Uri()};
|
||||
}
|
||||
|
||||
constexpr ExtensionInfo kExtensions[] = {
|
||||
@ -135,7 +136,7 @@ void RtpHeaderExtensionMap::Deregister(absl::string_view uri) {
|
||||
|
||||
bool RtpHeaderExtensionMap::Register(int id,
|
||||
RTPExtensionType type,
|
||||
const char* uri) {
|
||||
absl::string_view uri) {
|
||||
RTC_DCHECK_GT(type, kRtpExtensionNone);
|
||||
RTC_DCHECK_LT(type, kRtpExtensionNumberOfExtensions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user