aboutsummaryrefslogtreecommitdiff
path: root/modules/rtp_rtcp/source/rtp_header_extensions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rtp_rtcp/source/rtp_header_extensions.cc')
-rw-r--r--modules/rtp_rtcp/source/rtp_header_extensions.cc80
1 files changed, 0 insertions, 80 deletions
diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.cc b/modules/rtp_rtcp/source/rtp_header_extensions.cc
index fefe6c618f..527874d785 100644
--- a/modules/rtp_rtcp/source/rtp_header_extensions.cc
+++ b/modules/rtp_rtcp/source/rtp_header_extensions.cc
@@ -525,86 +525,6 @@ bool VideoTimingExtension::Write(rtc::ArrayView<uint8_t> data,
return true;
}
-// Frame Marking.
-//
-// Meta-information about an RTP stream outside the encrypted media payload,
-// useful for an RTP switch to do codec-agnostic selective forwarding
-// without decrypting the payload.
-//
-// For non-scalable streams:
-// 0 1
-// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | ID | L = 0 |S|E|I|D|0 0 0 0|
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//
-// For scalable streams:
-// 0 1 2 3
-// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | ID | L = 2 |S|E|I|D|B| TID | LID | TL0PICIDX |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-constexpr RTPExtensionType FrameMarkingExtension::kId;
-constexpr const char FrameMarkingExtension::kUri[];
-
-bool FrameMarkingExtension::IsScalable(uint8_t temporal_id, uint8_t layer_id) {
- return temporal_id != kNoTemporalIdx || layer_id != kNoSpatialIdx;
-}
-
-bool FrameMarkingExtension::Parse(rtc::ArrayView<const uint8_t> data,
- FrameMarking* frame_marking) {
- RTC_DCHECK(frame_marking);
-
- if (data.size() != 1 && data.size() != 3)
- return false;
-
- frame_marking->start_of_frame = (data[0] & 0x80) != 0;
- frame_marking->end_of_frame = (data[0] & 0x40) != 0;
- frame_marking->independent_frame = (data[0] & 0x20) != 0;
- frame_marking->discardable_frame = (data[0] & 0x10) != 0;
-
- if (data.size() == 3) {
- frame_marking->base_layer_sync = (data[0] & 0x08) != 0;
- frame_marking->temporal_id = data[0] & 0x7;
- frame_marking->layer_id = data[1];
- frame_marking->tl0_pic_idx = data[2];
- } else {
- // non-scalable
- frame_marking->base_layer_sync = false;
- frame_marking->temporal_id = kNoTemporalIdx;
- frame_marking->layer_id = kNoSpatialIdx;
- frame_marking->tl0_pic_idx = 0;
- }
- return true;
-}
-
-size_t FrameMarkingExtension::ValueSize(const FrameMarking& frame_marking) {
- if (IsScalable(frame_marking.temporal_id, frame_marking.layer_id))
- return 3;
- else
- return 1;
-}
-
-bool FrameMarkingExtension::Write(rtc::ArrayView<uint8_t> data,
- const FrameMarking& frame_marking) {
- RTC_DCHECK_GE(data.size(), 1);
- RTC_CHECK_LE(frame_marking.temporal_id, 0x07);
- data[0] = frame_marking.start_of_frame ? 0x80 : 0x00;
- data[0] |= frame_marking.end_of_frame ? 0x40 : 0x00;
- data[0] |= frame_marking.independent_frame ? 0x20 : 0x00;
- data[0] |= frame_marking.discardable_frame ? 0x10 : 0x00;
-
- if (IsScalable(frame_marking.temporal_id, frame_marking.layer_id)) {
- RTC_DCHECK_EQ(data.size(), 3);
- data[0] |= frame_marking.base_layer_sync ? 0x08 : 0x00;
- data[0] |= frame_marking.temporal_id & 0x07;
- data[1] = frame_marking.layer_id;
- data[2] = frame_marking.tl0_pic_idx;
- }
- return true;
-}
-
// Color space including HDR metadata as an optional field.
//
// RTP header extension to carry color space information and optionally HDR