mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1238433: Added telemtry for the proportion of frames dropped during playback. r=cpearce
This commit is contained in:
parent
d1637aa02a
commit
bd3e358413
@ -108,6 +108,9 @@ static mozilla::LazyLogModule gMediaElementEventsLog("nsMediaElementEvents");
|
||||
|
||||
#include "mozilla/EventStateManager.h"
|
||||
|
||||
#include "mozilla/dom/HTMLVideoElement.h"
|
||||
#include "mozilla/dom/VideoPlaybackQuality.h"
|
||||
|
||||
using namespace mozilla::layers;
|
||||
using mozilla::net::nsMediaFragmentURIParser;
|
||||
|
||||
@ -2701,6 +2704,17 @@ HTMLMediaElement::ReportMSETelemetry()
|
||||
}
|
||||
}
|
||||
|
||||
if (HTMLVideoElement* vid = HTMLVideoElement::FromContentOrNull(this)) {
|
||||
RefPtr<VideoPlaybackQuality> quality = vid->GetVideoPlaybackQuality();
|
||||
uint64_t totalFrames = quality->TotalVideoFrames();
|
||||
uint64_t droppedFrames = quality->DroppedVideoFrames();
|
||||
uint32_t percentage = 100 * droppedFrames / totalFrames;
|
||||
LOG(LogLevel::Debug,
|
||||
("Reporting telemetry DROPPED_FRAMES_IN_VIDEO_PLAYBACK"));
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_DROPPED_FRAMES_PROPORTION,
|
||||
percentage);
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_MSE_UNLOAD_STATE, state);
|
||||
LOG(LogLevel::Debug, ("%p VIDEO_MSE_UNLOAD_STATE = %d", this, state));
|
||||
|
||||
|
@ -10201,6 +10201,15 @@
|
||||
"kind": "count",
|
||||
"description": "Uses of HTMLMediaElement.fastSeek"
|
||||
},
|
||||
"VIDEO_DROPPED_FRAMES_PROPORTION" : {
|
||||
"alert_emails": ["lchristie@mozilla.com", "cpearce@mozilla.com"],
|
||||
"expires_in_version": "55",
|
||||
"kind": "linear",
|
||||
"high": "100",
|
||||
"n_buckets": 101,
|
||||
"bug_numbers": [1238433],
|
||||
"description": "Percentage of frames decoded frames dropped in an HTMLVideoElement"
|
||||
},
|
||||
"TAB_SWITCH_CACHE_POSITION": {
|
||||
"expires_in_version": "55",
|
||||
"bug_numbers": [1242013],
|
||||
|
Loading…
Reference in New Issue
Block a user