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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc

Issue 1266593003: FEC protect H264 delta frames as well. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 | « webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc ('k') | no next file » | no next file with comments »
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return true; 227 return true;
228 } 228 }
229 229
230 ProtectionType RtpPacketizerVp8::GetProtectionType() { 230 ProtectionType RtpPacketizerVp8::GetProtectionType() {
231 bool protect = 231 bool protect =
232 hdr_info_.temporalIdx == 0 || hdr_info_.temporalIdx == kNoTemporalIdx; 232 hdr_info_.temporalIdx == 0 || hdr_info_.temporalIdx == kNoTemporalIdx;
233 return protect ? kProtectedPacket : kUnprotectedPacket; 233 return protect ? kProtectedPacket : kUnprotectedPacket;
234 } 234 }
235 235
236 StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) { 236 StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) {
237 StorageType storage = kAllowRetransmission;
238 if (hdr_info_.temporalIdx == 0 && 237 if (hdr_info_.temporalIdx == 0 &&
239 !(retransmission_settings & kRetransmitBaseLayer)) { 238 !(retransmission_settings & kRetransmitBaseLayer)) {
240 storage = kDontRetransmit; 239 return kDontRetransmit;
241 } else if (hdr_info_.temporalIdx != kNoTemporalIdx && 240 }
241 if (hdr_info_.temporalIdx != kNoTemporalIdx &&
242 hdr_info_.temporalIdx > 0 && 242 hdr_info_.temporalIdx > 0 &&
243 !(retransmission_settings & kRetransmitHigherLayers)) { 243 !(retransmission_settings & kRetransmitHigherLayers)) {
244 storage = kDontRetransmit; 244 return kDontRetransmit;
245 } 245 }
246 return storage; 246 return kAllowRetransmission;
247 } 247 }
248 248
249 std::string RtpPacketizerVp8::ToString() { 249 std::string RtpPacketizerVp8::ToString() {
250 return "RtpPacketizerVp8"; 250 return "RtpPacketizerVp8";
251 } 251 }
252 252
253 size_t RtpPacketizerVp8::CalcNextSize(size_t max_payload_len, 253 size_t RtpPacketizerVp8::CalcNextSize(size_t max_payload_len,
254 size_t remaining_bytes, 254 size_t remaining_bytes,
255 bool split_payload) const { 255 bool split_payload) const {
256 if (max_payload_len == 0 || remaining_bytes == 0) { 256 if (max_payload_len == 0 || remaining_bytes == 0) {
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) != 734 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) !=
735 0) { 735 0) {
736 return false; 736 return false;
737 } 737 }
738 738
739 parsed_payload->payload = payload_data; 739 parsed_payload->payload = payload_data;
740 parsed_payload->payload_length = payload_data_length; 740 parsed_payload->payload_length = payload_data_length;
741 return true; 741 return true;
742 } 742 }
743 } // namespace webrtc 743 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698