| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 91         _payloadType = packet.payloadType; | 91         _payloadType = packet.payloadType; | 
| 92     } | 92     } | 
| 93 | 93 | 
| 94     if (kStateEmpty == _state) { | 94     if (kStateEmpty == _state) { | 
| 95         // First packet (empty and/or media) inserted into this frame. | 95         // First packet (empty and/or media) inserted into this frame. | 
| 96         // store some info and set some initial values. | 96         // store some info and set some initial values. | 
| 97         _timeStamp = packet.timestamp; | 97         _timeStamp = packet.timestamp; | 
| 98         // We only take the ntp timestamp of the first packet of a frame. | 98         // We only take the ntp timestamp of the first packet of a frame. | 
| 99         ntp_time_ms_ = packet.ntp_time_ms_; | 99         ntp_time_ms_ = packet.ntp_time_ms_; | 
| 100         _codec = packet.codec; | 100         _codec = packet.codec; | 
| 101         if (packet.frameType != kFrameEmpty) { | 101         if (packet.frameType != kEmptyFrame) { | 
| 102             // first media packet | 102             // first media packet | 
| 103             SetState(kStateIncomplete); | 103             SetState(kStateIncomplete); | 
| 104         } | 104         } | 
| 105     } | 105     } | 
| 106 | 106 | 
| 107     uint32_t requiredSizeBytes = Length() + packet.sizeBytes + | 107     uint32_t requiredSizeBytes = Length() + packet.sizeBytes + | 
| 108                    (packet.insertStartCode ? kH264StartCodeLengthBytes : 0); | 108                    (packet.insertStartCode ? kH264StartCodeLengthBytes : 0); | 
| 109     if (requiredSizeBytes >= _size) { | 109     if (requiredSizeBytes >= _size) { | 
| 110         const uint8_t* prevBuffer = _buffer; | 110         const uint8_t* prevBuffer = _buffer; | 
| 111         const uint32_t increments = requiredSizeBytes / | 111         const uint32_t increments = requiredSizeBytes / | 
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 273     } else { | 273     } else { | 
| 274         size_t bytes_removed = _sessionInfo.MakeDecodable(); | 274         size_t bytes_removed = _sessionInfo.MakeDecodable(); | 
| 275         _length -= bytes_removed; | 275         _length -= bytes_removed; | 
| 276     } | 276     } | 
| 277 #else | 277 #else | 
| 278     size_t bytes_removed = _sessionInfo.MakeDecodable(); | 278     size_t bytes_removed = _sessionInfo.MakeDecodable(); | 
| 279     _length -= bytes_removed; | 279     _length -= bytes_removed; | 
| 280 #endif | 280 #endif | 
| 281     // Transfer frame information to EncodedFrame and create any codec | 281     // Transfer frame information to EncodedFrame and create any codec | 
| 282     // specific information. | 282     // specific information. | 
| 283     _frameType = ConvertFrameType(_sessionInfo.FrameType()); | 283     _frameType = _sessionInfo.FrameType(); | 
| 284     _completeFrame = _sessionInfo.complete(); | 284     _completeFrame = _sessionInfo.complete(); | 
| 285     _missingFrame = !continuous; | 285     _missingFrame = !continuous; | 
| 286 } | 286 } | 
| 287 | 287 | 
| 288 }  // namespace webrtc | 288 }  // namespace webrtc | 
| OLD | NEW | 
|---|