Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extension.h

Issue 2501893004: Simplify creating RtpHeaderExtensionMap in EventLogAnalyzer (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_header_extension.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h
index a8591c77e9dbb1a57395e0e94a3ff90ac036631e..1ec411dbcc55bed09e0213fbc4f682bce84e8477 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h
@@ -11,9 +11,9 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
-#include <initializer_list>
#include <string>
+#include "webrtc/base/array_view.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/checks.h"
#include "webrtc/config.h"
@@ -44,7 +44,7 @@ class RtpHeaderExtensionMap {
static constexpr uint8_t kInvalidId = 0;
RtpHeaderExtensionMap();
- RtpHeaderExtensionMap(std::initializer_list<RtpExtension>);
+ explicit RtpHeaderExtensionMap(rtc::ArrayView<const RtpExtension> extensions);
template <typename Extension>
bool Register(uint8_t id) {
@@ -73,7 +73,6 @@ class RtpHeaderExtensionMap {
size_t GetTotalLengthInBytes() const;
// TODO(danilchap): Remove use of the functions below.
- void Erase() { *this = RtpHeaderExtensionMap(); }
int32_t Register(RTPExtensionType type, uint8_t id) {
return RegisterByType(id, type) ? 0 : -1;
}
@@ -96,6 +95,7 @@ class RtpHeaderExtensionMap {
RTPExtensionType types_[kMaxId + 1];
uint8_t ids_[kRtpExtensionNumberOfExtensions];
};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698