Frame marking RTP header extension (PART 1: implement extension)
Bug: webrtc:7765
Change-Id: I23896d121afd6be4bce5ff4deaf736149efebcdb
Reviewed-on: https://webrtc-review.googlesource.com/85200
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24695}
diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.h b/modules/rtp_rtcp/source/rtp_header_extensions.h
index 4e1afc1..84e9831 100644
--- a/modules/rtp_rtcp/source/rtp_header_extensions.h
+++ b/modules/rtp_rtcp/source/rtp_header_extensions.h
@@ -153,6 +153,22 @@
uint8_t idx);
};
+class FrameMarkingExtension {
+ public:
+ static constexpr RTPExtensionType kId = kRtpExtensionFrameMarking;
+ static constexpr const char kUri[] =
+ "http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07";
+
+ static bool Parse(rtc::ArrayView<const uint8_t> data,
+ FrameMarking* frame_marking);
+ static size_t ValueSize(const FrameMarking& frame_marking);
+ static bool Write(rtc::ArrayView<uint8_t> data,
+ const FrameMarking& frame_marking);
+
+ private:
+ static bool IsScalable(uint8_t temporal_id, uint8_t layer_id);
+};
+
// Base extension class for RTP header extensions which are strings.
// Subclasses must defined kId and kUri static constexpr members.
class BaseRtpStringExtension {