| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
| 11 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 11 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 #include <string> |
| 14 | 15 |
| 15 #include "webrtc/api/video/video_content_type.h" | 16 #include "webrtc/api/video/video_content_type.h" |
| 16 #include "webrtc/api/video/video_rotation.h" | 17 #include "webrtc/api/video/video_rotation.h" |
| 17 #include "webrtc/base/array_view.h" | 18 #include "webrtc/base/array_view.h" |
| 18 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 19 | 20 |
| 20 namespace webrtc { | 21 namespace webrtc { |
| 21 | 22 |
| 22 class AbsoluteSendTime { | 23 class AbsoluteSendTime { |
| 23 public: | 24 public: |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 static constexpr RTPExtensionType kId = kRtpExtensionVideoContentType; | 105 static constexpr RTPExtensionType kId = kRtpExtensionVideoContentType; |
| 105 static constexpr uint8_t kValueSizeBytes = 1; | 106 static constexpr uint8_t kValueSizeBytes = 1; |
| 106 static constexpr const char* kUri = | 107 static constexpr const char* kUri = |
| 107 "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type"; | 108 "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type"; |
| 108 | 109 |
| 109 static bool Parse(rtc::ArrayView<const uint8_t> data, | 110 static bool Parse(rtc::ArrayView<const uint8_t> data, |
| 110 VideoContentType* content_type); | 111 VideoContentType* content_type); |
| 111 static bool Write(uint8_t* data, VideoContentType content_type); | 112 static bool Write(uint8_t* data, VideoContentType content_type); |
| 112 }; | 113 }; |
| 113 | 114 |
| 115 class RtpStreamId { |
| 116 public: |
| 117 static constexpr RTPExtensionType kId = kRtpExtensionRtpStreamId; |
| 118 // TODO(danilchap): Implement write support of dynamic size extension that |
| 119 // allows to remove the ValueSize constant. |
| 120 static constexpr uint8_t kValueSizeBytes = 1; |
| 121 static constexpr const char* kUri = |
| 122 "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"; |
| 123 |
| 124 static bool Parse(rtc::ArrayView<const uint8_t> data, StreamId* rid); |
| 125 static bool Parse(rtc::ArrayView<const uint8_t> data, std::string* rid); |
| 126 }; |
| 127 |
| 128 class RepairedRtpStreamId { |
| 129 public: |
| 130 static constexpr RTPExtensionType kId = kRtpExtensionRepairedRtpStreamId; |
| 131 // TODO(danilchap): Implement write support of dynamic size extension that |
| 132 // allows to remove the ValueSize constant. |
| 133 static constexpr uint8_t kValueSizeBytes = 1; |
| 134 static constexpr const char* kUri = |
| 135 "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"; |
| 136 |
| 137 static bool Parse(rtc::ArrayView<const uint8_t> data, StreamId* rid); |
| 138 static bool Parse(rtc::ArrayView<const uint8_t> data, std::string* rid); |
| 139 }; |
| 140 |
| 114 } // namespace webrtc | 141 } // namespace webrtc |
| 115 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 142 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
| OLD | NEW |