From 189d4fd8fad9e3c776873be51938cd31a42b6177 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 20 May 2021 09:47:09 +0200 Subject: BASELINE: Update Chromium to 90.0.4430.221 Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920 Reviewed-by: Allan Sandfeld Jensen --- chromium/media/remoting/metrics.h | 47 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'chromium/media/remoting/metrics.h') 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); }; -- cgit v1.2.1