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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 bool VCMSessionInfo::NonReference() const { | 110 bool VCMSessionInfo::NonReference() const { |
111 if (packets_.empty() || | 111 if (packets_.empty() || |
112 packets_.front().codecSpecificHeader.codec != kRtpVideoVp8) | 112 packets_.front().codecSpecificHeader.codec != kRtpVideoVp8) |
113 return false; | 113 return false; |
114 return packets_.front().codecSpecificHeader.codecHeader.VP8.nonReference; | 114 return packets_.front().codecSpecificHeader.codecHeader.VP8.nonReference; |
115 } | 115 } |
116 | 116 |
117 void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) { | |
118 if (packets_.empty() || | |
119 packets_.front().codecSpecificHeader.codec != kRtpVideoVp9 || | |
120 packets_.front().codecSpecificHeader.codecHeader.VP9.flexible_mode) { | |
121 return; | |
stefan-webrtc
2015/10/13 13:49:43
Should we get here if flexible_mode is true? Other
åsapersson
2015/10/14 15:13:51
If switching between flexible and non-flexible mod
| |
122 } | |
123 packets_.front().codecSpecificHeader.codecHeader.VP9.temporal_idx = | |
124 gof_info.temporal_idx[idx]; | |
125 packets_.front().codecSpecificHeader.codecHeader.VP9.temporal_up_switch = | |
126 gof_info.temporal_up_switch[idx]; | |
127 packets_.front().codecSpecificHeader.codecHeader.VP9.num_ref_pics = | |
128 gof_info.num_ref_pics[idx]; | |
129 for (size_t i = 0; i < gof_info.num_ref_pics[idx]; ++i) { | |
130 packets_.front().codecSpecificHeader.codecHeader.VP9.pid_diff[i] = | |
131 gof_info.pid_diff[idx][i]; | |
132 } | |
133 } | |
134 | |
117 void VCMSessionInfo::Reset() { | 135 void VCMSessionInfo::Reset() { |
118 session_nack_ = false; | 136 session_nack_ = false; |
119 complete_ = false; | 137 complete_ = false; |
120 decodable_ = false; | 138 decodable_ = false; |
121 frame_type_ = kVideoFrameDelta; | 139 frame_type_ = kVideoFrameDelta; |
122 packets_.clear(); | 140 packets_.clear(); |
123 empty_seq_num_low_ = -1; | 141 empty_seq_num_low_ = -1; |
124 empty_seq_num_high_ = -1; | 142 empty_seq_num_high_ = -1; |
125 first_packet_seq_num_ = -1; | 143 first_packet_seq_num_ = -1; |
126 last_packet_seq_num_ = -1; | 144 last_packet_seq_num_ = -1; |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
553 if (empty_seq_num_high_ == -1) | 571 if (empty_seq_num_high_ == -1) |
554 empty_seq_num_high_ = seq_num; | 572 empty_seq_num_high_ = seq_num; |
555 else | 573 else |
556 empty_seq_num_high_ = LatestSequenceNumber(seq_num, empty_seq_num_high_); | 574 empty_seq_num_high_ = LatestSequenceNumber(seq_num, empty_seq_num_high_); |
557 if (empty_seq_num_low_ == -1 || IsNewerSequenceNumber(empty_seq_num_low_, | 575 if (empty_seq_num_low_ == -1 || IsNewerSequenceNumber(empty_seq_num_low_, |
558 seq_num)) | 576 seq_num)) |
559 empty_seq_num_low_ = seq_num; | 577 empty_seq_num_low_ = seq_num; |
560 } | 578 } |
561 | 579 |
562 } // namespace webrtc | 580 } // namespace webrtc |
OLD | NEW |