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 | 14 |
15 #include "webrtc/api/video/video_rotation.h" | 15 #include "webrtc/api/video/video_rotation.h" |
16 #include "webrtc/api/video/video_content_type.h" | |
16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 17 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
17 | 18 |
18 namespace webrtc { | 19 namespace webrtc { |
19 | 20 |
20 class AbsoluteSendTime { | 21 class AbsoluteSendTime { |
21 public: | 22 public: |
22 static constexpr RTPExtensionType kId = kRtpExtensionAbsoluteSendTime; | 23 static constexpr RTPExtensionType kId = kRtpExtensionAbsoluteSendTime; |
23 static constexpr uint8_t kValueSizeBytes = 3; | 24 static constexpr uint8_t kValueSizeBytes = 3; |
24 static constexpr const char* kUri = | 25 static constexpr const char* kUri = |
25 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; | 26 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 // has 12 bits allocated. This allows a range of 0-4095 values which | 90 // has 12 bits allocated. This allows a range of 0-4095 values which |
90 // translates to a range of 0-40950 in milliseconds. | 91 // translates to a range of 0-40950 in milliseconds. |
91 static constexpr int kGranularityMs = 10; | 92 static constexpr int kGranularityMs = 10; |
92 // Maximum playout delay value in milliseconds. | 93 // Maximum playout delay value in milliseconds. |
93 static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. | 94 static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. |
94 | 95 |
95 static bool Parse(const uint8_t* data, PlayoutDelay* playout_delay); | 96 static bool Parse(const uint8_t* data, PlayoutDelay* playout_delay); |
96 static bool Write(uint8_t* data, const PlayoutDelay& playout_delay); | 97 static bool Write(uint8_t* data, const PlayoutDelay& playout_delay); |
97 }; | 98 }; |
98 | 99 |
100 class VideoContentTypeExtension { | |
101 public: | |
102 static constexpr RTPExtensionType kId = kRtpExtensionVideoContentType; | |
103 static constexpr uint8_t kValueSizeBytes = 1; | |
104 // TODO(ilnik): Think of a better URI. | |
nisse-webrtc
2017/04/03 12:07:18
I don't know how we allocate id:s like this. Stefa
| |
105 static constexpr const char* kUri = "urn:webrtc:video-content-type"; | |
danilchap
2017/04/03 12:19:54
http://www.webrtc.org/experiments/rtp-hdrext/video
ilnik
2017/04/03 14:03:42
Changed the kUri. But how can I fill that page wit
| |
106 | |
107 static bool Parse(const uint8_t* data, VideoContentType* content_type); | |
108 static bool Write(uint8_t* data, VideoContentType content_type); | |
109 }; | |
110 | |
99 } // namespace webrtc | 111 } // namespace webrtc |
100 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 112 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
OLD | NEW |