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

Side by Side Diff: webrtc/config.h

Issue 2761143002: Support encrypted RTP extensions (RFC 6904) (Closed)
Patch Set: Fix compile error on win_x64 bots. Created 3 years, 5 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
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Payload type used for RED packets. 52 // Payload type used for RED packets.
53 int red_payload_type; 53 int red_payload_type;
54 54
55 // RTX payload type for RED payload. 55 // RTX payload type for RED payload.
56 int red_rtx_payload_type; 56 int red_rtx_payload_type;
57 }; 57 };
58 58
59 // RTP header extension, see RFC 5285. 59 // RTP header extension, see RFC 5285.
60 struct RtpExtension { 60 struct RtpExtension {
61 RtpExtension() : id(0) {} 61 RtpExtension() {}
62 RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {} 62 RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {}
63 RtpExtension(const std::string& uri, int id, bool encrypt) : uri(uri),
64 id(id), encrypt(encrypt) {}
63 std::string ToString() const; 65 std::string ToString() const;
64 bool operator==(const RtpExtension& rhs) const { 66 bool operator==(const RtpExtension& rhs) const {
65 return uri == rhs.uri && id == rhs.id; 67 return uri == rhs.uri && id == rhs.id && encrypt == rhs.encrypt;
66 } 68 }
67 static bool IsSupportedForAudio(const std::string& uri); 69 static bool IsSupportedForAudio(const std::string& uri);
68 static bool IsSupportedForVideo(const std::string& uri); 70 static bool IsSupportedForVideo(const std::string& uri);
71 // Return "true" if the given RTP header extension URI may be encrypted.
72 static bool IsEncryptionSupported(const std::string& uri);
73
74 // Returns the named header extension if found among all extensions,
75 // nullptr otherwise.
76 static const RtpExtension* FindHeaderExtensionByUri(
77 const std::vector<RtpExtension>& extensions,
78 const std::string& uri);
79
80 // Return a list of RTP header extensions with the non-encrypted extensions
81 // removed if both the encrypted and non-encrypted extension is present for
82 // the same URI.
83 static std::vector<RtpExtension> FilterDuplicateNonEncrypted(
84 const std::vector<RtpExtension>& extensions);
69 85
70 // Header extension for audio levels, as defined in: 86 // Header extension for audio levels, as defined in:
71 // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 87 // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
72 static const char* kAudioLevelUri; 88 static const char* kAudioLevelUri;
73 static const int kAudioLevelDefaultId; 89 static const int kAudioLevelDefaultId;
74 90
75 // Header extension for RTP timestamp offset, see RFC 5450 for details: 91 // Header extension for RTP timestamp offset, see RFC 5450 for details:
76 // http://tools.ietf.org/html/rfc5450 92 // http://tools.ietf.org/html/rfc5450
77 static const char* kTimestampOffsetUri; 93 static const char* kTimestampOffsetUri;
78 static const int kTimestampOffsetDefaultId; 94 static const int kTimestampOffsetDefaultId;
(...skipping 18 matching lines...) Expand all
97 static const int kVideoTimingDefaultId; 113 static const int kVideoTimingDefaultId;
98 114
99 // Header extension for transport sequence number, see url for details: 115 // Header extension for transport sequence number, see url for details:
100 // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions 116 // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions
101 static const char* kTransportSequenceNumberUri; 117 static const char* kTransportSequenceNumberUri;
102 static const int kTransportSequenceNumberDefaultId; 118 static const int kTransportSequenceNumberDefaultId;
103 119
104 static const char* kPlayoutDelayUri; 120 static const char* kPlayoutDelayUri;
105 static const int kPlayoutDelayDefaultId; 121 static const int kPlayoutDelayDefaultId;
106 122
123 // Encryption of Header Extensions, see RFC 6904 for details:
124 // https://tools.ietf.org/html/rfc6904
125 static const char* kEncryptHeaderExtensionsUri;
126
107 // Inclusive min and max IDs for one-byte header extensions, per RFC5285. 127 // Inclusive min and max IDs for one-byte header extensions, per RFC5285.
108 static const int kMinId; 128 static const int kMinId;
109 static const int kMaxId; 129 static const int kMaxId;
110 130
111 std::string uri; 131 std::string uri;
112 int id; 132 int id = 0;
133 bool encrypt = false;
113 }; 134 };
114 135
115 struct VideoStream { 136 struct VideoStream {
116 VideoStream(); 137 VideoStream();
117 ~VideoStream(); 138 ~VideoStream();
118 std::string ToString() const; 139 std::string ToString() const;
119 140
120 size_t width; 141 size_t width;
121 size_t height; 142 size_t height;
122 int max_framerate; 143 int max_framerate;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 257
237 private: 258 private:
238 // Access to the copy constructor is private to force use of the Copy() 259 // Access to the copy constructor is private to force use of the Copy()
239 // method for those exceptional cases where we do use it. 260 // method for those exceptional cases where we do use it.
240 VideoEncoderConfig(const VideoEncoderConfig&); 261 VideoEncoderConfig(const VideoEncoderConfig&);
241 }; 262 };
242 263
243 } // namespace webrtc 264 } // namespace webrtc
244 265
245 #endif // WEBRTC_CONFIG_H_ 266 #endif // WEBRTC_CONFIG_H_
OLDNEW
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698