OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 int8_t* payload_type) const; | 46 int8_t* payload_type) const; |
47 | 47 |
48 bool RtxEnabled() const; | 48 bool RtxEnabled() const; |
49 | 49 |
50 void SetRtxSsrc(uint32_t ssrc); | 50 void SetRtxSsrc(uint32_t ssrc); |
51 | 51 |
52 bool GetRtxSsrc(uint32_t* ssrc) const; | 52 bool GetRtxSsrc(uint32_t* ssrc) const; |
53 | 53 |
54 void SetRtxPayloadType(int payload_type, int associated_payload_type); | 54 void SetRtxPayloadType(int payload_type, int associated_payload_type); |
55 | 55 |
| 56 bool IsRtx(const RTPHeader& header) const; |
| 57 |
| 58 bool RestoreOriginalPacket(uint8_t* restored_packet, |
| 59 const uint8_t* packet, |
| 60 size_t* packet_length, |
| 61 uint32_t original_ssrc, |
| 62 const RTPHeader& header); |
| 63 |
56 bool IsRed(const RTPHeader& header) const; | 64 bool IsRed(const RTPHeader& header) const; |
57 | 65 |
| 66 // Returns true if the media of this RTP packet is encapsulated within an |
| 67 // extra header, such as RTX or RED. |
| 68 bool IsEncapsulated(const RTPHeader& header) const; |
| 69 |
58 bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const; | 70 bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const; |
59 | 71 |
60 int GetPayloadTypeFrequency(uint8_t payload_type) const; | 72 int GetPayloadTypeFrequency(uint8_t payload_type) const; |
61 | 73 |
62 const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const; | 74 const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const; |
63 | 75 |
64 void ResetLastReceivedPayloadTypes() { | 76 void ResetLastReceivedPayloadTypes() { |
65 rtc::CritScope cs(&crit_sect_); | 77 rtc::CritScope cs(&crit_sect_); |
66 last_received_payload_type_ = -1; | 78 last_received_payload_type_ = -1; |
67 last_received_media_payload_type_ = -1; | 79 last_received_media_payload_type_ = -1; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // video, DCHECK that no instance is used for both audio and video. | 132 // video, DCHECK that no instance is used for both audio and video. |
121 #if RTC_DCHECK_IS_ON | 133 #if RTC_DCHECK_IS_ON |
122 bool used_for_audio_ GUARDED_BY(crit_sect_) = false; | 134 bool used_for_audio_ GUARDED_BY(crit_sect_) = false; |
123 bool used_for_video_ GUARDED_BY(crit_sect_) = false; | 135 bool used_for_video_ GUARDED_BY(crit_sect_) = false; |
124 #endif | 136 #endif |
125 }; | 137 }; |
126 | 138 |
127 } // namespace webrtc | 139 } // namespace webrtc |
128 | 140 |
129 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ | 141 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ |
OLD | NEW |