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

Side by Side Diff: webrtc/p2p/base/rtppacketutil.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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/rtppacketutil.cc » ('j') | webrtc/p2p/base/rtppacketutil.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_P2P_BASE_RTPPACKETUTIL_H_
12 #define WEBRTC_P2P_BASE_RTPPACKETUTIL_H_
13
14 #include <cstddef>
15 #include <cstdint>
16
17 namespace rtc {
18
19 struct PacketOptions;
20
21 // Returns true if the packet in |data| is a DTLS packet.
22 bool IsDtlsPacket(const char* data, size_t length);
23
24 // Returns true if the packet in |data| is an RTCP packet.
25 bool IsRtcpPacket(const char* data, size_t length);
26
27 // Applies specified |options| to the packet. It updates absolute send time
28 // extension header if it is present present then updates HMAC.
29 // If |abs_send_time| is 0 then current system time is used.
30 bool ApplyPacketOptions(char* data,
31 size_t length,
32 const PacketOptions& options,
33 uint32_t abs_send_time);
34
35 // Verifies that a packet has a valid RTP header.
36 bool ValidateRtpHeader(const char* rtp, size_t length, size_t* header_length);
37
38 // Finds RTP offset and length if the packet is encapsulated in a TURN Channel
39 // Message or TURN Send Indication message.
40 bool GetRtpPacketStartPositionAndLength(const char* data,
41 size_t length,
42 size_t* rtp_start_pos,
43 size_t* rtp_packet_length);
44
45 // Helper method which updates absolute send time extension if present.
46 bool UpdateRtpAbsSendTimeExtension(char* rtp,
47 size_t length,
48 int extension_id,
49 uint32_t abs_send_time);
50
51 } // namespace rtc
52
53 #endif // WEBRTC_P2P_BASE_RTPPACKETUTIL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/rtppacketutil.cc » ('j') | webrtc/p2p/base/rtppacketutil.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698