Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 } | 66 } |
| 67 | 67 |
| 68 const int64_t now_ms = _clock->TimeInMilliseconds(); | 68 const int64_t now_ms = _clock->TimeInMilliseconds(); |
| 69 if (decode_time_ms < 0) { | 69 if (decode_time_ms < 0) { |
| 70 decode_time_ms = | 70 decode_time_ms = |
| 71 static_cast<int32_t>(now_ms - frameInfo->decodeStartTimeMs); | 71 static_cast<int32_t>(now_ms - frameInfo->decodeStartTimeMs); |
| 72 } | 72 } |
| 73 _timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms, | 73 _timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms, |
| 74 frameInfo->renderTimeMs); | 74 frameInfo->renderTimeMs); |
| 75 | 75 |
| 76 if (callback != NULL) { | 76 if (callback != NULL) { |
|
stefan-webrtc
2016/09/26 10:44:08
Can we possibly instead DCHECK on callback != null
sakal
2016/09/26 11:23:59
_receiveCallback is initiated with nullptr in the
stefan-webrtc
2016/09/26 11:39:22
It's always set here:
https://cs.chromium.org/chro
| |
| 77 decodedImage.set_render_time_ms(frameInfo->renderTimeMs); | 77 decodedImage.set_render_time_ms(frameInfo->renderTimeMs); |
| 78 decodedImage.set_rotation(frameInfo->rotation); | 78 decodedImage.set_rotation(frameInfo->rotation); |
| 79 callback->FrameToRender(decodedImage); | 79 callback->FrameToRender(decodedImage); |
| 80 } else { | |
| 81 LOG(LS_INFO) << "Dropping frame because callback is NULL."; | |
| 80 } | 82 } |
| 81 return WEBRTC_VIDEO_CODEC_OK; | 83 return WEBRTC_VIDEO_CODEC_OK; |
| 82 } | 84 } |
| 83 | 85 |
| 84 int32_t VCMDecodedFrameCallback::ReceivedDecodedReferenceFrame( | 86 int32_t VCMDecodedFrameCallback::ReceivedDecodedReferenceFrame( |
| 85 const uint64_t pictureId) { | 87 const uint64_t pictureId) { |
| 86 CriticalSectionScoped cs(_critSect); | 88 CriticalSectionScoped cs(_critSect); |
| 87 if (_receiveCallback != NULL) { | 89 if (_receiveCallback != NULL) { |
| 88 return _receiveCallback->ReceivedDecodedReferenceFrame(pictureId); | 90 return _receiveCallback->ReceivedDecodedReferenceFrame(pictureId); |
| 89 } | 91 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 | 181 |
| 180 bool VCMGenericDecoder::External() const { | 182 bool VCMGenericDecoder::External() const { |
| 181 return _isExternal; | 183 return _isExternal; |
| 182 } | 184 } |
| 183 | 185 |
| 184 bool VCMGenericDecoder::PrefersLateDecoding() const { | 186 bool VCMGenericDecoder::PrefersLateDecoding() const { |
| 185 return _decoder->PrefersLateDecoding(); | 187 return _decoder->PrefersLateDecoding(); |
| 186 } | 188 } |
| 187 | 189 |
| 188 } // namespace webrtc | 190 } // namespace webrtc |
| OLD | NEW |