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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc

Issue 2805023002: Add read support of RtpStreamId/RepairedRtpStreamId header extensions. (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
Index: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
index 1b311e64190cd80eb146ddba3628ac67a503d30d..3532d2f8d93c95fa062c130304c34b0b96c28636 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
@@ -215,4 +215,29 @@ bool PlayoutDelayLimits::Write(uint8_t* data,
return true;
}
+// RtpStreamId.
+constexpr RTPExtensionType RtpStreamId::kId;
+constexpr uint8_t RtpStreamId::kValueSizeBytes;
+constexpr const char* RtpStreamId::kUri;
+
+bool RtpStreamId::Parse(rtc::ArrayView<const uint8_t> data, StreamId* rsid) {
+ if (data.empty())
nisse-webrtc 2017/04/10 12:25:00 If we use nul-termination in StreamId, I think ids
danilchap 2017/04/10 13:27:05 General rule suggest to be strict about spec when
nisse-webrtc 2017/04/11 07:59:24 "Be liberal in what you accept, and conservati
danilchap 2017/04/11 10:05:26 I guess that was the quote I meant. was interestin
nisse-webrtc 2017/04/11 10:42:53 Fair enough. I'd prefer stricter parsing, but I do
+ return false;
+ rsid->Set(data);
+ return true;
+}
+
+// RepairedRtpStreamId.
+constexpr RTPExtensionType RepairedRtpStreamId::kId;
+constexpr uint8_t RepairedRtpStreamId::kValueSizeBytes;
+constexpr const char* RepairedRtpStreamId::kUri;
+
+bool RepairedRtpStreamId::Parse(rtc::ArrayView<const uint8_t> data,
+ StreamId* rsid) {
+ if (data.empty())
nisse-webrtc 2017/04/10 12:25:00 And here too.
danilchap 2017/04/11 10:05:26 ensured RapairedRtpStreamId::Parse implementation
+ return false;
+ rsid->Set(data);
+ return true;
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698