| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // the bitstream (think size of an std::vector). | 56 // the bitstream (think size of an std::vector). |
| 57 if (codec_type_ == kVideoCodecH264) | 57 if (codec_type_ == kVideoCodecH264) |
| 58 _size = frame_size + EncodedImage::kBufferPaddingBytesH264; | 58 _size = frame_size + EncodedImage::kBufferPaddingBytesH264; |
| 59 else | 59 else |
| 60 _size = frame_size; | 60 _size = frame_size; |
| 61 | 61 |
| 62 _buffer = new uint8_t[_size]; | 62 _buffer = new uint8_t[_size]; |
| 63 _length = frame_size; | 63 _length = frame_size; |
| 64 _frameType = first_packet->frameType; | 64 _frameType = first_packet->frameType; |
| 65 GetBitstream(_buffer); | 65 GetBitstream(_buffer); |
| 66 _encodedWidth = first_packet->width; |
| 67 _encodedHeight = first_packet->height; |
| 66 | 68 |
| 67 // FrameObject members | 69 // FrameObject members |
| 68 timestamp = first_packet->timestamp; | 70 timestamp = first_packet->timestamp; |
| 69 | 71 |
| 70 VCMPacket* last_packet = packet_buffer_->GetPacket(last_seq_num); | 72 VCMPacket* last_packet = packet_buffer_->GetPacket(last_seq_num); |
| 71 RTC_DCHECK(last_packet && last_packet->markerBit); | 73 RTC_DCHECK(last_packet && last_packet->markerBit); |
| 72 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ | 74 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ |
| 73 // ts_126114v120700p.pdf Section 7.4.5. | 75 // ts_126114v120700p.pdf Section 7.4.5. |
| 74 // The MTSI client shall add the payload bytes as defined in this clause | 76 // The MTSI client shall add the payload bytes as defined in this clause |
| 75 // onto the last RTP packet in each group of packets which make up a key | 77 // onto the last RTP packet in each group of packets which make up a key |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 rtc::Optional<RTPVideoTypeHeader> RtpFrameObject::GetCodecHeader() const { | 124 rtc::Optional<RTPVideoTypeHeader> RtpFrameObject::GetCodecHeader() const { |
| 123 rtc::CritScope lock(&packet_buffer_->crit_); | 125 rtc::CritScope lock(&packet_buffer_->crit_); |
| 124 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); | 126 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); |
| 125 if (!packet) | 127 if (!packet) |
| 126 return rtc::Optional<RTPVideoTypeHeader>(); | 128 return rtc::Optional<RTPVideoTypeHeader>(); |
| 127 return rtc::Optional<RTPVideoTypeHeader>(packet->video_header.codecHeader); | 129 return rtc::Optional<RTPVideoTypeHeader>(packet->video_header.codecHeader); |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace video_coding | 132 } // namespace video_coding |
| 131 } // namespace webrtc | 133 } // namespace webrtc |
| OLD | NEW |