Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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_ |
| OLD | NEW |