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

Unified Diff: webrtc/config.cc

Issue 2761143002: Support encrypted RTP extensions (RFC 6904) (Closed)
Patch Set: Created 3 years, 9 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
Index: webrtc/config.cc
diff --git a/webrtc/config.cc b/webrtc/config.cc
index e0c490d1ecd8038d546b7298fc9a885ab02718df..b35325b07f4d4d4062f6d9f0b0b13a5260548a89 100644
--- a/webrtc/config.cc
+++ b/webrtc/config.cc
@@ -41,6 +41,9 @@ std::string RtpExtension::ToString() const {
std::stringstream ss;
ss << "{uri: " << uri;
ss << ", id: " << id;
+ if (encrypted) {
+ ss << ", encrypted";
+ }
ss << '}';
return ss.str();
}
@@ -72,6 +75,9 @@ const char* RtpExtension::kPlayoutDelayUri =
"http://www.webrtc.org/experiments/rtp-hdrext/playout-delay";
const int RtpExtension::kPlayoutDelayDefaultId = 6;
+const char* RtpExtension::kEncryptHeaderExtensionsUri =
+ "urn:ietf:params:rtp-hdrext:encrypt";
+
const int RtpExtension::kMinId = 1;
const int RtpExtension::kMaxId = 14;
@@ -88,6 +94,16 @@ bool RtpExtension::IsSupportedForVideo(const std::string& uri) {
uri == webrtc::RtpExtension::kPlayoutDelayUri;
}
+bool RtpExtension::AllowEncrypt(const std::string& uri) {
pthatcher1 2017/03/21 07:07:06 A more consistent name would be "IsEncryptionSuppo
joachim 2017/03/23 00:04:32 Done.
+ // TODO(jbauch): Figure out a way to add "kTimestampOffsetUri" here
+ // and filter out later if external auth is used in srtpfilter.
+ return uri == webrtc::RtpExtension::kAudioLevelUri ||
+ uri == webrtc::RtpExtension::kTimestampOffsetUri ||
+ uri == webrtc::RtpExtension::kVideoRotationUri ||
+ uri == webrtc::RtpExtension::kTransportSequenceNumberUri ||
+ uri == webrtc::RtpExtension::kPlayoutDelayUri;
+}
+
VideoStream::VideoStream()
: width(0),
height(0),

Powered by Google App Engine
This is Rietveld 408576698