| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 return kNoTl0PicIdx; | 104 return kNoTl0PicIdx; |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool VCMSessionInfo::NonReference() const { | 108 bool VCMSessionInfo::NonReference() const { |
| 109 if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoVp8) | 109 if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoVp8) |
| 110 return false; | 110 return false; |
| 111 return packets_.front().video_header.codecHeader.VP8.nonReference; | 111 return packets_.front().video_header.codecHeader.VP8.nonReference; |
| 112 } | 112 } |
| 113 | 113 |
| 114 std::vector<NaluInfo> VCMSessionInfo::GetNaluInfos() const { | |
| 115 if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoH264) | |
| 116 return std::vector<NaluInfo>(); | |
| 117 std::vector<NaluInfo> nalu_infos; | |
| 118 for (const VCMPacket& packet : packets_) { | |
| 119 for (size_t i = 0; i < packet.video_header.codecHeader.H264.nalus_length; | |
| 120 ++i) { | |
| 121 nalu_infos.push_back(packet.video_header.codecHeader.H264.nalus[i]); | |
| 122 } | |
| 123 } | |
| 124 return nalu_infos; | |
| 125 } | |
| 126 | |
| 127 void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) { | 114 void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) { |
| 128 if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoVp9 || | 115 if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoVp9 || |
| 129 packets_.front().video_header.codecHeader.VP9.flexible_mode) { | 116 packets_.front().video_header.codecHeader.VP9.flexible_mode) { |
| 130 return; | 117 return; |
| 131 } | 118 } |
| 132 packets_.front().video_header.codecHeader.VP9.temporal_idx = | 119 packets_.front().video_header.codecHeader.VP9.temporal_idx = |
| 133 gof_info.temporal_idx[idx]; | 120 gof_info.temporal_idx[idx]; |
| 134 packets_.front().video_header.codecHeader.VP9.temporal_up_switch = | 121 packets_.front().video_header.codecHeader.VP9.temporal_up_switch = |
| 135 gof_info.temporal_up_switch[idx]; | 122 gof_info.temporal_up_switch[idx]; |
| 136 packets_.front().video_header.codecHeader.VP9.num_ref_pics = | 123 packets_.front().video_header.codecHeader.VP9.num_ref_pics = |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 if (empty_seq_num_high_ == -1) | 552 if (empty_seq_num_high_ == -1) |
| 566 empty_seq_num_high_ = seq_num; | 553 empty_seq_num_high_ = seq_num; |
| 567 else | 554 else |
| 568 empty_seq_num_high_ = LatestSequenceNumber(seq_num, empty_seq_num_high_); | 555 empty_seq_num_high_ = LatestSequenceNumber(seq_num, empty_seq_num_high_); |
| 569 if (empty_seq_num_low_ == -1 || | 556 if (empty_seq_num_low_ == -1 || |
| 570 IsNewerSequenceNumber(empty_seq_num_low_, seq_num)) | 557 IsNewerSequenceNumber(empty_seq_num_low_, seq_num)) |
| 571 empty_seq_num_low_ = seq_num; | 558 empty_seq_num_low_ = seq_num; |
| 572 } | 559 } |
| 573 | 560 |
| 574 } // namespace webrtc | 561 } // namespace webrtc |
| OLD | NEW |