Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc |
| index 167f29ee956ed5000c0da40007aa3a1867e954d4..b5bdd9af8c0a563ce0fe3840d45b236860a21570 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc |
| @@ -196,4 +196,29 @@ bool PlayoutDelayLimits::Write(uint8_t* data, |
| return true; |
| } |
| +// Video Content Type. |
| +// |
| +// E.g. default video or screenshare. |
| +// |
| +// 0 1 |
| +// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 |
| +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| +// | ID | len=0 | Content type | |
| +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| +constexpr RTPExtensionType VideoContentTypeExtension::kId; |
| +constexpr uint8_t VideoContentTypeExtension::kValueSizeBytes; |
| +constexpr const char* VideoContentTypeExtension::kUri; |
| + |
| +bool VideoContentTypeExtension::Parse(const uint8_t* data, |
| + VideoContentType* content_type) { |
| + *content_type = static_cast<VideoContentType>(data[0]); |
|
nisse-webrtc
2017/04/06 09:23:22
Maybe return false if the value on the wire is inv
ilnik
2017/04/06 10:04:49
Done.
|
| + return true; |
| +} |
| + |
| +bool VideoContentTypeExtension::Write(uint8_t* data, |
| + VideoContentType content_type) { |
| + data[0] = static_cast<uint8_t>(content_type); |
| + return true; |
| +} |
| + |
| } // namespace webrtc |