danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 10 | #ifndef MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
| 11 | #define MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 12 | |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 13 | #include <stddef.h> |
pbos | c7c26a0 | 2017-01-02 08:42:32 -0800 | [diff] [blame] | 14 | #include <stdint.h> |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 15 | #include <string> |
pbos | c7c26a0 | 2017-01-02 08:42:32 -0800 | [diff] [blame] | 16 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 17 | #include "api/array_view.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 18 | #include "api/rtp_headers.h" |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 19 | #include "api/video/color_space.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 20 | #include "api/video/video_content_type.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 21 | #include "api/video/video_frame_marking.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 22 | #include "api/video/video_rotation.h" |
| 23 | #include "api/video/video_timing.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 24 | #include "common_types.h" // NOLINT(build/include) |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 25 | #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 26 | |
| 27 | namespace webrtc { |
| 28 | |
| 29 | class AbsoluteSendTime { |
| 30 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 31 | using value_type = uint32_t; |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 32 | static constexpr RTPExtensionType kId = kRtpExtensionAbsoluteSendTime; |
| 33 | static constexpr uint8_t kValueSizeBytes = 3; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 34 | static constexpr const char kUri[] = |
danilchap | 6ba58d6 | 2016-11-09 05:46:39 -0800 | [diff] [blame] | 35 | "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; |
danilchap | e2a0177 | 2016-10-28 07:08:58 -0700 | [diff] [blame] | 36 | |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 37 | static bool Parse(rtc::ArrayView<const uint8_t> data, uint32_t* time_24bits); |
Danil Chapovalov | f3ba648 | 2017-06-12 15:43:55 +0200 | [diff] [blame] | 38 | static size_t ValueSize(uint32_t time_24bits) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 39 | static bool Write(rtc::ArrayView<uint8_t> data, uint32_t time_24bits); |
danilchap | a897f26 | 2016-08-26 05:42:41 -0700 | [diff] [blame] | 40 | |
| 41 | static constexpr uint32_t MsTo24Bits(int64_t time_ms) { |
| 42 | return static_cast<uint32_t>(((time_ms << 18) + 500) / 1000) & 0x00FFFFFF; |
| 43 | } |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | class AudioLevel { |
| 47 | public: |
| 48 | static constexpr RTPExtensionType kId = kRtpExtensionAudioLevel; |
| 49 | static constexpr uint8_t kValueSizeBytes = 1; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 50 | static constexpr const char kUri[] = |
danilchap | 6ba58d6 | 2016-11-09 05:46:39 -0800 | [diff] [blame] | 51 | "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; |
danilchap | e2a0177 | 2016-10-28 07:08:58 -0700 | [diff] [blame] | 52 | |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 53 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 54 | bool* voice_activity, |
| 55 | uint8_t* audio_level); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 56 | static size_t ValueSize(bool voice_activity, uint8_t audio_level) { |
| 57 | return kValueSizeBytes; |
| 58 | } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 59 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 60 | bool voice_activity, |
| 61 | uint8_t audio_level); |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | class TransmissionOffset { |
| 65 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 66 | using value_type = int32_t; |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 67 | static constexpr RTPExtensionType kId = kRtpExtensionTransmissionTimeOffset; |
| 68 | static constexpr uint8_t kValueSizeBytes = 3; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 69 | static constexpr const char kUri[] = "urn:ietf:params:rtp-hdrext:toffset"; |
danilchap | e2a0177 | 2016-10-28 07:08:58 -0700 | [diff] [blame] | 70 | |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 71 | static bool Parse(rtc::ArrayView<const uint8_t> data, int32_t* rtp_time); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 72 | static size_t ValueSize(int32_t rtp_time) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 73 | static bool Write(rtc::ArrayView<uint8_t> data, int32_t rtp_time); |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 74 | }; |
| 75 | |
| 76 | class TransportSequenceNumber { |
| 77 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 78 | using value_type = uint16_t; |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 79 | static constexpr RTPExtensionType kId = kRtpExtensionTransportSequenceNumber; |
| 80 | static constexpr uint8_t kValueSizeBytes = 2; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 81 | static constexpr const char kUri[] = |
danilchap | 6ba58d6 | 2016-11-09 05:46:39 -0800 | [diff] [blame] | 82 | "http://www.ietf.org/id/" |
| 83 | "draft-holmer-rmcat-transport-wide-cc-extensions-01"; |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 84 | static bool Parse(rtc::ArrayView<const uint8_t> data, uint16_t* value); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 85 | static size_t ValueSize(uint16_t value) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 86 | static bool Write(rtc::ArrayView<uint8_t> data, uint16_t value); |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | class VideoOrientation { |
| 90 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 91 | using value_type = VideoRotation; |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 92 | static constexpr RTPExtensionType kId = kRtpExtensionVideoRotation; |
| 93 | static constexpr uint8_t kValueSizeBytes = 1; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 94 | static constexpr const char kUri[] = "urn:3gpp:video-orientation"; |
danilchap | e2a0177 | 2016-10-28 07:08:58 -0700 | [diff] [blame] | 95 | |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 96 | static bool Parse(rtc::ArrayView<const uint8_t> data, VideoRotation* value); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 97 | static size_t ValueSize(VideoRotation) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 98 | static bool Write(rtc::ArrayView<uint8_t> data, VideoRotation value); |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 99 | static bool Parse(rtc::ArrayView<const uint8_t> data, uint8_t* value); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 100 | static size_t ValueSize(uint8_t value) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 101 | static bool Write(rtc::ArrayView<uint8_t> data, uint8_t value); |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 102 | }; |
| 103 | |
Danil Chapovalov | 08b0351 | 2016-09-07 15:08:13 +0200 | [diff] [blame] | 104 | class PlayoutDelayLimits { |
| 105 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 106 | using value_type = PlayoutDelay; |
Danil Chapovalov | 08b0351 | 2016-09-07 15:08:13 +0200 | [diff] [blame] | 107 | static constexpr RTPExtensionType kId = kRtpExtensionPlayoutDelay; |
| 108 | static constexpr uint8_t kValueSizeBytes = 3; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 109 | static constexpr const char kUri[] = |
danilchap | 6ba58d6 | 2016-11-09 05:46:39 -0800 | [diff] [blame] | 110 | "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay"; |
danilchap | e2a0177 | 2016-10-28 07:08:58 -0700 | [diff] [blame] | 111 | |
Danil Chapovalov | 08b0351 | 2016-09-07 15:08:13 +0200 | [diff] [blame] | 112 | // Playout delay in milliseconds. A playout delay limit (min or max) |
| 113 | // has 12 bits allocated. This allows a range of 0-4095 values which |
| 114 | // translates to a range of 0-40950 in milliseconds. |
| 115 | static constexpr int kGranularityMs = 10; |
| 116 | // Maximum playout delay value in milliseconds. |
| 117 | static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. |
| 118 | |
danilchap | 978504e | 2017-04-06 01:03:53 -0700 | [diff] [blame] | 119 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 120 | PlayoutDelay* playout_delay); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 121 | static size_t ValueSize(const PlayoutDelay&) { |
| 122 | return kValueSizeBytes; |
| 123 | } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 124 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 125 | const PlayoutDelay& playout_delay); |
Danil Chapovalov | 08b0351 | 2016-09-07 15:08:13 +0200 | [diff] [blame] | 126 | }; |
| 127 | |
ilnik | 00d802b | 2017-04-11 10:34:31 -0700 | [diff] [blame] | 128 | class VideoContentTypeExtension { |
| 129 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 130 | using value_type = VideoContentType; |
ilnik | 00d802b | 2017-04-11 10:34:31 -0700 | [diff] [blame] | 131 | static constexpr RTPExtensionType kId = kRtpExtensionVideoContentType; |
| 132 | static constexpr uint8_t kValueSizeBytes = 1; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 133 | static constexpr const char kUri[] = |
ilnik | 00d802b | 2017-04-11 10:34:31 -0700 | [diff] [blame] | 134 | "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type"; |
| 135 | |
| 136 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 137 | VideoContentType* content_type); |
erikvarga | e6b1619 | 2017-05-11 02:36:32 -0700 | [diff] [blame] | 138 | static size_t ValueSize(VideoContentType) { |
| 139 | return kValueSizeBytes; |
| 140 | } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 141 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 142 | VideoContentType content_type); |
ilnik | 00d802b | 2017-04-11 10:34:31 -0700 | [diff] [blame] | 143 | }; |
| 144 | |
ilnik | 04f4d12 | 2017-06-19 07:18:55 -0700 | [diff] [blame] | 145 | class VideoTimingExtension { |
| 146 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 147 | using value_type = VideoSendTiming; |
ilnik | 04f4d12 | 2017-06-19 07:18:55 -0700 | [diff] [blame] | 148 | static constexpr RTPExtensionType kId = kRtpExtensionVideoTiming; |
sprang | ba050a6 | 2017-08-18 02:51:12 -0700 | [diff] [blame] | 149 | static constexpr uint8_t kValueSizeBytes = 13; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 150 | static constexpr const char kUri[] = |
ilnik | 04f4d12 | 2017-06-19 07:18:55 -0700 | [diff] [blame] | 151 | "http://www.webrtc.org/experiments/rtp-hdrext/video-timing"; |
| 152 | |
ilnik | 2edc684 | 2017-07-06 03:06:50 -0700 | [diff] [blame] | 153 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 154 | VideoSendTiming* timing); |
| 155 | static size_t ValueSize(const VideoSendTiming&) { return kValueSizeBytes; } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 156 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 157 | const VideoSendTiming& timing); |
ilnik | 04f4d12 | 2017-06-19 07:18:55 -0700 | [diff] [blame] | 158 | |
| 159 | static size_t ValueSize(uint16_t time_delta_ms, uint8_t idx) { |
| 160 | return kValueSizeBytes; |
| 161 | } |
| 162 | // Writes only single time delta to position idx. |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 163 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 164 | uint16_t time_delta_ms, |
| 165 | uint8_t idx); |
ilnik | 04f4d12 | 2017-06-19 07:18:55 -0700 | [diff] [blame] | 166 | }; |
| 167 | |
Johnny Lee | e0c8b23 | 2018-09-11 16:50:49 -0400 | [diff] [blame] | 168 | class FrameMarkingExtension { |
| 169 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 170 | using value_type = FrameMarking; |
Johnny Lee | e0c8b23 | 2018-09-11 16:50:49 -0400 | [diff] [blame] | 171 | static constexpr RTPExtensionType kId = kRtpExtensionFrameMarking; |
| 172 | static constexpr const char kUri[] = |
| 173 | "http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07"; |
| 174 | |
| 175 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 176 | FrameMarking* frame_marking); |
| 177 | static size_t ValueSize(const FrameMarking& frame_marking); |
| 178 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 179 | const FrameMarking& frame_marking); |
| 180 | |
| 181 | private: |
| 182 | static bool IsScalable(uint8_t temporal_id, uint8_t layer_id); |
| 183 | }; |
| 184 | |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 185 | class ColorSpaceExtension { |
Johannes Kron | ad1d9f0 | 2018-11-09 11:12:36 +0100 | [diff] [blame] | 186 | public: |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 187 | using value_type = ColorSpace; |
| 188 | static constexpr RTPExtensionType kId = kRtpExtensionColorSpace; |
Johannes Kron | ad1d9f0 | 2018-11-09 11:12:36 +0100 | [diff] [blame] | 189 | static constexpr uint8_t kValueSizeBytes = 30; |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 190 | static constexpr uint8_t kValueSizeBytesWithoutHdrMetadata = 4; |
Johannes Kron | d0b69a8 | 2018-12-03 14:18:53 +0100 | [diff] [blame^] | 191 | static constexpr const char kUri[] = |
| 192 | "http://www.webrtc.org/experiments/rtp-hdrext/color-space"; |
Johannes Kron | ad1d9f0 | 2018-11-09 11:12:36 +0100 | [diff] [blame] | 193 | |
| 194 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 195 | ColorSpace* color_space); |
| 196 | static size_t ValueSize(const ColorSpace& color_space) { |
| 197 | return color_space.hdr_metadata() ? kValueSizeBytes |
| 198 | : kValueSizeBytesWithoutHdrMetadata; |
| 199 | } |
Johannes Kron | ad1d9f0 | 2018-11-09 11:12:36 +0100 | [diff] [blame] | 200 | static bool Write(rtc::ArrayView<uint8_t> data, |
Johannes Kron | 09d6588 | 2018-11-27 14:36:41 +0100 | [diff] [blame] | 201 | const ColorSpace& color_space); |
Johannes Kron | ad1d9f0 | 2018-11-09 11:12:36 +0100 | [diff] [blame] | 202 | |
| 203 | private: |
| 204 | static constexpr int kChromaticityDenominator = 10000; // 0.0001 resolution. |
| 205 | static constexpr int kLuminanceMaxDenominator = 100; // 0.01 resolution. |
| 206 | static constexpr int kLuminanceMinDenominator = 10000; // 0.0001 resolution. |
| 207 | static size_t ParseChromaticity(const uint8_t* data, |
| 208 | HdrMasteringMetadata::Chromaticity* p); |
| 209 | static size_t ParseLuminance(const uint8_t* data, float* f, int denominator); |
| 210 | static size_t WriteChromaticity(uint8_t* data, |
| 211 | const HdrMasteringMetadata::Chromaticity& p); |
| 212 | static size_t WriteLuminance(uint8_t* data, float f, int denominator); |
| 213 | }; |
| 214 | |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 215 | // Base extension class for RTP header extensions which are strings. |
| 216 | // Subclasses must defined kId and kUri static constexpr members. |
| 217 | class BaseRtpStringExtension { |
| 218 | public: |
Danil Chapovalov | c5dd300 | 2018-11-08 15:12:45 +0100 | [diff] [blame] | 219 | using value_type = std::string; |
Steve Anton | f0482ea | 2018-04-09 13:33:52 -0700 | [diff] [blame] | 220 | // String RTP header extensions are limited to 16 bytes because it is the |
| 221 | // maximum length that can be encoded with one-byte header extensions. |
| 222 | static constexpr uint8_t kMaxValueSizeBytes = 16; |
| 223 | |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 224 | static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 225 | StringRtpHeaderExtension* str); |
| 226 | static size_t ValueSize(const StringRtpHeaderExtension& str) { |
| 227 | return str.size(); |
| 228 | } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 229 | static bool Write(rtc::ArrayView<uint8_t> data, |
| 230 | const StringRtpHeaderExtension& str); |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 231 | |
| 232 | static bool Parse(rtc::ArrayView<const uint8_t> data, std::string* str); |
| 233 | static size_t ValueSize(const std::string& str) { return str.size(); } |
Danil Chapovalov | 9bf3158 | 2018-06-18 13:48:20 +0200 | [diff] [blame] | 234 | static bool Write(rtc::ArrayView<uint8_t> data, const std::string& str); |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 235 | }; |
| 236 | |
| 237 | class RtpStreamId : public BaseRtpStringExtension { |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 238 | public: |
| 239 | static constexpr RTPExtensionType kId = kRtpExtensionRtpStreamId; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 240 | static constexpr const char kUri[] = |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 241 | "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"; |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 242 | }; |
| 243 | |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 244 | class RepairedRtpStreamId : public BaseRtpStringExtension { |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 245 | public: |
| 246 | static constexpr RTPExtensionType kId = kRtpExtensionRepairedRtpStreamId; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 247 | static constexpr const char kUri[] = |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 248 | "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"; |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 249 | }; |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 250 | |
Steve Anton | a3251dd | 2017-07-21 09:58:31 -0700 | [diff] [blame] | 251 | class RtpMid : public BaseRtpStringExtension { |
| 252 | public: |
| 253 | static constexpr RTPExtensionType kId = kRtpExtensionMid; |
Steve Anton | d14d9f7 | 2017-07-21 10:59:39 -0700 | [diff] [blame] | 254 | static constexpr const char kUri[] = "urn:ietf:params:rtp-hdrext:sdes:mid"; |
danilchap | ef8d773 | 2017-04-19 02:59:48 -0700 | [diff] [blame] | 255 | }; |
| 256 | |
danilchap | 1edb7ab | 2016-04-20 05:25:10 -0700 | [diff] [blame] | 257 | } // namespace webrtc |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 258 | #endif // MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |