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

Unified Diff: webrtc/pc/channel.cc

Issue 1984983002: Remove use of RtpHeaderExtension and clean up (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nit Created 4 years, 7 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/pc/channel.cc
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc
index 97c1d6691014ff3b79951607d72458de61aa4fa6..cac0ea2ea893f504470ba075bc3d4445e2c36f31 100644
--- a/webrtc/pc/channel.cc
+++ b/webrtc/pc/channel.cc
@@ -43,6 +43,20 @@ struct SendPacketMessageData : public rtc::MessageData {
rtc::PacketOptions options;
};
+#if defined(ENABLE_EXTERNAL_AUTH)
+// Returns the named header extension if found among all extensions,
+// nullptr otherwise.
+const webrtc::RtpExtension* FindHeaderExtension(
+ const std::vector<webrtc::RtpExtension>& extensions,
+ const std::string& uri) {
+ for (const auto& extension : extensions) {
+ if (extension.uri == uri)
+ return &extension;
+ }
+ return nullptr;
+}
+#endif
+
} // namespace
enum {
@@ -1390,13 +1404,13 @@ bool BaseChannel::UpdateRemoteStreams_w(
}
void BaseChannel::MaybeCacheRtpAbsSendTimeHeaderExtension_w(
- const std::vector<RtpHeaderExtension>& extensions) {
+ const std::vector<webrtc::RtpExtension>& extensions) {
// Absolute Send Time extension id is used only with external auth,
// so do not bother searching for it and making asyncronious call to set
// something that is not used.
#if defined(ENABLE_EXTERNAL_AUTH)
- const RtpHeaderExtension* send_time_extension =
- FindHeaderExtension(extensions, kRtpAbsoluteSenderTimeHeaderExtension);
+ const webrtc::RtpExtension* send_time_extension =
+ FindHeaderExtension(extensions, webrtc::RtpExtension::kAbsSendTimeUri);
int rtp_abs_sendtime_extn_id =
send_time_extension ? send_time_extension->id : -1;
invoker_.AsyncInvoke<void>(
« no previous file with comments | « webrtc/pc/channel.h ('k') | webrtc/pc/mediasession.h » ('j') | webrtc/pc/mediasession.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698