OLD | NEW |
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 nalu.pps_id = pps_id; | 567 nalu.pps_id = pps_id; |
568 nalu.sps_id = sps_id; | 568 nalu.sps_id = sps_id; |
569 } else { | 569 } else { |
570 LOG(LS_WARNING) | 570 LOG(LS_WARNING) |
571 << "Failed to parse PPS id and SPS id from PPS slice."; | 571 << "Failed to parse PPS id and SPS id from PPS slice."; |
572 } | 572 } |
573 break; | 573 break; |
574 } | 574 } |
575 case H264::NaluType::kIdr: | 575 case H264::NaluType::kIdr: |
576 parsed_payload->frame_type = kVideoFrameKey; | 576 parsed_payload->frame_type = kVideoFrameKey; |
577 RTC_FALLTHROUGH(); | 577 FALLTHROUGH(); |
578 case H264::NaluType::kSlice: { | 578 case H264::NaluType::kSlice: { |
579 rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice( | 579 rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice( |
580 &payload_data[start_offset], end_offset - start_offset); | 580 &payload_data[start_offset], end_offset - start_offset); |
581 if (pps_id) { | 581 if (pps_id) { |
582 nalu.pps_id = *pps_id; | 582 nalu.pps_id = *pps_id; |
583 } else { | 583 } else { |
584 LOG(LS_WARNING) << "Failed to parse PPS id from slice of type: " | 584 LOG(LS_WARNING) << "Failed to parse PPS id from slice of type: " |
585 << static_cast<int>(nalu.type); | 585 << static_cast<int>(nalu.type); |
586 } | 586 } |
587 break; | 587 break; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 h264->packetization_type = kH264FuA; | 659 h264->packetization_type = kH264FuA; |
660 h264->nalu_type = original_nal_type; | 660 h264->nalu_type = original_nal_type; |
661 if (first_fragment) { | 661 if (first_fragment) { |
662 h264->nalus[h264->nalus_length] = nalu; | 662 h264->nalus[h264->nalus_length] = nalu; |
663 h264->nalus_length = 1; | 663 h264->nalus_length = 1; |
664 } | 664 } |
665 return true; | 665 return true; |
666 } | 666 } |
667 | 667 |
668 } // namespace webrtc | 668 } // namespace webrtc |
OLD | NEW |