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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, int64_t nowMs) { | 143 int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, int64_t nowMs) { |
144 TRACE_EVENT1("webrtc", "VCMGenericDecoder::Decode", "timestamp", | 144 TRACE_EVENT1("webrtc", "VCMGenericDecoder::Decode", "timestamp", |
145 frame.EncodedImage()._timeStamp); | 145 frame.EncodedImage()._timeStamp); |
146 _frameInfos[_nextFrameInfoIdx].decodeStartTimeMs = nowMs; | 146 _frameInfos[_nextFrameInfoIdx].decodeStartTimeMs = nowMs; |
147 _frameInfos[_nextFrameInfoIdx].renderTimeMs = frame.RenderTimeMs(); | 147 _frameInfos[_nextFrameInfoIdx].renderTimeMs = frame.RenderTimeMs(); |
148 _frameInfos[_nextFrameInfoIdx].rotation = frame.rotation(); | 148 _frameInfos[_nextFrameInfoIdx].rotation = frame.rotation(); |
149 _callback->Map(frame.TimeStamp(), &_frameInfos[_nextFrameInfoIdx]); | 149 _callback->Map(frame.TimeStamp(), &_frameInfos[_nextFrameInfoIdx]); |
150 | 150 |
151 _nextFrameInfoIdx = (_nextFrameInfoIdx + 1) % kDecoderFrameMemoryLength; | 151 _nextFrameInfoIdx = (_nextFrameInfoIdx + 1) % kDecoderFrameMemoryLength; |
| 152 const RTPFragmentationHeader dummy_header; |
152 int32_t ret = _decoder->Decode(frame.EncodedImage(), frame.MissingFrame(), | 153 int32_t ret = _decoder->Decode(frame.EncodedImage(), frame.MissingFrame(), |
153 frame.FragmentationHeader(), | 154 &dummy_header, |
154 frame.CodecSpecific(), frame.RenderTimeMs()); | 155 frame.CodecSpecific(), frame.RenderTimeMs()); |
155 | 156 |
156 _callback->OnDecoderImplementationName(_decoder->ImplementationName()); | 157 _callback->OnDecoderImplementationName(_decoder->ImplementationName()); |
157 if (ret < WEBRTC_VIDEO_CODEC_OK) { | 158 if (ret < WEBRTC_VIDEO_CODEC_OK) { |
158 LOG(LS_WARNING) << "Failed to decode frame with timestamp " | 159 LOG(LS_WARNING) << "Failed to decode frame with timestamp " |
159 << frame.TimeStamp() << ", error code: " << ret; | 160 << frame.TimeStamp() << ", error code: " << ret; |
160 _callback->Pop(frame.TimeStamp()); | 161 _callback->Pop(frame.TimeStamp()); |
161 return ret; | 162 return ret; |
162 } else if (ret == WEBRTC_VIDEO_CODEC_NO_OUTPUT || | 163 } else if (ret == WEBRTC_VIDEO_CODEC_NO_OUTPUT || |
163 ret == WEBRTC_VIDEO_CODEC_REQUEST_SLI) { | 164 ret == WEBRTC_VIDEO_CODEC_REQUEST_SLI) { |
(...skipping 15 matching lines...) Expand all Loading... |
179 | 180 |
180 bool VCMGenericDecoder::External() const { | 181 bool VCMGenericDecoder::External() const { |
181 return _isExternal; | 182 return _isExternal; |
182 } | 183 } |
183 | 184 |
184 bool VCMGenericDecoder::PrefersLateDecoding() const { | 185 bool VCMGenericDecoder::PrefersLateDecoding() const { |
185 return _decoder->PrefersLateDecoding(); | 186 return _decoder->PrefersLateDecoding(); |
186 } | 187 } |
187 | 188 |
188 } // namespace webrtc | 189 } // namespace webrtc |
OLD | NEW |