Expose codec implementation names in stats.
Used to distinguish between software/hardware encoders/decoders and
other implementation differences. Useful for tracking quality
regressions related to specific implementations.
BUG=webrtc:4897
R=hta@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1406903002 .
Cr-Commit-Position: refs/heads/master@{#11084}
diff --git a/webrtc/video_decoder.h b/webrtc/video_decoder.h
index 30e2779..3cd94e8 100644
--- a/webrtc/video_decoder.h
+++ b/webrtc/video_decoder.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_VIDEO_DECODER_H_
#define WEBRTC_VIDEO_DECODER_H_
+#include <string>
#include <vector>
#include "webrtc/common_types.h"
@@ -78,6 +79,8 @@
// That is, it can not decode infinite number of frames before the decoded
// frame is consumed.
virtual bool PrefersLateDecoding() const { return true; }
+
+ virtual const char* ImplementationName() const { return "unknown"; }
};
// Class used to wrap external VideoDecoders to provide a fallback option on
@@ -104,6 +107,8 @@
int32_t Reset() override;
bool PrefersLateDecoding() const override;
+ const char* ImplementationName() const override;
+
private:
bool InitFallbackDecoder();
@@ -112,6 +117,7 @@
VideoCodec codec_settings_;
int32_t number_of_cores_;
+ std::string fallback_implementation_name_;
rtc::scoped_ptr<VideoDecoder> fallback_decoder_;
DecodedImageCallback* callback_;
};