Chromium Code Reviews

Unified Diff: webrtc/modules/video_coding/generic_decoder.cc

Issue 2361803003: Add logging statements to places where the frame might be dropped in WebRTC pipeline. (Closed)
Patch Set: Add fake renderer to build files. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/video_coding/generic_decoder.cc
diff --git a/webrtc/modules/video_coding/generic_decoder.cc b/webrtc/modules/video_coding/generic_decoder.cc
index 38bdb69245028a3ca2e4f8513bc49ff4b245df25..eae2d4e7d7b816a020f4566ebab632ed7ed71b24 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/modules/video_coding/include/video_coding.h"
@@ -58,6 +59,7 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
frameInfo = _timestampMap.Pop(decodedImage.timestamp());
callback = _receiveCallback;
}
+ RTC_DCHECK(callback != nullptr);
if (frameInfo == NULL) {
LOG(LS_WARNING) << "Too many frames backed up in the decoder, dropping "
@@ -73,11 +75,9 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
_timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms,
frameInfo->renderTimeMs);
- if (callback != NULL) {
- decodedImage.set_render_time_ms(frameInfo->renderTimeMs);
- decodedImage.set_rotation(frameInfo->rotation);
- callback->FrameToRender(decodedImage);
- }
+ decodedImage.set_render_time_ms(frameInfo->renderTimeMs);
+ decodedImage.set_rotation(frameInfo->rotation);
+ callback->FrameToRender(decodedImage);
return WEBRTC_VIDEO_CODEC_OK;
}

Powered by Google App Engine