| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 bool VCMFrameBuffer::IsSessionComplete() const { | 82 bool VCMFrameBuffer::IsSessionComplete() const { |
| 83 return _sessionInfo.complete(); | 83 return _sessionInfo.complete(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Insert packet | 86 // Insert packet |
| 87 VCMFrameBufferEnum VCMFrameBuffer::InsertPacket( | 87 VCMFrameBufferEnum VCMFrameBuffer::InsertPacket( |
| 88 const VCMPacket& packet, | 88 const VCMPacket& packet, |
| 89 int64_t timeInMs, | 89 int64_t timeInMs, |
| 90 VCMDecodeErrorMode decode_error_mode, | 90 VCMDecodeErrorMode decode_error_mode, |
| 91 const FrameData& frame_data) { | 91 const FrameData& frame_data) { |
| 92 assert(!(NULL == packet.dataPtr && packet.sizeBytes > 0)); | 92 assert(!(nullptr == packet.dataPtr && packet.sizeBytes > 0)); |
| 93 if (packet.dataPtr != NULL) { | 93 if (packet.dataPtr != nullptr) { |
| 94 _payloadType = packet.payloadType; | 94 _payloadType = packet.payloadType; |
| 95 } | 95 } |
| 96 | 96 |
| 97 if (kStateEmpty == _state) { | 97 if (kStateEmpty == _state) { |
| 98 // First packet (empty and/or media) inserted into this frame. | 98 // First packet (empty and/or media) inserted into this frame. |
| 99 // store some info and set some initial values. | 99 // store some info and set some initial values. |
| 100 _timeStamp = packet.timestamp; | 100 _timeStamp = packet.timestamp; |
| 101 // We only take the ntp timestamp of the first packet of a frame. | 101 // We only take the ntp timestamp of the first packet of a frame. |
| 102 ntp_time_ms_ = packet.ntp_time_ms_; | 102 ntp_time_ms_ = packet.ntp_time_ms_; |
| 103 _codec = packet.codec; | 103 _codec = packet.codec; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 size_t bytes_removed = _sessionInfo.MakeDecodable(); | 260 size_t bytes_removed = _sessionInfo.MakeDecodable(); |
| 261 _length -= bytes_removed; | 261 _length -= bytes_removed; |
| 262 // Transfer frame information to EncodedFrame and create any codec | 262 // Transfer frame information to EncodedFrame and create any codec |
| 263 // specific information. | 263 // specific information. |
| 264 _frameType = _sessionInfo.FrameType(); | 264 _frameType = _sessionInfo.FrameType(); |
| 265 _completeFrame = _sessionInfo.complete(); | 265 _completeFrame = _sessionInfo.complete(); |
| 266 _missingFrame = !continuous; | 266 _missingFrame = !continuous; |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace webrtc | 269 } // namespace webrtc |
| OLD | NEW |