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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 return true; | 211 return true; |
212 } | 212 } |
213 | 213 |
214 ProtectionType RtpPacketizerVp8::GetProtectionType() { | 214 ProtectionType RtpPacketizerVp8::GetProtectionType() { |
215 bool protect = | 215 bool protect = |
216 hdr_info_.temporalIdx == 0 || hdr_info_.temporalIdx == kNoTemporalIdx; | 216 hdr_info_.temporalIdx == 0 || hdr_info_.temporalIdx == kNoTemporalIdx; |
217 return protect ? kProtectedPacket : kUnprotectedPacket; | 217 return protect ? kProtectedPacket : kUnprotectedPacket; |
218 } | 218 } |
219 | 219 |
220 StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) { | 220 StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) { |
221 if (hdr_info_.temporalIdx == 0 && | 221 if (retransmission_settings == kRetransmitOff) |
222 !(retransmission_settings & kRetransmitBaseLayer)) { | |
223 return kDontRetransmit; | 222 return kDontRetransmit; |
223 | |
224 if (retransmission_settings == kRetransmitAllPackets) | |
225 return kAllowRetransmission; | |
226 | |
227 if (hdr_info_.temporalIdx == kNoTemporalIdx) | |
danilchap
2017/08/29 17:31:19
if retransmission_settings == kRetransmitFECPacket
sprang_webrtc
2017/08/31 15:54:28
I don't think fec makes sense here. This method is
| |
228 return kAllowRetransmission; | |
229 | |
230 if ((retransmission_settings & kRetransmitBaseLayer) && | |
231 hdr_info_.temporalIdx == 0) { | |
232 return kAllowRetransmission; | |
224 } | 233 } |
225 if (hdr_info_.temporalIdx != kNoTemporalIdx && | 234 |
226 hdr_info_.temporalIdx > 0 && | 235 if ((retransmission_settings & kRetransmitHigherLayers) && |
227 !(retransmission_settings & kRetransmitHigherLayers)) { | 236 hdr_info_.temporalIdx > 0) { |
228 return kDontRetransmit; | 237 return kAllowRetransmission; |
229 } | 238 } |
230 return kAllowRetransmission; | 239 |
240 return kDontRetransmit; | |
231 } | 241 } |
232 | 242 |
233 std::string RtpPacketizerVp8::ToString() { | 243 std::string RtpPacketizerVp8::ToString() { |
234 return "RtpPacketizerVp8"; | 244 return "RtpPacketizerVp8"; |
235 } | 245 } |
236 | 246 |
237 int RtpPacketizerVp8::GeneratePackets() { | 247 int RtpPacketizerVp8::GeneratePackets() { |
238 if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_ + | 248 if (max_payload_len_ < vp8_fixed_payload_descriptor_bytes_ + |
239 PayloadDescriptorExtraLength() + 1 + | 249 PayloadDescriptorExtraLength() + 1 + |
240 last_packet_reduction_len_) { | 250 last_packet_reduction_len_) { |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) != | 705 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) != |
696 0) { | 706 0) { |
697 return false; | 707 return false; |
698 } | 708 } |
699 | 709 |
700 parsed_payload->payload = payload_data; | 710 parsed_payload->payload = payload_data; |
701 parsed_payload->payload_length = payload_data_length; | 711 parsed_payload->payload_length = payload_data_length; |
702 return true; | 712 return true; |
703 } | 713 } |
704 } // namespace webrtc | 714 } // namespace webrtc |
OLD | NEW |