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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // ts_126114v120700p.pdf Section 7.4.5. | 157 // ts_126114v120700p.pdf Section 7.4.5. |
158 // The MTSI client shall add the payload bytes as defined in this clause | 158 // The MTSI client shall add the payload bytes as defined in this clause |
159 // onto the last RTP packet in each group of packets which make up a key | 159 // onto the last RTP packet in each group of packets which make up a key |
160 // frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265 | 160 // frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265 |
161 // (HEVC)). | 161 // (HEVC)). |
162 if (packet.markerBit) { | 162 if (packet.markerBit) { |
163 RTC_DCHECK(!_rotation_set); | 163 RTC_DCHECK(!_rotation_set); |
164 rotation_ = packet.video_header.rotation; | 164 rotation_ = packet.video_header.rotation; |
165 _rotation_set = true; | 165 _rotation_set = true; |
166 content_type_ = packet.video_header.content_type; | 166 content_type_ = packet.video_header.content_type; |
167 if (packet.video_header.video_timing.is_timing_frame) { | 167 if (packet.video_header.video_timing.flags != TimingFrameFlags::kInvalid) { |
168 timing_.is_timing_frame = true; | |
169 timing_.encode_start_ms = | 168 timing_.encode_start_ms = |
170 ntp_time_ms_ + packet.video_header.video_timing.encode_start_delta_ms; | 169 ntp_time_ms_ + packet.video_header.video_timing.encode_start_delta_ms; |
171 timing_.encode_finish_ms = | 170 timing_.encode_finish_ms = |
172 ntp_time_ms_ + | 171 ntp_time_ms_ + |
173 packet.video_header.video_timing.encode_finish_delta_ms; | 172 packet.video_header.video_timing.encode_finish_delta_ms; |
174 timing_.packetization_finish_ms = | 173 timing_.packetization_finish_ms = |
175 ntp_time_ms_ + | 174 ntp_time_ms_ + |
176 packet.video_header.video_timing.packetization_finish_delta_ms; | 175 packet.video_header.video_timing.packetization_finish_delta_ms; |
177 timing_.pacer_exit_ms = | 176 timing_.pacer_exit_ms = |
178 ntp_time_ms_ + packet.video_header.video_timing.pacer_exit_delta_ms; | 177 ntp_time_ms_ + packet.video_header.video_timing.pacer_exit_delta_ms; |
179 timing_.network_timestamp_ms = | 178 timing_.network_timestamp_ms = |
180 ntp_time_ms_ + | 179 ntp_time_ms_ + |
181 packet.video_header.video_timing.network_timstamp_delta_ms; | 180 packet.video_header.video_timing.network_timstamp_delta_ms; |
182 timing_.network2_timestamp_ms = | 181 timing_.network2_timestamp_ms = |
183 ntp_time_ms_ + | 182 ntp_time_ms_ + |
184 packet.video_header.video_timing.network2_timstamp_delta_ms; | 183 packet.video_header.video_timing.network2_timstamp_delta_ms; |
185 } else { | |
186 timing_.is_timing_frame = false; | |
187 } | 184 } |
| 185 timing_.flags = packet.video_header.video_timing.flags; |
188 } | 186 } |
189 | 187 |
190 if (packet.is_first_packet_in_frame) { | 188 if (packet.is_first_packet_in_frame) { |
191 playout_delay_ = packet.video_header.playout_delay; | 189 playout_delay_ = packet.video_header.playout_delay; |
192 } | 190 } |
193 | 191 |
194 if (_sessionInfo.complete()) { | 192 if (_sessionInfo.complete()) { |
195 SetState(kStateComplete); | 193 SetState(kStateComplete); |
196 return kCompleteSession; | 194 return kCompleteSession; |
197 } else if (_sessionInfo.decodable()) { | 195 } else if (_sessionInfo.decodable()) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 size_t bytes_removed = _sessionInfo.MakeDecodable(); | 294 size_t bytes_removed = _sessionInfo.MakeDecodable(); |
297 _length -= bytes_removed; | 295 _length -= bytes_removed; |
298 // Transfer frame information to EncodedFrame and create any codec | 296 // Transfer frame information to EncodedFrame and create any codec |
299 // specific information. | 297 // specific information. |
300 _frameType = _sessionInfo.FrameType(); | 298 _frameType = _sessionInfo.FrameType(); |
301 _completeFrame = _sessionInfo.complete(); | 299 _completeFrame = _sessionInfo.complete(); |
302 _missingFrame = !continuous; | 300 _missingFrame = !continuous; |
303 } | 301 } |
304 | 302 |
305 } // namespace webrtc | 303 } // namespace webrtc |
OLD | NEW |