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

Unified Diff: talk/media/base/rtputils.h

Issue 1578323002: Add rtppacketuil.h/cc (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 | « talk/libjingle_tests.gyp ('k') | talk/media/base/rtputils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/rtputils.h
diff --git a/talk/media/base/rtputils.h b/talk/media/base/rtputils.h
index bf8238f30298266472d2ca8b8154dc991c4c56ce..a00b5ef72bcf282231bd0a54dc1158e0a56f6f52 100644
--- a/talk/media/base/rtputils.h
+++ b/talk/media/base/rtputils.h
@@ -30,6 +30,10 @@
#include "webrtc/base/byteorder.h"
+namespace rtc {
+struct PacketTimeUpdateParams;
+} // namespace rtc
+
namespace cricket {
const size_t kMinRtpPacketLen = 12;
@@ -71,6 +75,25 @@ bool IsRtpPacket(const void* data, size_t len);
// True if |payload type| is 0-127.
bool IsValidRtpPayloadType(int payload_type);
+// Verifies that a packet has a valid RTP header.
+bool ValidateRtpHeader(const uint8_t* rtp,
+ size_t length,
+ size_t* header_length);
+
+// Helper method which updates the absolute send time extension if present.
+bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp,
+ size_t length,
+ int extension_id,
+ uint64_t time_us);
+
+// Applies specified |options| to the packet. It updates the absolute send time
+// extension header if it is present present then updates HMAC.
+bool ApplyPacketOptions(uint8_t* data,
+ size_t length,
+ const rtc::PacketTimeUpdateParams& packet_time_params,
+ uint64_t time_us);
+
+
} // namespace cricket
#endif // TALK_MEDIA_BASE_RTPUTILS_H_
« no previous file with comments | « talk/libjingle_tests.gyp ('k') | talk/media/base/rtputils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698