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

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

Issue 2614503002: Reland of Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame. (Closed)
Patch Set: Add base/deprecation.h include. Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 parsed_payload->payload_length = length_; 386 parsed_payload->payload_length = length_;
387 return true; 387 return true;
388 } 388 }
389 389
390 bool RtpDepacketizerH264::ProcessStapAOrSingleNalu( 390 bool RtpDepacketizerH264::ProcessStapAOrSingleNalu(
391 ParsedPayload* parsed_payload, 391 ParsedPayload* parsed_payload,
392 const uint8_t* payload_data) { 392 const uint8_t* payload_data) {
393 parsed_payload->type.Video.width = 0; 393 parsed_payload->type.Video.width = 0;
394 parsed_payload->type.Video.height = 0; 394 parsed_payload->type.Video.height = 0;
395 parsed_payload->type.Video.codec = kRtpVideoH264; 395 parsed_payload->type.Video.codec = kRtpVideoH264;
396 parsed_payload->type.Video.isFirstPacket = true; 396 parsed_payload->type.Video.is_first_packet_in_frame = true;
397 RTPVideoHeaderH264* h264_header = 397 RTPVideoHeaderH264* h264_header =
398 &parsed_payload->type.Video.codecHeader.H264; 398 &parsed_payload->type.Video.codecHeader.H264;
399 399
400 const uint8_t* nalu_start = payload_data + kNalHeaderSize; 400 const uint8_t* nalu_start = payload_data + kNalHeaderSize;
401 const size_t nalu_length = length_ - kNalHeaderSize; 401 const size_t nalu_length = length_ - kNalHeaderSize;
402 uint8_t nal_type = payload_data[0] & kTypeMask; 402 uint8_t nal_type = payload_data[0] & kTypeMask;
403 std::vector<size_t> nalu_start_offsets; 403 std::vector<size_t> nalu_start_offsets;
404 if (nal_type == H264::NaluType::kStapA) { 404 if (nal_type == H264::NaluType::kStapA) {
405 // Skip the StapA header (StapA NAL type + length). 405 // Skip the StapA header (StapA NAL type + length).
406 if (length_ <= kStapAHeaderSize) { 406 if (length_ <= kStapAHeaderSize) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 } 607 }
608 608
609 if (original_nal_type == H264::NaluType::kIdr) { 609 if (original_nal_type == H264::NaluType::kIdr) {
610 parsed_payload->frame_type = kVideoFrameKey; 610 parsed_payload->frame_type = kVideoFrameKey;
611 } else { 611 } else {
612 parsed_payload->frame_type = kVideoFrameDelta; 612 parsed_payload->frame_type = kVideoFrameDelta;
613 } 613 }
614 parsed_payload->type.Video.width = 0; 614 parsed_payload->type.Video.width = 0;
615 parsed_payload->type.Video.height = 0; 615 parsed_payload->type.Video.height = 0;
616 parsed_payload->type.Video.codec = kRtpVideoH264; 616 parsed_payload->type.Video.codec = kRtpVideoH264;
617 parsed_payload->type.Video.isFirstPacket = first_fragment; 617 parsed_payload->type.Video.is_first_packet_in_frame = first_fragment;
618 RTPVideoHeaderH264* h264 = &parsed_payload->type.Video.codecHeader.H264; 618 RTPVideoHeaderH264* h264 = &parsed_payload->type.Video.codecHeader.H264;
619 h264->packetization_type = kH264FuA; 619 h264->packetization_type = kH264FuA;
620 h264->nalu_type = original_nal_type; 620 h264->nalu_type = original_nal_type;
621 if (first_fragment) { 621 if (first_fragment) {
622 h264->nalus[h264->nalus_length] = nalu; 622 h264->nalus[h264->nalus_length] = nalu;
623 h264->nalus_length = 1; 623 h264->nalus_length = 1;
624 } 624 }
625 return true; 625 return true;
626 } 626 }
627 627
628 } // namespace webrtc 628 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/include/module_common_types.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698