Index: webrtc/pc/channel.cc |
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc |
index 67c16ec64aa1a47cb177e4ef6f3b4c7e5d8abec4..e32d24f19461d6ee02ff32fa73d3b76b876b6ff7 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, |
+// empty extension otherwise. |
+inline const webrtc::RtpExtension FindHeaderExtension( |
danilchap
2016/05/18 20:00:09
why changing function signature and returning copy
danilchap
2016/05/18 20:00:09
no need for inline inside .cc
Irfan
2016/05/19 00:56:22
Done.
|
+ const std::vector<webrtc::RtpExtension>& extensions, |
+ const std::string& uri) { |
+ for (auto extension : extensions) { |
danilchap
2016/05/18 20:00:09
const auto& to avoid unnecessary copy (and beeing
Irfan
2016/05/19 00:56:22
Done.
|
+ if (extension.uri == uri) |
+ return extension; |
+ } |
+ return webrtc::RtpExtension(); |
+} |
+#endif |
+ |
} // namespace |
enum { |
@@ -1387,15 +1401,15 @@ 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; |
+ send_time_extension.id ? send_time_extension.id : -1; |
invoker_.AsyncInvoke<void>( |
network_thread_, Bind(&BaseChannel::CacheRtpAbsSendTimeHeaderExtension_n, |
this, rtp_abs_sendtime_extn_id)); |