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