OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 bool bitstream_copied = GetBitstream(_buffer); | 96 bool bitstream_copied = GetBitstream(_buffer); |
97 RTC_DCHECK(bitstream_copied); | 97 RTC_DCHECK(bitstream_copied); |
98 _encodedWidth = first_packet->width; | 98 _encodedWidth = first_packet->width; |
99 _encodedHeight = first_packet->height; | 99 _encodedHeight = first_packet->height; |
100 | 100 |
101 // FrameObject members | 101 // FrameObject members |
102 timestamp = first_packet->timestamp; | 102 timestamp = first_packet->timestamp; |
103 | 103 |
104 VCMPacket* last_packet = packet_buffer_->GetPacket(last_seq_num); | 104 VCMPacket* last_packet = packet_buffer_->GetPacket(last_seq_num); |
105 RTC_CHECK(last_packet && last_packet->markerBit); | 105 RTC_CHECK(last_packet); |
| 106 RTC_CHECK(last_packet->markerBit); |
106 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ | 107 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ |
107 // ts_126114v120700p.pdf Section 7.4.5. | 108 // ts_126114v120700p.pdf Section 7.4.5. |
108 // The MTSI client shall add the payload bytes as defined in this clause | 109 // The MTSI client shall add the payload bytes as defined in this clause |
109 // onto the last RTP packet in each group of packets which make up a key | 110 // onto the last RTP packet in each group of packets which make up a key |
110 // frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265 | 111 // frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265 |
111 // (HEVC)). | 112 // (HEVC)). |
112 rotation_ = last_packet->video_header.rotation; | 113 rotation_ = last_packet->video_header.rotation; |
113 _rotation_set = true; | 114 _rotation_set = true; |
114 content_type_ = last_packet->video_header.content_type; | 115 content_type_ = last_packet->video_header.content_type; |
115 if (last_packet->video_header.video_timing.is_timing_frame) { | 116 if (last_packet->video_header.video_timing.is_timing_frame) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 rtc::Optional<RTPVideoTypeHeader> RtpFrameObject::GetCodecHeader() const { | 190 rtc::Optional<RTPVideoTypeHeader> RtpFrameObject::GetCodecHeader() const { |
190 rtc::CritScope lock(&packet_buffer_->crit_); | 191 rtc::CritScope lock(&packet_buffer_->crit_); |
191 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); | 192 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); |
192 if (!packet) | 193 if (!packet) |
193 return rtc::Optional<RTPVideoTypeHeader>(); | 194 return rtc::Optional<RTPVideoTypeHeader>(); |
194 return rtc::Optional<RTPVideoTypeHeader>(packet->video_header.codecHeader); | 195 return rtc::Optional<RTPVideoTypeHeader>(packet->video_header.codecHeader); |
195 } | 196 } |
196 | 197 |
197 } // namespace video_coding | 198 } // namespace video_coding |
198 } // namespace webrtc | 199 } // namespace webrtc |
OLD | NEW |