Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1149)

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

Issue 2649133005: Add QP sum stats for received streams. (Closed)
Patch Set: Add DecodedWithQp to interface. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b95571b8f73793718d318eedc82fff249e9a9f17..c2f7b50ca739d93b7ecccffe42a6e6b0da2da642 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -48,6 +48,17 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage) {
int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
int64_t decode_time_ms) {
+ return DecodedWithQp(decodedImage, decode_time_ms, -1);
+}
+
+int32_t VCMDecodedFrameCallback::DecodedWithQp(VideoFrame& decodedImage,
+ int qp) {
+ return DecodedWithQp(decodedImage, -1, qp);
+}
+
+int32_t VCMDecodedFrameCallback::DecodedWithQp(VideoFrame& decodedImage,
+ int64_t decode_time_ms,
+ int qp) {
TRACE_EVENT_INSTANT1("webrtc", "VCMDecodedFrameCallback::Decoded",
"timestamp", decodedImage.timestamp());
// TODO(holmer): We should improve this so that we can handle multiple
@@ -79,7 +90,7 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
// TODO(sakal): Investigate why callback is NULL sometimes and replace if
// statement with a DCHECK.
if (callback) {
- callback->FrameToRender(decodedImage);
+ callback->FrameToRender(decodedImage, qp);
} else {
LOG(LS_WARNING) << "No callback, dropping frame.";
}

Powered by Google App Engine
This is Rietveld 408576698