diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/media/utils/TelemetryProbesReporter.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/utils/TelemetryProbesReporter.cpp')
-rw-r--r-- | dom/media/utils/TelemetryProbesReporter.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dom/media/utils/TelemetryProbesReporter.cpp b/dom/media/utils/TelemetryProbesReporter.cpp index 377cee9abc..e702ae14c5 100644 --- a/dom/media/utils/TelemetryProbesReporter.cpp +++ b/dom/media/utils/TelemetryProbesReporter.cpp @@ -7,6 +7,7 @@ #include <cmath> #include "FrameStatistics.h" +#include "MediaCodecsSupport.h" #include "VideoUtils.h" #include "mozilla/EMEUtils.h" #include "mozilla/Logging.h" @@ -791,5 +792,32 @@ double TelemetryProbesReporter::GetAudiblePlayTimeInSeconds() const { return GetTotalAudioPlayTimeInSeconds() - GetInaudiblePlayTimeInSeconds(); } +/* static */ +void TelemetryProbesReporter::ReportDeviceMediaCodecSupported( + const media::MediaCodecsSupported& aSupported) { + static bool sReported = false; + if (sReported) { + return; + } + MOZ_ASSERT(ContainHardwareCodecsSupported(aSupported)); + sReported = true; + + glean::media_playback::device_hardware_decoder_support.Get("h264"_ns).Set( + aSupported.contains( + mozilla::media::MediaCodecsSupport::H264HardwareDecode)); + glean::media_playback::device_hardware_decoder_support.Get("vp8"_ns).Set( + aSupported.contains( + mozilla::media::MediaCodecsSupport::VP8HardwareDecode)); + glean::media_playback::device_hardware_decoder_support.Get("vp9"_ns).Set( + aSupported.contains( + mozilla::media::MediaCodecsSupport::VP9HardwareDecode)); + glean::media_playback::device_hardware_decoder_support.Get("av1"_ns).Set( + aSupported.contains( + mozilla::media::MediaCodecsSupport::AV1HardwareDecode)); + glean::media_playback::device_hardware_decoder_support.Get("hevc"_ns).Set( + aSupported.contains( + mozilla::media::MediaCodecsSupport::HEVCHardwareDecode)); +} + #undef LOG } // namespace mozilla |