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

Side by Side Diff: webrtc/media/base/rtputils.h

Issue 2890263003: Move RTP/RTCP demuxing logic from BaseChannel to RtpTransport. (Closed)
Patch Set: Move more demuxing logic from BaseChannel to RtpTransport. Created 3 years, 6 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/media/base/rtputils.cc » ('j') | webrtc/pc/channel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 bool SetRtpSsrc(void* data, size_t len, uint32_t value); 52 bool SetRtpSsrc(void* data, size_t len, uint32_t value);
53 // Assumes version 2, no padding, no extensions, no csrcs. 53 // Assumes version 2, no padding, no extensions, no csrcs.
54 bool SetRtpHeader(void* data, size_t len, const RtpHeader& header); 54 bool SetRtpHeader(void* data, size_t len, const RtpHeader& header);
55 55
56 bool IsRtpPacket(const void* data, size_t len); 56 bool IsRtpPacket(const void* data, size_t len);
57 57
58 // True if |payload type| is 0-127. 58 // True if |payload type| is 0-127.
59 bool IsValidRtpPayloadType(int payload_type); 59 bool IsValidRtpPayloadType(int payload_type);
60 60
61 bool IsValidRtpRtcpPacketSize(bool rtcp, size_t size);
62
63 const char* PacketType(bool rtcp);
Taylor Brandstetter 2017/05/25 16:14:25 Can you add a comment above these declarations? An
Zach Stein 2017/05/30 21:50:55 Done.
64
61 // Verifies that a packet has a valid RTP header. 65 // Verifies that a packet has a valid RTP header.
62 bool ValidateRtpHeader(const uint8_t* rtp, 66 bool ValidateRtpHeader(const uint8_t* rtp,
63 size_t length, 67 size_t length,
64 size_t* header_length); 68 size_t* header_length);
65 69
66 // Helper method which updates the absolute send time extension if present. 70 // Helper method which updates the absolute send time extension if present.
67 bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp, 71 bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp,
68 size_t length, 72 size_t length,
69 int extension_id, 73 int extension_id,
70 uint64_t time_us); 74 uint64_t time_us);
71 75
72 // Applies specified |options| to the packet. It updates the absolute send time 76 // Applies specified |options| to the packet. It updates the absolute send time
73 // extension header if it is present present then updates HMAC. 77 // extension header if it is present present then updates HMAC.
74 bool ApplyPacketOptions(uint8_t* data, 78 bool ApplyPacketOptions(uint8_t* data,
75 size_t length, 79 size_t length,
76 const rtc::PacketTimeUpdateParams& packet_time_params, 80 const rtc::PacketTimeUpdateParams& packet_time_params,
77 uint64_t time_us); 81 uint64_t time_us);
78 82
79 83
80 } // namespace cricket 84 } // namespace cricket
81 85
82 #endif // WEBRTC_MEDIA_BASE_RTPUTILS_H_ 86 #endif // WEBRTC_MEDIA_BASE_RTPUTILS_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/base/rtputils.cc » ('j') | webrtc/pc/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698