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

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

Issue 2805023002: Add read support of RtpStreamId/RepairedRtpStreamId header extensions. (Closed)
Patch Set: . 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.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
index 543688c75e8c91ec36006ce8026b7c6e8e0ca7a9..9a8e42e94d661f6f74a13b9f57bd5efdb3299827 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
@@ -11,6 +11,7 @@
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_
#include <stdint.h>
+#include <string>
#include "webrtc/api/video/video_rotation.h"
#include "webrtc/base/array_view.h"
@@ -98,5 +99,29 @@ class PlayoutDelayLimits {
static bool Write(uint8_t* data, const PlayoutDelay& playout_delay);
};
+class RtpStreamId {
+ public:
+ static constexpr RTPExtensionType kId = kRtpExtensionRtpStreamId;
+ // TODO(danilchap): Avoid using full 16 bytes when webrtc will set the
+ // extension.
+ static constexpr uint8_t kValueSizeBytes = 16;
+ static constexpr const char* kUri =
+ "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id";
+
+ static bool Parse(rtc::ArrayView<const uint8_t> data, std::string* rid);
+};
+
+class RepairRtpStreamId {
+ public:
+ static constexpr RTPExtensionType kId = kRtpExtensionRepairRtpStreamId;
+ // TODO(danilchap): Avoid using full 16 bytes when webrtc will set the
+ // extension.
pthatcher1 2017/04/06 21:17:34 I don't understand this TODO. Only the WebRTC API
danilchap 2017/04/07 07:07:49 Rewritten TODO from note to self to (hopefully) mo
+ static constexpr uint8_t kValueSizeBytes = 16;
+ static constexpr const char* kUri =
+ "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id";
+
+ static bool Parse(rtc::ArrayView<const uint8_t> data, std::string* rid);
+};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_

Powered by Google App Engine
This is Rietveld 408576698