summaryrefslogtreecommitdiff
path: root/chromium/media/remoting/metrics.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-20 09:47:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-07 11:15:42 +0000
commit189d4fd8fad9e3c776873be51938cd31a42b6177 (patch)
tree6497caeff5e383937996768766ab3bb2081a40b2 /chromium/media/remoting/metrics.h
parent8bc75099d364490b22f43a7ce366b366c08f4164 (diff)
downloadqtwebengine-chromium-189d4fd8fad9e3c776873be51938cd31a42b6177.tar.gz
BASELINE: Update Chromium to 90.0.4430.221
Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/media/remoting/metrics.h')
-rw-r--r--chromium/media/remoting/metrics.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/chromium/media/remoting/metrics.h b/chromium/media/remoting/metrics.h
index db7f3a6d734..017ad9de60f 100644
--- a/chromium/media/remoting/metrics.h
+++ b/chromium/media/remoting/metrics.h
@@ -15,6 +15,39 @@
namespace media {
namespace remoting {
+// The compatibility of a media content with remoting, and the reasons for
+// incompatibilities.
+// These values are persisted to logs. Entries should not be renumbered and
+// numeric values should never be reused.
+enum class RemotingCompatibility {
+ kCompatible = 0,
+ kNoAudioNorVideo = 1,
+ kEncryptedVideo = 2,
+ kIncompatibleVideoCodec = 3,
+ kEncryptedAudio = 4,
+ kIncompatibleAudioCodec = 5,
+ kDisabledByPage = 6,
+ kDurationBelowThreshold = 7,
+ // Add new values here. Don't re-number existing values.
+
+ kMaxValue = kDurationBelowThreshold,
+};
+
+// The rate of pixels in a video and whether the receiver supports its playback.
+// These values are persisted to logs. Entries should not be renumbered and
+// numeric values should never be reused.
+enum class PixelRateSupport {
+ // Pixels per second is at most the equivalent of 1080p 30fps.
+ k2kSupported = 0,
+ // More than 1080p 30fps and at most 2160p 30fps.
+ k4kSupported = 1,
+ k4kNotSupported = 2,
+ kOver4kNotSupported = 3,
+ // Add new values here. Don't re-number existing values.
+
+ kMaxValue = kOver4kNotSupported,
+};
+
class SessionMetricsRecorder {
public:
SessionMetricsRecorder();
@@ -32,6 +65,14 @@ class SessionMetricsRecorder {
void OnPipelineMetadataChanged(const PipelineMetadata& metadata);
void OnRemotePlaybackDisabled(bool disabled);
+ // Records the rate of pixels in a video (bucketed into FHD, 4K, etc.) and
+ // whether the receiver supports its playback. Records only on the first call
+ // for the recorder instance.
+ void RecordVideoPixelRateSupport(PixelRateSupport support);
+
+ // Records the compatibility of a media content with remoting.
+ void RecordCompatibility(RemotingCompatibility compatibility);
+
private:
// Whether audio only, video only, or both were played during the session.
//
@@ -70,7 +111,9 @@ class SessionMetricsRecorder {
// Last known disabled playback state. This can change before/after a remoting
// session as well as during one.
- bool remote_playback_is_disabled_;
+ bool remote_playback_is_disabled_ = false;
+
+ bool did_record_pixel_rate_support_ = false;
DISALLOW_COPY_AND_ASSIGN(SessionMetricsRecorder);
};
@@ -94,7 +137,7 @@ class RendererMetricsRecorder {
private:
const base::TimeTicks start_time_;
- bool did_record_first_playout_;
+ bool did_record_first_playout_ = false;
DISALLOW_COPY_AND_ASSIGN(RendererMetricsRecorder);
};