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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/config.h
diff --git a/webrtc/config.h b/webrtc/config.h
index d5ed266c89c5eee2a4fe40601b9113221f5e46a8..8211a6619a7900c3605665b99fc921dd88a90c1f 100644
--- a/webrtc/config.h
+++ b/webrtc/config.h
@@ -58,14 +58,30 @@ struct UlpfecConfig {
// RTP header extension, see RFC 5285.
struct RtpExtension {
- RtpExtension() : id(0) {}
+ RtpExtension() {}
RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {}
+ RtpExtension(const std::string& uri, int id, bool encrypt) : uri(uri),
+ id(id), encrypt(encrypt) {}
std::string ToString() const;
bool operator==(const RtpExtension& rhs) const {
- return uri == rhs.uri && id == rhs.id;
+ return uri == rhs.uri && id == rhs.id && encrypt == rhs.encrypt;
}
static bool IsSupportedForAudio(const std::string& uri);
static bool IsSupportedForVideo(const std::string& uri);
+ // Return "true" if the given RTP header extension URI may be encrypted.
+ static bool IsEncryptionSupported(const std::string& uri);
+
+ // Returns the named header extension if found among all extensions,
+ // nullptr otherwise.
+ static const RtpExtension* FindHeaderExtensionByUri(
+ const std::vector<RtpExtension>& extensions,
+ const std::string& uri);
+
+ // Return a list of RTP header extensions with the non-encrypted extensions
+ // removed if both the encrypted and non-encrypted extension is present for
+ // the same URI.
+ static std::vector<RtpExtension> FilterDuplicateNonEncrypted(
+ const std::vector<RtpExtension>& extensions);
// Header extension for audio levels, as defined in:
// http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
@@ -104,12 +120,17 @@ struct RtpExtension {
static const char* kPlayoutDelayUri;
static const int kPlayoutDelayDefaultId;
+ // Encryption of Header Extensions, see RFC 6904 for details:
+ // https://tools.ietf.org/html/rfc6904
+ static const char* kEncryptHeaderExtensionsUri;
+
// Inclusive min and max IDs for one-byte header extensions, per RFC5285.
static const int kMinId;
static const int kMaxId;
std::string uri;
- int id;
+ int id = 0;
+ bool encrypt = false;
};
struct VideoStream {
« 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