summaryrefslogtreecommitdiffstats
path: root/dom/media/utils/TelemetryProbesReporter.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/media/utils/TelemetryProbesReporter.cpp
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/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.cpp28
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