diff options
Diffstat (limited to '')
-rw-r--r-- | dom/media/utils/TelemetryProbesReporter.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/dom/media/utils/TelemetryProbesReporter.h b/dom/media/utils/TelemetryProbesReporter.h index be81e8022c..43e05dcadd 100644 --- a/dom/media/utils/TelemetryProbesReporter.h +++ b/dom/media/utils/TelemetryProbesReporter.h @@ -8,6 +8,7 @@ #include "MediaInfo.h" #include "mozilla/Maybe.h" #include "mozilla/AwakeTimeStamp.h" +#include "mozilla/EnumSet.h" #include "AudioChannelService.h" #include "nsISupportsImpl.h" @@ -66,8 +67,20 @@ class TelemetryProbesReporter final { void OnMutedChanged(bool aMuted); void OnDecodeSuspended(); void OnDecodeResumed(); - void OntFirstFrameLoaded(const TimeDuration& aLoadedFirstFrameTime, - bool aIsMSE, bool aIsExternalEngineStateMachine); + + enum class FirstFrameLoadedFlag { + IsMSE, + IsExternalEngineStateMachine, + IsHLS, + IsHardwareDecoding, + }; + using FirstFrameLoadedFlagSet = EnumSet<FirstFrameLoadedFlag, uint8_t>; + void OntFirstFrameLoaded(const double aLoadedFirstFrameTime, + const double aLoadedMetadataTime, + const double aTotalWaitingDataTime, + const double aTotalBufferingTime, + const FirstFrameLoadedFlagSet aFlags, + const MediaInfo& aInfo); double GetTotalVideoPlayTimeInSeconds() const; double GetTotalVideoHDRPlayTimeInSeconds() const; @@ -100,7 +113,10 @@ class TelemetryProbesReporter final { void ReportResultForMFCDMPlaybackIfNeeded(double aTotalPlayTimeS, const nsCString& aResolution); #endif - + void ReportPlaytimeForKeySystem(const nsAString& aKeySystem, + const double aTotalPlayTimeS, + const nsCString& aCodec, + const nsCString& aResolution); // Helper class to measure times for playback telemetry stats class TimeDurationAccumulator { public: |