Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc

Issue 2812913002: Reland of Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix indent Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 10
(...skipping 21 matching lines...) Expand all
32 return {Extension::kId, Extension::kValueSizeBytes, Extension::kUri}; 32 return {Extension::kId, Extension::kValueSizeBytes, Extension::kUri};
33 } 33 }
34 34
35 constexpr ExtensionInfo kExtensions[] = { 35 constexpr ExtensionInfo kExtensions[] = {
36 CreateExtensionInfo<TransmissionOffset>(), 36 CreateExtensionInfo<TransmissionOffset>(),
37 CreateExtensionInfo<AudioLevel>(), 37 CreateExtensionInfo<AudioLevel>(),
38 CreateExtensionInfo<AbsoluteSendTime>(), 38 CreateExtensionInfo<AbsoluteSendTime>(),
39 CreateExtensionInfo<VideoOrientation>(), 39 CreateExtensionInfo<VideoOrientation>(),
40 CreateExtensionInfo<TransportSequenceNumber>(), 40 CreateExtensionInfo<TransportSequenceNumber>(),
41 CreateExtensionInfo<PlayoutDelayLimits>(), 41 CreateExtensionInfo<PlayoutDelayLimits>(),
42 CreateExtensionInfo<VideoContentTypeExtension>(),
42 }; 43 };
43 44
44 // Because of kRtpExtensionNone, NumberOfExtension is 1 bigger than the actual 45 // Because of kRtpExtensionNone, NumberOfExtension is 1 bigger than the actual
45 // number of known extensions. 46 // number of known extensions.
46 static_assert(arraysize(kExtensions) == 47 static_assert(arraysize(kExtensions) ==
47 static_cast<int>(kRtpExtensionNumberOfExtensions) - 1, 48 static_cast<int>(kRtpExtensionNumberOfExtensions) - 1,
48 "kExtensions expect to list all known extensions"); 49 "kExtensions expect to list all known extensions");
49 50
50 size_t ValueSize(RTPExtensionType type) { 51 size_t ValueSize(RTPExtensionType type) {
51 for (const ExtensionInfo& extension : kExtensions) 52 for (const ExtensionInfo& extension : kExtensions)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 RTC_DCHECK(!IsRegistered(type)); 144 RTC_DCHECK(!IsRegistered(type));
144 145
145 types_[id] = type; 146 types_[id] = type;
146 ids_[type] = id; 147 ids_[type] = id;
147 total_values_size_bytes_ += (value_size + 1); 148 total_values_size_bytes_ += (value_size + 1);
148 return true; 149 return true;
149 } 150 }
150 151
151 } // namespace webrtc 152 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698