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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_packet.h

Issue 2303283002: Introduce helpers to RtpSender to propagate RtpPacketToSend. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nit Created 4 years, 3 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 | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_packet.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet.h b/webrtc/modules/rtp_rtcp/source/rtp_packet.h
index f1e3dd40f90cebcf80e3abe2cd4674f06249122c..6981eabc254f09d5314fbf4f875377d38f04ea4c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.h
@@ -83,6 +83,9 @@ class Packet {
void SetCsrcs(const std::vector<uint32_t>& csrcs);
// Header extensions.
+ template <typename Extension>
+ bool HasExtension() const;
+
template <typename Extension, typename... Values>
bool GetExtension(Values...) const;
@@ -160,6 +163,12 @@ class Packet {
Packet() = delete;
};
+template <typename Extension>
+bool Packet::HasExtension() const {
+ uint16_t offset = 0;
+ return FindExtension(Extension::kId, Extension::kValueSizeBytes, &offset);
+}
+
template <typename Extension, typename... Values>
bool Packet::GetExtension(Values... values) const {
uint16_t offset = 0;
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698