| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 bool RtxEnabled() const; | 79 bool RtxEnabled() const; |
| 80 | 80 |
| 81 void SetRtxSsrc(uint32_t ssrc); | 81 void SetRtxSsrc(uint32_t ssrc); |
| 82 | 82 |
| 83 bool GetRtxSsrc(uint32_t* ssrc) const; | 83 bool GetRtxSsrc(uint32_t* ssrc) const; |
| 84 | 84 |
| 85 void SetRtxPayloadType(int payload_type, int associated_payload_type); | 85 void SetRtxPayloadType(int payload_type, int associated_payload_type); |
| 86 | 86 |
| 87 bool IsRtx(const RTPHeader& header) const; | 87 bool IsRtx(const RTPHeader& header) const; |
| 88 | 88 |
| 89 // DEPRECATED. Use RestoreOriginalPacket below that takes a uint8_t* | |
| 90 // restored_packet, instead of a uint8_t**. | |
| 91 // TODO(noahric): Remove this when all callers have been updated. | |
| 92 bool RestoreOriginalPacket(uint8_t** restored_packet, | |
| 93 const uint8_t* packet, | |
| 94 size_t* packet_length, | |
| 95 uint32_t original_ssrc, | |
| 96 const RTPHeader& header) const; | |
| 97 | |
| 98 bool RestoreOriginalPacket(uint8_t* restored_packet, | 89 bool RestoreOriginalPacket(uint8_t* restored_packet, |
| 99 const uint8_t* packet, | 90 const uint8_t* packet, |
| 100 size_t* packet_length, | 91 size_t* packet_length, |
| 101 uint32_t original_ssrc, | 92 uint32_t original_ssrc, |
| 102 const RTPHeader& header) const; | 93 const RTPHeader& header) const; |
| 103 | 94 |
| 104 bool IsRed(const RTPHeader& header) const; | 95 bool IsRed(const RTPHeader& header) const; |
| 105 | 96 |
| 106 // Returns true if the media of this RTP packet is encapsulated within an | 97 // Returns true if the media of this RTP packet is encapsulated within an |
| 107 // extra header, such as RTX or RED. | 98 // extra header, such as RTX or RED. |
| 108 bool IsEncapsulated(const RTPHeader& header) const; | 99 bool IsEncapsulated(const RTPHeader& header) const; |
| 109 | 100 |
| 110 bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const; | 101 bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const; |
| 111 | 102 |
| 112 int GetPayloadTypeFrequency(uint8_t payload_type) const; | 103 int GetPayloadTypeFrequency(uint8_t payload_type) const; |
| 113 | 104 |
| 114 // DEPRECATED. Use PayloadTypeToPayload below that returns const Payload* | |
| 115 // instead of taking output parameter. | |
| 116 // TODO(danilchap): Remove this when all callers have been updated. | |
| 117 bool PayloadTypeToPayload(const uint8_t payload_type, | |
| 118 RtpUtility::Payload*& payload) const { // NOLINT | |
| 119 payload = | |
| 120 const_cast<RtpUtility::Payload*>(PayloadTypeToPayload(payload_type)); | |
| 121 return payload != nullptr; | |
| 122 } | |
| 123 const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const; | 105 const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const; |
| 124 | 106 |
| 125 void ResetLastReceivedPayloadTypes() { | 107 void ResetLastReceivedPayloadTypes() { |
| 126 rtc::CritScope cs(&crit_sect_); | 108 rtc::CritScope cs(&crit_sect_); |
| 127 last_received_payload_type_ = -1; | 109 last_received_payload_type_ = -1; |
| 128 last_received_media_payload_type_ = -1; | 110 last_received_media_payload_type_ = -1; |
| 129 } | 111 } |
| 130 | 112 |
| 131 // This sets the payload type of the packets being received from the network | 113 // This sets the payload type of the packets being received from the network |
| 132 // on the media SSRC. For instance if packets are encapsulated with RED, this | 114 // on the media SSRC. For instance if packets are encapsulated with RED, this |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 std::map<int, int> rtx_payload_type_map_; | 177 std::map<int, int> rtx_payload_type_map_; |
| 196 // When true, use rtx_payload_type_map_ when restoring RTX packets to get the | 178 // When true, use rtx_payload_type_map_ when restoring RTX packets to get the |
| 197 // correct payload type. | 179 // correct payload type. |
| 198 bool use_rtx_payload_mapping_on_restore_; | 180 bool use_rtx_payload_mapping_on_restore_; |
| 199 uint32_t ssrc_rtx_; | 181 uint32_t ssrc_rtx_; |
| 200 }; | 182 }; |
| 201 | 183 |
| 202 } // namespace webrtc | 184 } // namespace webrtc |
| 203 | 185 |
| 204 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ | 186 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_PAYLOAD_REGISTRY_H_ |
| OLD | NEW |