Bug 1356046 - Remove expired media telemetry; r=jya,alwu,bryce

This removes all telemetry which expired in Firefox 69 or earlier, with the
exceptions of the following, which we plan to renew:
* AUDIO_TRACK_SILENCE_PROPORTION
* MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT
* MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT
* MEDIACACHESTREAM_LENGTH_KB
* MEDIA_MKV_CANPLAY_REQUESTED
* MEDIA_PAGE_COUNT
* MEDIA_PAGE_HAD_MEDIA_COUNT
* VIDEO_DROPPED_FRAMES_PROPORTION
* VIDEO_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE
* VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE
* VIDEO_INTER_KEYFRAME_AVERAGE_MS
* VIDEO_INTER_KEYFRAME_MAX_MS
* VIDEO_SUSPEND_RECOVERY_TIME_MS
* VIDEO_VP9_BENCHMARK_FPS
* WEB_AUDIO_BECOMES_AUDIBLE_TIME
* WEBVTT_TRACK_KINDS

Differential Revision: https://phabricator.services.mozilla.com/D37313

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dan Minor 2019-08-02 18:17:45 +00:00
Родитель 9d98f6740c
Коммит 082a390c61
31 изменённых файлов: 10 добавлений и 1185 удалений

Просмотреть файл

@ -321,17 +321,12 @@ let gDecoderDoctorHandler = {
formats && "media.decoder-doctor." + decoderDoctorReportId + ".formats";
let buttonClickedPref =
"media.decoder-doctor." + decoderDoctorReportId + ".button-clicked";
let histogram = Services.telemetry.getKeyedHistogramById(
"DECODER_DOCTOR_INFOBAR_STATS"
);
let formatsInPref = formats && Services.prefs.getCharPref(formatsPref, "");
if (!isSolved) {
if (formats) {
if (!formatsInPref) {
Services.prefs.setCharPref(formatsPref, formats);
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_SHOWN_FIRST);
} else {
// Split existing formats into an array of strings.
let existing = formatsInPref.split(",").map(x => x.trim());
@ -354,7 +349,6 @@ let gDecoderDoctorHandler = {
);
return;
}
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_SHOWN);
let buttons = [];
let sumo = gDecoderDoctorHandler.getSumoForLearnHowButton(type);
@ -369,12 +363,7 @@ let gDecoderDoctorHandler = {
);
if (!clickedInPref) {
Services.prefs.setBoolPref(buttonClickedPref, true);
histogram.add(
decoderDoctorReportId,
TELEMETRY_DDSTAT_CLICKED_FIRST
);
}
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_CLICKED);
let baseURL = Services.urlFormatter.formatURLPref(
"app.support.baseURL"
@ -399,12 +388,7 @@ let gDecoderDoctorHandler = {
);
if (!clickedInPref) {
Services.prefs.setBoolPref(buttonClickedPref, true);
histogram.add(
decoderDoctorReportId,
TELEMETRY_DDSTAT_CLICKED_FIRST
);
}
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_CLICKED);
let params = new URLSearchParams();
params.append("url", docURL);
@ -435,7 +419,6 @@ let gDecoderDoctorHandler = {
// first time we get this resolution -> Clear prefs and report telemetry.
Services.prefs.clearUserPref(formatsPref);
Services.prefs.clearUserPref(buttonClickedPref);
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_SOLVED);
}
},
};

Просмотреть файл

@ -1739,9 +1739,6 @@ Document::~Document() {
if (mDocTreeHadAudibleMedia) {
ScalarAdd(Telemetry::ScalarID::MEDIA_PAGE_HAD_MEDIA_COUNT, 1);
}
if (mDocTreeHadPlayRevoked) {
ScalarAdd(Telemetry::ScalarID::MEDIA_PAGE_HAD_PLAY_REVOKED_COUNT, 1);
}
if (IsHTMLDocument()) {
switch (GetCompatibilityMode()) {

Просмотреть файл

@ -1758,9 +1758,6 @@ already_AddRefed<Promise> Navigator::RequestMediaKeySystemAccess(
mWindow->IsSecureContext())
.get());
Telemetry::Accumulate(Telemetry::MEDIA_EME_SECURE_CONTEXT,
mWindow->IsSecureContext());
if (!mWindow->IsSecureContext()) {
Document* doc = mWindow->GetExtantDoc();
AutoTArray<nsString, 1> params;

Просмотреть файл

@ -2004,7 +2004,6 @@ void HTMLMediaElement::AbortExistingLoads() {
mPendingEncryptedInitData.Reset();
mWaitingForKey = NOT_WAITING_FOR_KEY;
mSourcePointer = nullptr;
mBlockedAsWithoutMetadata = false;
mTags = nullptr;
mAudioTrackSilenceStartedTime = 0.0;
@ -2805,8 +2804,6 @@ double HTMLMediaElement::CurrentTime() const {
void HTMLMediaElement::FastSeek(double aTime, ErrorResult& aRv) {
LOG(LogLevel::Debug, ("%p FastSeek(%f) called by JS", this, aTime));
LOG(LogLevel::Debug, ("Reporting telemetry VIDEO_FASTSEEK_USED"));
Telemetry::Accumulate(Telemetry::VIDEO_FASTSEEK_USED, 1);
RefPtr<Promise> tobeDropped =
Seek(aTime, SeekTarget::PrevSyncPoint, IgnoreErrors());
}
@ -3791,16 +3788,7 @@ void HTMLMediaElement::UpdateHadAudibleAutoplayState() {
OwnerDoc()->SetDocTreeHadAudibleMedia();
if (AutoplayPolicy::WouldBeAllowedToPlayIfAutoplayDisabled(*this)) {
ScalarAdd(Telemetry::ScalarID::MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT, 1);
if (mReadyState >= HAVE_METADATA && !HasAudio()) {
ScalarAdd(
Telemetry::ScalarID::MEDIA_ALLOWED_AUTOPLAY_NO_AUDIO_TRACK_COUNT,
1);
}
} else {
if (mReadyState < HAVE_METADATA) {
mBlockedAsWithoutMetadata = true;
ScalarAdd(Telemetry::ScalarID::MEDIA_BLOCKED_NO_METADATA, 1);
}
ScalarAdd(Telemetry::ScalarID::MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT,
1);
}
@ -4294,49 +4282,6 @@ void HTMLMediaElement::HiddenVideoStop() {
}
void HTMLMediaElement::ReportTelemetry() {
// Report telemetry for videos when a page is unloaded. We
// want to know data on what state the video is at when
// the user has exited.
enum UnloadedState {
ENDED = 0,
PAUSED = 1,
STALLED = 2,
SEEKING = 3,
OTHER = 4
};
UnloadedState state = OTHER;
if (Seeking()) {
state = SEEKING;
} else if (Ended()) {
state = ENDED;
} else if (Paused()) {
state = PAUSED;
} else {
// For buffering we check if the current playback position is at the end
// of a buffered range, within a margin of error. We also consider to be
// buffering if the last frame status was buffering and the ready state is
// HAVE_CURRENT_DATA to account for times where we are in a buffering state
// regardless of what actual data we have buffered.
bool stalled = false;
RefPtr<TimeRanges> ranges = Buffered();
const double errorMargin = 0.05;
double t = CurrentTime();
TimeRanges::index_type index = ranges->Find(t, errorMargin);
stalled =
index != TimeRanges::NoIndex && (ranges->End(index) - t) < errorMargin;
stalled |= mDecoder &&
NextFrameStatus() ==
MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE_BUFFERING &&
mReadyState == HAVE_CURRENT_DATA;
if (stalled) {
state = STALLED;
}
}
Telemetry::Accumulate(Telemetry::VIDEO_UNLOAD_STATE, state);
LOG(LogLevel::Debug, ("%p VIDEO_UNLOAD_STATE = %d", this, state));
FrameStatisticsData data;
if (HTMLVideoElement* vid = HTMLVideoElement::FromNodeOrNull(this)) {
@ -5099,12 +5044,6 @@ void HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo,
"Video resolution must be known on 'loadedmetadata'");
DispatchAsyncEvent(NS_LITERAL_STRING("loadedmetadata"));
if (mBlockedAsWithoutMetadata && !HasAudio()) {
mBlockedAsWithoutMetadata = false;
ScalarAdd(
Telemetry::ScalarID::MEDIA_BLOCKED_NO_METADATA_ENDUP_NO_AUDIO_TRACK, 1);
}
if (mDecoder && mDecoder->IsTransportSeekable() &&
mDecoder->IsMediaSeekable()) {
ProcessMediaFragmentURI();
@ -7089,107 +7028,6 @@ void HTMLMediaElement::NotifyCueDisplayStatesChanged() {
void HTMLMediaElement::MarkAsContentSource(CallerAPI aAPI) {
const bool isVisible = mVisibilityState == Visibility::ApproximatelyVisible;
if (isVisible) {
// 0 = ALL_VISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 0);
} else {
// 1 = ALL_INVISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 1);
if (IsInComposedDoc()) {
// 0 = ALL_IN_TREE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT,
0);
} else {
// 1 = ALL_NOT_IN_TREE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT,
1);
}
}
switch (aAPI) {
case CallerAPI::DRAW_IMAGE: {
if (isVisible) {
// 2 = drawImage_VISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 2);
} else {
// 3 = drawImage_INVISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 3);
if (IsInComposedDoc()) {
// 2 = drawImage_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 2);
} else {
// 3 = drawImage_NOT_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 3);
}
}
break;
}
case CallerAPI::CREATE_PATTERN: {
if (isVisible) {
// 4 = createPattern_VISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 4);
} else {
// 5 = createPattern_INVISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 5);
if (IsInComposedDoc()) {
// 4 = createPattern_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 4);
} else {
// 5 = createPattern_NOT_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 5);
}
}
break;
}
case CallerAPI::CREATE_IMAGEBITMAP: {
if (isVisible) {
// 6 = createImageBitmap_VISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 6);
} else {
// 7 = createImageBitmap_INVISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 7);
if (IsInComposedDoc()) {
// 6 = createImageBitmap_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 6);
} else {
// 7 = createImageBitmap_NOT_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 7);
}
}
break;
}
case CallerAPI::CAPTURE_STREAM: {
if (isVisible) {
// 8 = captureStream_VISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 8);
} else {
// 9 = captureStream_INVISIBLE
Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 9);
if (IsInComposedDoc()) {
// 8 = captureStream_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 8);
} else {
// 9 = captureStream_NOT_IN_TREE
Telemetry::Accumulate(
Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 9);
}
}
break;
}
}
LOG(LogLevel::Debug,
("%p Log VIDEO_AS_CONTENT_SOURCE: visibility = %u, API: '%d' and 'All'",
this, isVisible, static_cast<int>(aAPI)));
@ -7431,12 +7269,6 @@ void HTMLMediaElement::ReportCanPlayTelemetry() {
[thread, aac, h264]() {
LOG(LogLevel::Debug,
("MediaTelemetry aac=%d h264=%d", aac, h264));
Telemetry::Accumulate(
Telemetry::HistogramID::VIDEO_CAN_CREATE_AAC_DECODER,
aac);
Telemetry::Accumulate(
Telemetry::HistogramID::VIDEO_CAN_CREATE_H264_DECODER,
h264);
thread->AsyncShutdown();
}));
}),

Просмотреть файл

@ -117,7 +117,6 @@ TextTrackManager::TextTrackManager(HTMLMediaElement* aMediaElement)
mTimeMarchesOnDispatched(false),
mUpdateCueDisplayDispatched(false),
performedTrackSelection(false),
mCueTelemetryReported(false),
mShutdown(false) {
nsISupports* parentObject = mMediaElement->OwnerDoc()->GetParentObject();
@ -281,7 +280,6 @@ void TextTrackManager::NotifyCueAdded(TextTrackCue& aCue) {
mNewCues->AddCue(aCue);
}
MaybeRunTimeMarchesOn();
ReportTelemetryForCue();
}
void TextTrackManager::NotifyCueRemoved(TextTrackCue& aCue) {
@ -853,16 +851,6 @@ void TextTrackManager::ReportTelemetryForTrack(TextTrack* aTextTrack) const {
Telemetry::Accumulate(Telemetry::WEBVTT_TRACK_KINDS, uint32_t(kind));
}
void TextTrackManager::ReportTelemetryForCue() {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!mNewCues->IsEmpty());
if (!mCueTelemetryReported) {
Telemetry::Accumulate(Telemetry::WEBVTT_USED_VTT_CUES, 1);
mCueTelemetryReported = true;
}
}
bool TextTrackManager::IsLoaded() {
return mTextTracks ? mTextTracks->AreTextTracksLoaded() : true;
}

Просмотреть файл

@ -147,14 +147,9 @@ class TextTrackManager final : public nsIDOMEventListener {
bool TrackIsDefault(TextTrack* aTextTrack);
void ReportTelemetryForTrack(TextTrack* aTextTrack) const;
void ReportTelemetryForCue();
bool IsShutdown() const;
// If there is at least one cue has been added to the cue list once, we would
// report the usage of cue to Telemetry.
bool mCueTelemetryReported;
// This function will check media element's show poster flag to decide whether
// we need to run `TimeMarchesOn`.
void MaybeRunTimeMarchesOn();

Просмотреть файл

@ -310,9 +310,6 @@ nsresult AudioStream::OpenCubeb(cubeb* aContext, cubeb_stream_params& aParams,
TimeDuration timeDelta = TimeStamp::Now() - aStartTime;
LOG("creation time %sfirst: %u ms", aIsFirst ? "" : "not ",
(uint32_t)timeDelta.ToMilliseconds());
Telemetry::Accumulate(aIsFirst ? Telemetry::AUDIOSTREAM_FIRST_OPEN_MS
: Telemetry::AUDIOSTREAM_LATER_OPEN_MS,
timeDelta.ToMilliseconds());
return NS_OK;
}

Просмотреть файл

@ -18,7 +18,6 @@
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/TaskQueue.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/gfx/gfxVars.h"
#include "nsIGfxInfo.h"

Просмотреть файл

@ -179,11 +179,6 @@ already_AddRefed<ChannelMediaDecoder> ChannelMediaDecoder::Create(
return decoder.forget();
}
if (DecoderTraits::IsHttpLiveStreamingType(type)) {
// We don't have an HLS decoder.
Telemetry::Accumulate(Telemetry::MEDIA_HLS_DECODER_SUCCESS, false);
}
return nullptr;
}

Просмотреть файл

@ -8,7 +8,6 @@
#include "MediaContainerType.h"
#include "nsMimeTypes.h"
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
#include "OggDecoder.h"
#include "OggDemuxer.h"
@ -150,9 +149,7 @@ static CanPlayStatus CanHandleMediaType(
}
#endif
if (DecoderTraits::IsHttpLiveStreamingType(aType)) {
Telemetry::Accumulate(Telemetry::MEDIA_HLS_CANPLAY_REQUESTED, true);
} else if (DecoderTraits::IsMatroskaType(aType)) {
if (DecoderTraits::IsMatroskaType(aType)) {
Telemetry::Accumulate(Telemetry::MEDIA_MKV_CANPLAY_REQUESTED, true);
}

Просмотреть файл

@ -301,18 +301,11 @@ class MediaCache {
LOG("~MediaCache(Global file-backed MediaCache)");
// This is the file-backed MediaCache, reset the global pointer.
gMediaCache = nullptr;
// Only gather "MEDIACACHE" telemetry for the file-based cache.
LOG("MediaCache::~MediaCache(this=%p) MEDIACACHE_WATERMARK_KB=%u", this,
unsigned(mIndexWatermark * MediaCache::BLOCK_SIZE / 1024));
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIACACHE_WATERMARK_KB,
uint32_t(mIndexWatermark * MediaCache::BLOCK_SIZE / 1024));
LOG("MediaCache::~MediaCache(this=%p) "
"MEDIACACHE_BLOCKOWNERS_WATERMARK=%u",
this, unsigned(mBlockOwnersWatermark));
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIACACHE_BLOCKOWNERS_WATERMARK,
mBlockOwnersWatermark);
} else {
LOG("~MediaCache(Memory-backed MediaCache %p)", this);
}
@ -2652,8 +2645,6 @@ nsresult MediaCacheStream::Init(int64_t aContentLength) {
LOG("MediaCacheStream::Init(this=%p) "
"MEDIACACHESTREAM_NOTIFIED_LENGTH=%" PRIu32,
this, length);
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIACACHESTREAM_NOTIFIED_LENGTH, length);
mStreamLength = aContentLength;
}

Просмотреть файл

@ -20,7 +20,6 @@
#include "mozilla/SharedThreadPool.h"
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/TaskQueue.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Unused.h"
#include "nsContentUtils.h"
#include "nsPrintfCString.h"
@ -47,80 +46,6 @@ namespace mozilla {
typedef void* MediaDataDecoderID;
/**
* This helper class is used to report telemetry of the time used to recover a
* decoder from GPU crash.
* It uses MediaDecoderOwnerID to identify which video we're dealing with.
* It uses MediaDataDecoderID to make sure that the old MediaDataDecoder has
* been deleted and we're already recovered.
* It reports two recovery times, one is calculated from GPU crashed (that is,
* the time when VideoDecoderChild::ActorDestory() is called) and the other is
* calculated from the MFR is notified with NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER
* error.
*/
class GPUProcessCrashTelemetryLogger {
struct GPUCrashData {
GPUCrashData(MediaDataDecoderID aMediaDataDecoderID,
mozilla::TimeStamp aGPUCrashTime,
mozilla::TimeStamp aErrorNotifiedTime)
: mMediaDataDecoderID(aMediaDataDecoderID),
mGPUCrashTime(aGPUCrashTime),
mErrorNotifiedTime(aErrorNotifiedTime) {
MOZ_ASSERT(mMediaDataDecoderID);
MOZ_ASSERT(!mGPUCrashTime.IsNull());
MOZ_ASSERT(!mErrorNotifiedTime.IsNull());
}
MediaDataDecoderID mMediaDataDecoderID;
mozilla::TimeStamp mGPUCrashTime;
mozilla::TimeStamp mErrorNotifiedTime;
};
public:
static void RecordGPUCrashData(MediaDecoderOwnerID aMediaDecoderOwnerID,
MediaDataDecoderID aMediaDataDecoderID,
const TimeStamp& aGPUCrashTime,
const TimeStamp& aErrorNotifiedTime) {
MOZ_ASSERT(aMediaDecoderOwnerID);
MOZ_ASSERT(aMediaDataDecoderID);
MOZ_ASSERT(!aGPUCrashTime.IsNull());
MOZ_ASSERT(!aErrorNotifiedTime.IsNull());
StaticMutexAutoLock lock(sGPUCrashMapMutex);
auto it = sGPUCrashDataMap.find(aMediaDecoderOwnerID);
if (it == sGPUCrashDataMap.end()) {
sGPUCrashDataMap.insert(std::make_pair(
aMediaDecoderOwnerID, GPUCrashData(aMediaDataDecoderID, aGPUCrashTime,
aErrorNotifiedTime)));
}
}
static void ReportTelemetry(MediaDecoderOwnerID aMediaDecoderOwnerID,
MediaDataDecoderID aMediaDataDecoderID) {
MOZ_ASSERT(aMediaDecoderOwnerID);
MOZ_ASSERT(aMediaDataDecoderID);
StaticMutexAutoLock lock(sGPUCrashMapMutex);
auto it = sGPUCrashDataMap.find(aMediaDecoderOwnerID);
if (it != sGPUCrashDataMap.end() &&
it->second.mMediaDataDecoderID != aMediaDataDecoderID) {
Telemetry::AccumulateTimeDelta(
Telemetry::VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_GPU_CRASHED_MS,
it->second.mGPUCrashTime);
Telemetry::AccumulateTimeDelta(
Telemetry::VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_MFR_NOTIFIED_MS,
it->second.mErrorNotifiedTime);
sGPUCrashDataMap.erase(aMediaDecoderOwnerID);
}
}
private:
static std::map<MediaDecoderOwnerID, GPUCrashData> sGPUCrashDataMap;
static StaticMutex sGPUCrashMapMutex;
};
std::map<MediaDecoderOwnerID, GPUProcessCrashTelemetryLogger::GPUCrashData>
GPUProcessCrashTelemetryLogger::sGPUCrashDataMap;
StaticMutex GPUProcessCrashTelemetryLogger::sGPUCrashMapMutex;
/**
* This class tracks shutdown promises to ensure all decoders are shut down
* completely before MFR continues the rest of the shutdown procedure.
@ -1659,18 +1584,6 @@ void MediaFormatReader::NotifyError(TrackType aTrack,
auto& decoder = GetDecoderData(aTrack);
decoder.mError = decoder.HasFatalError() ? decoder.mError : Some(aError);
// The GPU process had crashed and we receive a
// NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER because we were doing HW decoding.
// Now, save the related data and we will report the recovery time when a new
// decoder is ready.
if (aTrack == TrackType::kVideoTrack &&
aError == NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER &&
!aError.GPUCrashTimeStamp().IsNull()) {
GPUProcessCrashTelemetryLogger::RecordGPUCrashData(
mMediaDecoderOwnerID, decoder.mDecoder.get(),
aError.GPUCrashTimeStamp(), TimeStamp::Now());
}
ScheduleUpdate(aTrack);
}
@ -1862,13 +1775,6 @@ void MediaFormatReader::DecodeDemuxedSamples(TrackType aTrack,
[self, aTrack, &decoder](MediaDataDecoder::DecodedData&& aResults) {
decoder.mDecodeRequest.Complete();
self->NotifyNewOutput(aTrack, std::move(aResults));
// When we recovered from a GPU crash and get the first decoded
// frame, report the recovery time telemetry.
if (aTrack == TrackType::kVideoTrack) {
GPUProcessCrashTelemetryLogger::ReportTelemetry(
self->mMediaDecoderOwnerID, decoder.mDecoder.get());
}
},
[self, aTrack, &decoder](const MediaResult& aError) {
decoder.mDecodeRequest.Complete();

Просмотреть файл

@ -9,7 +9,6 @@
#include "mozilla/Atomics.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/Logging.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPrefs_media.h"
#include "nsIObserver.h"
@ -30,107 +29,6 @@ LazyLogModule gMemoryBlockCacheLog("MemoryBlockCache");
// writes), decreases when a MemoryBlockCache (with its buffer) is destroyed.
static Atomic<size_t> gCombinedSizes;
class MemoryBlockCacheTelemetry final : public nsIObserver,
public nsSupportsWeakReference {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
// To be called when the combined size has grown, so that the watermark may
// be updated if needed.
// Ensures MemoryBlockCache telemetry will be reported at shutdown.
// Returns current watermark.
static size_t NotifyCombinedSizeGrown(size_t aNewSize);
private:
MemoryBlockCacheTelemetry() {}
~MemoryBlockCacheTelemetry() {}
// Singleton instance created when a first MediaCache is registered, and
// released when the last MediaCache is unregistered.
// The observer service will keep a weak reference to it, for notifications.
static StaticRefPtr<MemoryBlockCacheTelemetry> gMemoryBlockCacheTelemetry;
// Watermark for the combined sizes; can only increase when a buffer grows.
static Atomic<size_t> gCombinedSizesWatermark;
};
// Initialized to nullptr by non-local static initialization.
/* static */
StaticRefPtr<MemoryBlockCacheTelemetry>
MemoryBlockCacheTelemetry::gMemoryBlockCacheTelemetry;
// Initialized to 0 by non-local static initialization.
/* static */
Atomic<size_t> MemoryBlockCacheTelemetry::gCombinedSizesWatermark;
NS_IMPL_ISUPPORTS(MemoryBlockCacheTelemetry, nsIObserver,
nsISupportsWeakReference)
/* static */
size_t MemoryBlockCacheTelemetry::NotifyCombinedSizeGrown(size_t aNewSize) {
// Ensure gMemoryBlockCacheTelemetry exists.
if (!gMemoryBlockCacheTelemetry) {
MOZ_ASSERT(NS_IsMainThread());
gMemoryBlockCacheTelemetry = new MemoryBlockCacheTelemetry();
nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService();
if (observerService) {
observerService->AddObserver(gMemoryBlockCacheTelemetry,
"profile-change-teardown", true);
}
// Clearing gMemoryBlockCacheTelemetry when handling
// "profile-change-teardown" could run the risk of re-creating it (and then
// leaking it) if some MediaCache work happened after that notification.
// So instead we just request it to be cleared on final shutdown.
ClearOnShutdown(&gMemoryBlockCacheTelemetry);
}
// Update watermark if needed, report current watermark.
for (;;) {
size_t oldSize = gMemoryBlockCacheTelemetry->gCombinedSizesWatermark;
if (aNewSize < oldSize) {
return oldSize;
}
if (gMemoryBlockCacheTelemetry->gCombinedSizesWatermark.compareExchange(
oldSize, aNewSize)) {
return aNewSize;
}
}
}
NS_IMETHODIMP
MemoryBlockCacheTelemetry::Observe(nsISupports* aSubject, char const* aTopic,
char16_t const* aData) {
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
if (strcmp(aTopic, "profile-change-teardown") == 0) {
uint32_t watermark = static_cast<uint32_t>(gCombinedSizesWatermark);
LOG("MemoryBlockCacheTelemetry::~Observe() "
"MEDIACACHE_MEMORY_WATERMARK=%" PRIu32,
watermark);
Telemetry::Accumulate(Telemetry::HistogramID::MEDIACACHE_MEMORY_WATERMARK,
watermark);
return NS_OK;
}
return NS_OK;
}
enum MemoryBlockCacheTelemetryErrors {
// Don't change order/numbers! Add new values at the end and update
// MEMORYBLOCKCACHE_ERRORS description in Histograms.json.
InitUnderuse = 0,
InitAllocation = 1,
ReadOverrun = 2,
WriteBlockOverflow = 3,
WriteBlockCannotGrow = 4,
MoveBlockSourceOverrun = 5,
MoveBlockDestOverflow = 6,
MoveBlockCannotGrow = 7,
};
static int32_t CalculateMaxBlocks(int64_t aContentLength) {
int64_t maxSize = int64_t(StaticPrefs::media_memory_cache_max_size()) * 1024;
MOZ_ASSERT(aContentLength <= maxSize);
@ -152,8 +50,6 @@ MemoryBlockCache::MemoryBlockCache(int64_t aContentLength)
mHasGrown(false) {
if (aContentLength <= 0) {
LOG("MemoryBlockCache() MEMORYBLOCKCACHE_ERRORS='InitUnderuse'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
InitUnderuse);
}
}
@ -220,15 +116,6 @@ bool MemoryBlockCache::EnsureBufferCanContain(size_t aContentLength) {
// possibly bypass some future growths that would fit in this new capacity.
mBuffer.SetLength(capacity);
}
size_t newSizes =
static_cast<size_t>(gCombinedSizes += (extra + extraCapacity));
size_t watermark =
MemoryBlockCacheTelemetry::NotifyCombinedSizeGrown(newSizes);
LOG("EnsureBufferCanContain(%zu) - buffer size %zu + requested %zu + bonus "
"%zu = %zu; combined "
"sizes %zu, watermark %zu",
aContentLength, initialLength, extra, extraCapacity, capacity, newSizes,
watermark);
mHasGrown = true;
return true;
}
@ -240,8 +127,6 @@ nsresult MemoryBlockCache::Init() {
// Attempt to pre-allocate buffer for expected content length.
if (!EnsureBufferCanContain(mInitialContentLength)) {
LOG("Init() MEMORYBLOCKCACHE_ERRORS='InitAllocation'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
InitAllocation);
return NS_ERROR_FAILURE;
}
return NS_OK;
@ -264,13 +149,9 @@ nsresult MemoryBlockCache::WriteBlock(uint32_t aBlockIndex,
if (offset + aData1.Length() + aData2.Length() > mBuffer.Length() &&
!mHasGrown) {
LOG("WriteBlock() MEMORYBLOCKCACHE_ERRORS='WriteBlockOverflow'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
WriteBlockOverflow);
}
if (!EnsureBufferCanContain(offset + aData1.Length() + aData2.Length())) {
LOG("WriteBlock() MEMORYBLOCKCACHE_ERRORS='WriteBlockCannotGrow'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
WriteBlockCannotGrow);
return NS_ERROR_FAILURE;
}
@ -290,8 +171,6 @@ nsresult MemoryBlockCache::Read(int64_t aOffset, uint8_t* aData,
MOZ_ASSERT(aOffset >= 0);
if (aOffset + aLength > int64_t(mBuffer.Length())) {
LOG("Read() MEMORYBLOCKCACHE_ERRORS='ReadOverrun'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
ReadOverrun);
return NS_ERROR_FAILURE;
}
@ -309,19 +188,13 @@ nsresult MemoryBlockCache::MoveBlock(int32_t aSourceBlockIndex,
size_t destOffset = BlockIndexToOffset(aDestBlockIndex);
if (sourceOffset + BLOCK_SIZE > mBuffer.Length()) {
LOG("MoveBlock() MEMORYBLOCKCACHE_ERRORS='MoveBlockSourceOverrun'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
MoveBlockSourceOverrun);
return NS_ERROR_FAILURE;
}
if (destOffset + BLOCK_SIZE > mBuffer.Length() && !mHasGrown) {
LOG("MoveBlock() MEMORYBLOCKCACHE_ERRORS='MoveBlockDestOverflow'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
MoveBlockDestOverflow);
}
if (!EnsureBufferCanContain(destOffset + BLOCK_SIZE)) {
LOG("MoveBlock() MEMORYBLOCKCACHE_ERRORS='MoveBlockCannotGrow'");
Telemetry::Accumulate(Telemetry::HistogramID::MEMORYBLOCKCACHE_ERRORS,
MoveBlockCannotGrow);
return NS_ERROR_FAILURE;
}

Просмотреть файл

@ -83,7 +83,6 @@ void VideoFrameContainer::SetCurrentFrame(const gfx::IntSize& aIntrinsicSize,
const TimeStamp& aTargetTime) {
if (aImage) {
MutexAutoLock lock(mMutex);
AutoTimer<Telemetry::VFC_SETCURRENTFRAME_LOCK_HOLD_MS> lockHold;
AutoTArray<ImageContainer::NonOwningImage, 1> imageList;
imageList.AppendElement(
ImageContainer::NonOwningImage(aImage, aTargetTime, ++mFrameID));
@ -97,7 +96,6 @@ void VideoFrameContainer::SetCurrentFrames(
const gfx::IntSize& aIntrinsicSize,
const nsTArray<ImageContainer::NonOwningImage>& aImages) {
MutexAutoLock lock(mMutex);
AutoTimer<Telemetry::VFC_SETIMAGES_LOCK_HOLD_MS> lockHold;
SetCurrentFramesLocked(aIntrinsicSize, aImages);
}
@ -170,7 +168,6 @@ void VideoFrameContainer::SetCurrentFramesLocked(
void VideoFrameContainer::ClearCurrentFrame() {
MutexAutoLock lock(mMutex);
AutoTimer<Telemetry::VFC_CLEARCURRENTFRAME_LOCK_HOLD_MS> lockHold;
// See comment in SetCurrentFrame for the reasoning behind
// using a kungFuDeathGrip here.
@ -183,7 +180,6 @@ void VideoFrameContainer::ClearCurrentFrame() {
void VideoFrameContainer::ClearFutureFrames() {
MutexAutoLock lock(mMutex);
AutoTimer<Telemetry::VFC_CLEARFUTUREFRAMES_LOCK_HOLD_MS> lockHold;
// See comment in SetCurrentFrame for the reasoning behind
// using a kungFuDeathGrip here.

Просмотреть файл

@ -450,21 +450,6 @@ bool ExtractH264CodecDetails(const nsAString& aCodec, uint8_t& aProfile,
aLevel *= 10;
}
// We only make sure constraints is above 4 for collection perspective
// otherwise collect 0 for unknown.
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG,
aConstraint >= 4 ? aConstraint : 0);
// 244 is the highest meaningful profile value (High 4:4:4 Intra Profile)
// that can be represented as single hex byte, otherwise collect 0 for
// unknown.
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_PROFILE,
aProfile <= 244 ? aProfile : 0);
// Make sure aLevel represents a value between levels 1 and 5.2,
// otherwise collect 0 for unknown.
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_LEVEL,
(aLevel >= 10 && aLevel <= 52) ? aLevel : 0);
return true;
}

Просмотреть файл

@ -190,25 +190,6 @@ void MediaKeySystemAccessManager::Request(
aPromise->MaybeResolve(access);
diagnostics.StoreMediaKeySystemAccess(mWindow->GetExtantDoc(), aKeySystem,
true, __func__);
// Accumulate telemetry to report whether we hit deprecation warnings.
if (warnings.Get("MediaEMENoCapabilitiesDeprecatedWarning")) {
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIA_EME_REQUEST_DEPRECATED_WARNINGS, 1);
EME_LOG(
"MEDIA_EME_REQUEST_DEPRECATED_WARNINGS "
"MediaEMENoCapabilitiesDeprecatedWarning");
} else if (warnings.Get("MediaEMENoCodecsDeprecatedWarning")) {
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIA_EME_REQUEST_DEPRECATED_WARNINGS, 2);
EME_LOG(
"MEDIA_EME_REQUEST_DEPRECATED_WARNINGS "
"MediaEMENoCodecsDeprecatedWarning");
} else {
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIA_EME_REQUEST_DEPRECATED_WARNINGS, 0);
EME_LOG("MEDIA_EME_REQUEST_DEPRECATED_WARNINGS No warnings");
}
return;
}
// Not to inform user, because nothing to do if the corresponding keySystem

Просмотреть файл

@ -32,18 +32,10 @@ sync protocol PRemoteDecoderManager
manages PRemoteDecoder;
parent:
// aBlacklistedD3D11Driver and aBlacklistedD3D9Driver are used to read back the blacklisted driver information
// from GPU process to content process.
// We should have added a new sync method to read back this information but, in that way, we also introduce one
// more sync IPC call.
// Considering that this information is only used for telemetry usage in bug 1393392 and should be removed once
// we have collected enough data, we add these two return values here for convenience.
sync PRemoteDecoder(RemoteDecoderInfoIPDL info,
OptionSet options,
TextureFactoryIdentifier? identifier)
returns (bool success,
nsCString aBlacklistedD3D11Driver,
nsCString aBlacklistedD3D9Driver,
nsCString aErrorDescription);
sync Readback(SurfaceDescriptorGPUVideo sd) returns (SurfaceDescriptor aResult);

Просмотреть файл

@ -63,11 +63,8 @@ MediaResult RemoteAudioDecoderChild::InitIPDL(
mIPDLSelfRef = this;
bool success = false;
nsCString errorDescription;
nsCString blacklistedD3D11Driver;
nsCString blacklistedD3D9Driver;
if (manager->SendPRemoteDecoderConstructor(
this, aAudioInfo, aOptions, Nothing(), &success,
&blacklistedD3D11Driver, &blacklistedD3D9Driver, &errorDescription)) {
this, aAudioInfo, aOptions, Nothing(), &success, &errorDescription)) {
mCanSend = true;
}

Просмотреть файл

@ -139,7 +139,6 @@ PRemoteDecoderChild* RemoteDecoderManagerChild::AllocPRemoteDecoderChild(
const RemoteDecoderInfoIPDL& /* not used */,
const CreateDecoderParams::OptionSet& aOptions,
const Maybe<layers::TextureFactoryIdentifier>& aIdentifier, bool* aSuccess,
nsCString* /* not used */, nsCString* /* not used */,
nsCString* /* not used */) {
// RemoteDecoderModule is responsible for creating RemoteDecoderChild
// classes.

Просмотреть файл

@ -74,8 +74,7 @@ class RemoteDecoderManagerChild final : public PRemoteDecoderManagerChild,
const RemoteDecoderInfoIPDL& aRemoteDecoderInfo,
const CreateDecoderParams::OptionSet& aOptions,
const Maybe<layers::TextureFactoryIdentifier>& aIdentifier,
bool* aSuccess, nsCString* aBlacklistedD3D11Driver,
nsCString* aBlacklistedD3D9Driver, nsCString* aErrorDescription);
bool* aSuccess, nsCString* aErrorDescription);
bool DeallocPRemoteDecoderChild(PRemoteDecoderChild* actor);
private:

Просмотреть файл

@ -212,17 +212,11 @@ PRemoteDecoderParent* RemoteDecoderManagerParent::AllocPRemoteDecoderParent(
const RemoteDecoderInfoIPDL& aRemoteDecoderInfo,
const CreateDecoderParams::OptionSet& aOptions,
const Maybe<layers::TextureFactoryIdentifier>& aIdentifier, bool* aSuccess,
nsCString* aBlacklistedD3D11Driver, nsCString* aBlacklistedD3D9Driver,
nsCString* aErrorDescription) {
RefPtr<TaskQueue> decodeTaskQueue =
new TaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER),
"RemoteVideoDecoderParent::mDecodeTaskQueue");
#ifdef XP_WIN
*aBlacklistedD3D11Driver = GetFoundD3D11BlacklistedDLL();
*aBlacklistedD3D9Driver = GetFoundD3D9BlacklistedDLL();
#endif // XP_WIN
if (aRemoteDecoderInfo.type() ==
RemoteDecoderInfoIPDL::TVideoDecoderInfoIPDL) {
const VideoDecoderInfoIPDL& decoderInfo =

Просмотреть файл

@ -40,8 +40,7 @@ class RemoteDecoderManagerParent final : public PRemoteDecoderManagerParent {
const RemoteDecoderInfoIPDL& aRemoteDecoderInfo,
const CreateDecoderParams::OptionSet& aOptions,
const Maybe<layers::TextureFactoryIdentifier>& aIdentifier,
bool* aSuccess, nsCString* aBlacklistedD3D11Driver,
nsCString* aBlacklistedD3D9Driver, nsCString* aErrorDescription);
bool* aSuccess, nsCString* aErrorDescription);
bool DeallocPRemoteDecoderParent(PRemoteDecoderParent* actor);
mozilla::ipc::IPCResult RecvReadback(const SurfaceDescriptorGPUVideo& aSD,

Просмотреть файл

@ -198,12 +198,10 @@ MediaResult RemoteVideoDecoderChild::InitIPDL(
mIPDLSelfRef = this;
bool success = false;
nsCString errorDescription;
nsCString blacklistedD3D11Driver;
nsCString blacklistedD3D9Driver;
VideoDecoderInfoIPDL decoderInfo(aVideoInfo, aFramerate);
if (manager->SendPRemoteDecoderConstructor(
this, decoderInfo, aOptions, ToMaybe(aIdentifier), &success,
&blacklistedD3D11Driver, &blacklistedD3D9Driver, &errorDescription)) {
if (manager->SendPRemoteDecoderConstructor(this, decoderInfo, aOptions,
ToMaybe(aIdentifier), &success,
&errorDescription)) {
mCanSend = true;
}
@ -211,33 +209,9 @@ MediaResult RemoteVideoDecoderChild::InitIPDL(
: MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, errorDescription);
}
#ifdef XP_WIN
static void ReportUnblacklistingTelemetry(
bool isGPUProcessCrashed, const nsCString& aD3D11BlacklistedDriver,
const nsCString& aD3D9BlacklistedDriver) {
const nsCString& blacklistedDLL = !aD3D11BlacklistedDriver.IsEmpty()
? aD3D11BlacklistedDriver
: aD3D9BlacklistedDriver;
if (!blacklistedDLL.IsEmpty()) {
Telemetry::Accumulate(
Telemetry::VIDEO_UNBLACKINGLISTING_DXVA_DRIVER_RUNTIME_STATUS,
blacklistedDLL, isGPUProcessCrashed ? 1 : 0);
}
}
#endif // XP_WIN
GpuRemoteVideoDecoderChild::GpuRemoteVideoDecoderChild()
: RemoteVideoDecoderChild(true) {}
void GpuRemoteVideoDecoderChild::RecordShutdownTelemetry(
bool aAbnormalShutdown) {
#ifdef XP_WIN
ReportUnblacklistingTelemetry(aAbnormalShutdown, mBlacklistedD3D11Driver,
mBlacklistedD3D9Driver);
#endif // XP_WIN
}
MediaResult GpuRemoteVideoDecoderChild::InitIPDL(
const VideoInfo& aVideoInfo, float aFramerate,
const CreateDecoderParams::OptionSet& aOptions,
@ -267,10 +241,9 @@ MediaResult GpuRemoteVideoDecoderChild::InitIPDL(
bool success = false;
nsCString errorDescription;
VideoDecoderInfoIPDL decoderInfo(aVideoInfo, aFramerate);
if (manager->SendPRemoteDecoderConstructor(
this, decoderInfo, aOptions, Some(aIdentifier), &success,
&mBlacklistedD3D11Driver, &mBlacklistedD3D9Driver,
&errorDescription)) {
if (manager->SendPRemoteDecoderConstructor(this, decoderInfo, aOptions,
Some(aIdentifier), &success,
&errorDescription)) {
mCanSend = true;
}

Просмотреть файл

@ -45,12 +45,6 @@ class GpuRemoteVideoDecoderChild final : public RemoteVideoDecoderChild {
MediaResult InitIPDL(const VideoInfo& aVideoInfo, float aFramerate,
const CreateDecoderParams::OptionSet& aOptions,
const layers::TextureFactoryIdentifier& aIdentifier);
void RecordShutdownTelemetry(bool aAbnormalShutdown) override;
private:
nsCString mBlacklistedD3D11Driver;
nsCString mBlacklistedD3D9Driver;
};
class RemoteVideoDecoderParent final : public RemoteDecoderParent {

Просмотреть файл

@ -73,45 +73,9 @@ class MP4TrackDemuxer : public MediaTrackDemuxer,
// Queued samples extracted by the demuxer, but not yet returned.
RefPtr<MediaRawData> mQueuedSample;
bool mNeedReIndex;
bool mNeedSPSForTelemetry;
enum CodecType { kH264, kVP9, kOther } mType = kOther;
};
// Returns true if no SPS was found and search for it should continue.
bool AccumulateSPSTelemetry(const MediaByteBuffer* aExtradata) {
SPSData spsdata;
if (H264::DecodeSPSFromExtraData(aExtradata, spsdata)) {
uint8_t constraints = (spsdata.constraint_set0_flag ? (1 << 0) : 0) |
(spsdata.constraint_set1_flag ? (1 << 1) : 0) |
(spsdata.constraint_set2_flag ? (1 << 2) : 0) |
(spsdata.constraint_set3_flag ? (1 << 3) : 0) |
(spsdata.constraint_set4_flag ? (1 << 4) : 0) |
(spsdata.constraint_set5_flag ? (1 << 5) : 0);
Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG,
constraints);
// Collect profile_idc values up to 244, otherwise 0 for unknown.
Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_PROFILE,
spsdata.profile_idc <= 244 ? spsdata.profile_idc : 0);
// Make sure level_idc represents a value between levels 1 and 5.2,
// otherwise collect 0 for unknown level.
Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_LEVEL,
(spsdata.level_idc >= 10 && spsdata.level_idc <= 52)
? spsdata.level_idc
: 0);
// max_num_ref_frames should be between 0 and 16, anything larger will
// be treated as invalid.
Telemetry::Accumulate(Telemetry::VIDEO_H264_SPS_MAX_NUM_REF_FRAMES,
std::min(spsdata.max_num_ref_frames, 17u));
return false;
}
return true;
}
MP4Demuxer::MP4Demuxer(MediaResource* aResource)
: mResource(aResource),
mStream(new ResourceStream(aResource)),
@ -352,11 +316,9 @@ MP4TrackDemuxer::MP4TrackDemuxer(MediaResource* aResource,
EnsureUpToDateIndex(); // Force update of index
VideoInfo* videoInfo = mInfo->GetAsVideoInfo();
// Collect telemetry from h264 AVCC SPS.
if (videoInfo && MP4Decoder::IsH264(mInfo->mMimeType)) {
mType = kH264;
RefPtr<MediaByteBuffer> extraData = videoInfo->mExtraData;
mNeedSPSForTelemetry = AccumulateSPSTelemetry(extraData);
SPSData spsdata;
if (H264::DecodeSPSFromExtraData(extraData, spsdata) &&
spsdata.pic_width > 0 && spsdata.pic_height > 0 &&
@ -370,8 +332,6 @@ MP4TrackDemuxer::MP4TrackDemuxer(MediaResource* aResource,
if (videoInfo && VPXDecoder::IsVP9(mInfo->mMimeType)) {
mType = kVP9;
}
// No SPS to be found.
mNeedSPSForTelemetry = false;
}
}
@ -510,16 +470,6 @@ RefPtr<MP4TrackDemuxer::SamplesPromise> MP4TrackDemuxer::GetSamples(
return SamplesPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_END_OF_STREAM,
__func__);
}
for (const auto& sample : samples->GetSamples()) {
// Collect telemetry from h264 Annex B SPS.
if (mNeedSPSForTelemetry && mType == kH264 && AnnexB::IsAVCC(sample)) {
RefPtr<MediaByteBuffer> extradata = H264::ExtractExtraData(sample);
if (H264::HasSPS(extradata)) {
RefPtr<MediaByteBuffer> extradata = H264::ExtractExtraData(sample);
mNeedSPSForTelemetry = AccumulateSPSTelemetry(extradata);
}
}
}
if (mNextKeyframeTime.isNothing() ||
samples->GetSamples().LastElement()->mTime >= mNextKeyframeTime.value()) {

Просмотреть файл

@ -245,13 +245,6 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset, RefPtr<MediaData>& aOutData) {
if (!sample) {
LOG("Audio MFTDecoder returned success but null output.");
nsCOMPtr<nsIRunnable> task =
NS_NewRunnableFunction("WMFAudioMFTManager::Output", []() -> void {
LOG("Reporting telemetry AUDIO_MFT_OUTPUT_NULL_SAMPLES");
Telemetry::Accumulate(
Telemetry::HistogramID::AUDIO_MFT_OUTPUT_NULL_SAMPLES, 1);
});
SystemGroup::Dispatch(TaskCategory::Other, task.forget());
return E_FAIL;
}

Просмотреть файл

@ -51,13 +51,6 @@ static void SendTelemetry(unsigned long hr) {
} else {
sample = 3; // high bucket
}
nsCOMPtr<nsIRunnable> runnable =
NS_NewRunnableFunction("SendTelemetry", [sample] {
Telemetry::Accumulate(Telemetry::MEDIA_WMF_DECODE_ERROR, sample);
});
SystemGroup::Dispatch(TaskCategory::Other, runnable.forget());
}
RefPtr<ShutdownPromise> WMFMediaDataDecoder::Shutdown() {

Просмотреть файл

@ -177,28 +177,6 @@ WMFVideoMFTManager::~WMFVideoMFTManager() {
if (mDXVA2Manager) {
DeleteOnMainThread(mDXVA2Manager);
}
// Record whether the video decoder successfully decoded, or output null
// samples but did/didn't recover.
uint32_t telemetry =
(mNullOutputCount == 0)
? 0
: (mGotValidOutputAfterNullOutput && mGotExcessiveNullOutput)
? 1
: mGotExcessiveNullOutput
? 2
: mGotValidOutputAfterNullOutput ? 3 : 4;
nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction(
"WMFVideoMFTManager::~WMFVideoMFTManager", [=]() -> void {
LOG(nsPrintfCString(
"Reporting telemetry VIDEO_MFT_OUTPUT_NULL_SAMPLES=%d",
telemetry)
.get());
Telemetry::Accumulate(
Telemetry::HistogramID::VIDEO_MFT_OUTPUT_NULL_SAMPLES, telemetry);
});
SystemGroup::Dispatch(TaskCategory::Other, task.forget());
}
const GUID& WMFVideoMFTManager::GetMFTGUID() {

Просмотреть файл

@ -238,24 +238,6 @@
"bug_numbers": [1172689, 1531034],
"description": "Recorded when application reputation remote lookup is performed, `true` is recorded if the lookup times out."
},
"AUDIOSTREAM_FIRST_OPEN_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"expires_in_version": "50",
"kind": "exponential",
"high": 10000,
"n_buckets": 50,
"description": "The length of time (in milliseconds) for the first open of AudioStream."
},
"AUDIOSTREAM_LATER_OPEN_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"expires_in_version": "50",
"kind": "exponential",
"high": 10000,
"n_buckets": 50,
"description": "The length of time (in milliseconds) for the subsequent opens of AudioStream."
},
"AUDIOSTREAM_BACKEND_USED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -9638,51 +9620,6 @@
"n_buckets": 100,
"description": "The time (in milliseconds) that it took to load a source for the user."
},
"MEDIA_RUST_MP4PARSE_SUCCESS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
"expires_in_version": "60",
"kind": "boolean",
"bug_numbers": [1220885],
"description": "Whether the rust mp4 demuxer successfully parsed a stream segment."
},
"MEDIA_RUST_MP4PARSE_ERROR_CODE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
"expires_in_version": "60",
"kind": "enumerated",
"n_values": 32,
"bug_numbers": [1238420],
"description": "The error code reported when an MP4 parse attempt has failed.0 = OK, 1 = bad argument, 2 = invalid data, 3 = unsupported, 4 = unexpected end of file, 5 = read error."
},
"MEDIA_RUST_MP4PARSE_TRACK_MATCH_AUDIO": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
"expires_in_version": "60",
"kind": "boolean",
"bug_numbers": [1231169],
"description": "Whether rust and stagefight mp4 parser audio track results match."
},
"MEDIA_RUST_MP4PARSE_TRACK_MATCH_VIDEO": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "kinetik@flim.org"],
"expires_in_version": "60",
"kind": "boolean",
"bug_numbers": [1231169],
"description": "Whether rust and stagefight mp4 parser video track results match."
},
"MEDIA_WMF_DECODE_ERROR": {
"record_in_processes": ["main", "content", "gpu"],
"products": ["firefox", "fennec", "geckoview"],
"expires_in_version": "55",
"kind": "enumerated",
"n_values": 256,
"description": "WMF media decoder error or success (0) codes."
},
"MEDIA_OGG_LOADED_IS_CHAINED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -9692,33 +9629,6 @@
"description": "Whether while playing Ogg audio/video we encountered a chained Ogg. Reported on every audio or video element that loads an Ogg file.",
"bug_numbers": [1230295]
},
"MEDIA_HLS_CANPLAY_REQUESTED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "boolean",
"description": "Reports a true value when a page requests canPlayType for an HTTP Live Streaming media type (or generic m3u playlist).",
"bug_numbers": [1262659]
},
"MEDIA_HLS_DECODER_SUCCESS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "boolean",
"description": "Reports whether a decoder for an HTTP Live Streaming media type was created when requested.",
"bug_numbers": [1262659]
},
"MEDIA_EME_SECURE_CONTEXT": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "boolean",
"description": "Reports whether a navigator.requestMediaKeySystemAccess() was called in a secure context (i.e. on an origin served over HTTPS) or not.",
"bug_numbers": [1360438]
},
"MEDIA_MKV_CANPLAY_REQUESTED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -9728,16 +9638,6 @@
"description": "Reports a true value when a page requests canPlayType for a matroska media type.",
"bug_numbers": [1429986]
},
"MEDIA_EME_REQUEST_DEPRECATED_WARNINGS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"bug_numbers": [1368596],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 10,
"description": "Counts types of deprecation warnings logged on every successful call to navigator.requestMediaKeySystemAccess(). 0=No warnings logged, 1=MediaEMENoCapabilitiesDeprecatedWarning, 2=MediaEMENoCodecsDeprecatedWarning."
},
"MEDIA_MP4_PARSE_SAMPLE_DESCRIPTION_ENTRIES_HAVE_MULTIPLE_CODECS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -9766,38 +9666,6 @@
"n_values": 5,
"description": "Counts the number of entries in the sample description box (stsd) for a track in an mp4. Recorded each time we process a track's metadata while parsing mp4s."
},
"MEDIACACHE_WATERMARK_KB": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1366929],
"expires_in_version": "60",
"kind": "linear",
"high": 520000,
"n_buckets": 66,
"description": "Maximum MediaCache buffer size reached, in KB. Recorded at every MediaCache destruction, i.e., whenever there is no more media data to be downloaded or kept for playback."
},
"MEDIACACHE_MEMORY_WATERMARK": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1377575],
"expires_in_version": "60",
"kind": "linear",
"high": 520000000,
"n_buckets": 66,
"description": "Maximum memory-backed-MediaCache memory usage reached, in bytes. Recorded at every Firefox shutdown if memory-backed-MediaCache was used."
},
"MEDIACACHE_BLOCKOWNERS_WATERMARK": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1366936],
"expires_in_version": "60",
"kind": "enumerated",
"n_values": 32,
"description": "Maximum number of owners for each MediaCache block. Recorded at every MediaCache destruction, i.e., whenever there is no more media data to be downloaded or kept for playback."
},
"MEDIACACHESTREAM_LENGTH_KB": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -9809,138 +9677,6 @@
"n_buckets": 66,
"description": "MediaCacheStream stream length size in KB; Either known size from the HTTP header if available, or otherwise the size actually downloaded. Recorded at every MediaCacheStream destruction."
},
"MEDIACACHESTREAM_NOTIFIED_LENGTH": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1371205],
"expires_in_version": "60",
"kind": "linear",
"high": 16777216,
"n_buckets": 66,
"description": "MediaCacheStream stream notified length size in bytes, from the HTTP header. Recorded when each MediaCacheStream is first notified."
},
"MEMORYBLOCKCACHE_ERRORS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1371882],
"expires_in_version": "60",
"kind": "enumerated",
"n_values": 16,
"description": "Unexpected errors encountered during use of MemoryBlockCache. 0=InitUnderuse, 1=InitAllocation, 2=ReadOverrun, 3=WriteBlockOverflow, 4=WriteBlockCannotGrow, 5=MoveBlockSourceOverrun, 6=MoveBlockDestOverflow, 7=MoveBlockCannotGrow"
},
"VIDEO_MFT_OUTPUT_NULL_SAMPLES": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 10,
"description": "Does the WMF video decoder return success but null output? 0 = playback successful, 1 = excessive null output but able to decode some frames, 2 = excessive null output and gave up, 3 = null output but recovered, 4 = non-excessive null output without being able to decode frames.",
"bug_numbers": [1176071]
},
"AUDIO_MFT_OUTPUT_NULL_SAMPLES": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "count",
"description": "How many times the audio MFT decoder returns success but output nothing.",
"bug_numbers": [1176071]
},
"VIDEO_CAN_CREATE_AAC_DECODER": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "68",
"kind": "boolean",
"description": "Whether at startup we report we can playback MP4 (AAC) audio. This is single value is recorded at every startup.",
"releaseChannelCollection": "opt-out"
},
"VIDEO_CAN_CREATE_H264_DECODER": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "68",
"kind": "boolean",
"description": "Whether at startup we report we can playback MP4 (H.264) video. This is single value is recorded at every startup.",
"releaseChannelCollection": "opt-out"
},
"VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 128,
"description": "The H.264 constraint set flag as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType, with the addition of 0 for unknown values."
},
"VIDEO_CANPLAYTYPE_H264_LEVEL": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 51,
"description": "The H.264 level (level_idc) as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType, from levels 1 (10) to 5.2 (51), with the addition of 0 for unknown values."
},
"VIDEO_CANPLAYTYPE_H264_PROFILE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 244,
"description": "The H.264 profile number (profile_idc) as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType."
},
"DECODER_DOCTOR_INFOBAR_STATS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com","gsquelart@mozilla.com"],
"bug_numbers": [1271483, 1337566],
"expires_in_version": "63",
"kind": "enumerated",
"keyed": true,
"n_values": 8,
"description": "Counts of various Decoder Doctor notification events. Used to track efficacy of Decoder Doctor at helping users fix problems with their audio/video codecs. Keys are localized string names that identify problem with audio/video codecs that Decoder Doctor attempts to solve; see string values in dom.properties for verbose description of problems being solved. 0=recorded every time the Decoder Doctor notification is shown, 1=recorded the first time in a profile when notification is shown, 2=recorded when 'Learn how' button clicked, 3=recorded when 'Learn how' button first clicked in a profile, 4=recorded when issue solved after infobar has been shown at least once in a profile."
},
"VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 128,
"description": "A bit pattern to collect H.264 constraint set flag from the decoded SPS. Bits 0 through 5 represent constraint_set0_flag through constraint_set5_flag, respectively."
},
"VIDEO_DECODED_H264_SPS_LEVEL": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 51,
"description": "The H.264 level (level_idc) as extracted from the decoded SPS, from levels 1 (10) to 5.2 (51), with the addition of 0 for unknown values."
},
"VIDEO_DECODED_H264_SPS_PROFILE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 244,
"description": "The H.264 profile number (profile_idc) as extracted from the decoded SPS."
},
"VIDEO_H264_SPS_MAX_NUM_REF_FRAMES": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 17,
"description": "SPS.max_num_ref_frames indicates how deep the H.264 queue is going to be, and as such the minimum memory usage by the decoder, from 0 to 16. 17 indicates an invalid value."
},
"WEBRTC_DTLS_CIPHER": {
"record_in_processes": ["content"],
"products": ["firefox", "fennec", "geckoview"],
@ -13002,36 +12738,6 @@
"n_buckets": 100,
"bug_numbers": [1294349]
},
"VIDEO_AS_CONTENT_SOURCE" : {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"description": "Usage of a {visible / invisible} video element as the source of {drawImage(), createPattern(), createImageBitmap() and captureStream()} APIs. (0 = ALL_VISIBLE, 1 = ALL_INVISIBLE, 2 = drawImage_VISIBLE, 3 = drawImage_INVISIBLE, 4 = createPattern_VISIBLE, 5 = createPattern_INVISIBLE, 6 = createImageBitmap_VISIBLE, 7 = createImageBitmap_INVISIBLE, 8 = captureStream_VISIBLE, 9 = captureStream_INVISIBLE)",
"kind": "enumerated",
"n_values": 12,
"bug_numbers": [1299718]
},
"VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT" : {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"description": "Usage of an invisible {in tree / not in tree} video element as the source of {drawImage(), createPattern(), createImageBitmap() and captureStream()} APIs. (0 = ALL_IN_TREE, 1 = ALL_NOT_IN_TREE, 2 = drawImage_IN_TREE, 3 = drawImage_NOT_IN_TREE, 4 = createPattern_IN_TREE, 5 = createPattern_NOT_IN_TREE, 6 = createImageBitmap_IN_TREE, 7 = createImageBitmap_NOT_IN_TREE, 8 = captureStream_IN_TREE, 9 = captureStream_NOT_IN_TREE)",
"kind": "enumerated",
"n_values": 12,
"bug_numbers": [1337301]
},
"VIDEO_UNLOAD_STATE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"kind": "enumerated",
"n_values": 5,
"description": "HTML Media Element state when unloading. ended = 0, paused = 1, stalled = 2, seeking = 3, other = 4",
"bug_numbers": [1261955, 1261955]
},
"VIDEO_VP9_BENCHMARK_FPS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -13979,15 +13685,6 @@
"labels": ["Used", "RejectedByPolicy", "RequestMismatch", "LoadError", "NotUsed"],
"description": "Whether a preloaded script was used or the reason it was not used."
},
"VIDEO_FASTSEEK_USED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@mozilla.com"],
"expires_in_version": "63",
"bug_numbers": [1245982],
"kind": "count",
"description": "Uses of HTMLMediaElement.fastSeek"
},
"VIDEO_DROPPED_FRAMES_PROPORTION" : {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -14225,16 +13922,6 @@
"description": "Number of the use of the subtitles kind track. 0=Subtitles, 1=Captions, 2=Descriptions, 3=Chapters, 4=Metadata, 5=Undefined Error",
"releaseChannelCollection": "opt-out"
},
"WEBVTT_USED_VTT_CUES": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["alwu@mozilla.com"],
"expires_in_version": "55",
"kind": "count",
"bug_numbers": [1280644],
"description": "Number of the use of the vtt cues.",
"releaseChannelCollection": "opt-out"
},
"BLINK_FILESYSTEM_USED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
@ -14947,90 +14634,6 @@
"bug_numbers": [1345540],
"description": "Time (ms) for the APZ handled wheel event spent in handlers."
},
"VFC_INVALIDATE_LOCK_WAIT_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::InvalidateWithFlags spent waiting for a lock."
},
"VFC_INVALIDATE_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::InvalidateWithFlags spent holding a lock."
},
"VFC_SETVIDEOSEGMENT_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::SetCurrentFrames(VideoSegment) spent holding a lock."
},
"VFC_SETIMAGES_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::SetCurrentFrames(nsTArray<ImageContainer::NonOwningImage>) spent holding a lock."
},
"VFC_SETCURRENTFRAME_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::SetCurrentFrame spent holding a lock."
},
"VFC_CLEARCURRENTFRAME_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::ClearCurrentFrame spent holding a lock."
},
"VFC_CLEARFUTUREFRAMES_LOCK_HOLD_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jwwang@mozilla.com"],
"expires_in_version": "57",
"kind": "exponential",
"low": 1000,
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1366640],
"description": "Time (ms) VideoFrameContainer::ClearFutureFrames spent holding a lock."
},
"IPC_SYNC_RECEIVE_MS": {
"record_in_processes": ["main", "content", "gpu"],
"products": ["firefox", "fennec", "geckoview"],
@ -15481,30 +15084,6 @@
"bug_numbers": [1393392],
"description": "The runtime status, sent when a remote HW video decoder is shutdown, of previously-blacklisted driver: 0:remote HW-decoding and GPU process didn't crash, 1:remote HW-decoding and GPU process crashed. The histogram is keyed by the blacklisted driver name."
},
"VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_GPU_CRASHED_MS" : {
"record_in_processes": ["content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"releaseChannelCollection": "opt-out",
"kind": "exponential",
"high": 64000,
"n_buckets": 100,
"bug_numbers": [1393399],
"description": "Time in milliseconds to recover a video decoder from a HW video decoder crash, calculated since VideoDecoderChild::ActorDestroy() is called. The data is sent when video decoding is recovered from a GPU crash and the first frame is decoded."
},
"VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_MFR_NOTIFIED_MS" : {
"record_in_processes": ["content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
"expires_in_version": "63",
"releaseChannelCollection": "opt-out",
"kind": "exponential",
"high": 64000,
"n_buckets": 100,
"bug_numbers": [1393399],
"description": "Time in milliseconds to recover a video decoder from a HW video decoder crash, calculated since MFR gets a NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER error. The data is sent when video decoding is recovered from a GPU crash and the first frame is decoded."
},
"FORM_FILLING_REQUIRED_TIME_MS": {
"record_in_processes": ["main"],
"products": ["firefox", "fennec", "geckoview"],

Просмотреть файл

@ -1319,27 +1319,6 @@ media:
- main
- content
page_had_play_revoked_count:
bug_numbers:
- 1476456
- 1499803
description: >
The number of times a document hierarchy contained at least one muted playing HTMLMediaElement that was paused due to becoming unmuted while not being allowed to autoplay.
expires: "68"
kind: uint
notification_emails:
- cpearce@mozilla.com
- alwu@mozilla.com
- nohlmeier@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
- 'geckoview'
record_in_processes:
- main
- content
autoplay_would_not_be_allowed_count:
bug_numbers:
- 1476456
@ -1361,27 +1340,6 @@ media:
- main
- content
allowed_autoplay_no_audio_track_count:
bug_numbers:
- 1480484
- 1499803
description: >
The number of HTMLMediaElement autoplays on HTMLMediaElements without an audio track which would be allowed to play.
expires: "68"
kind: uint
notification_emails:
- cpearce@mozilla.com
- alwu@mozilla.com
- nohlmeier@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
- 'geckoview'
record_in_processes:
- main
- content
autoplay_would_be_allowed_count:
bug_numbers:
- 1476456
@ -1403,68 +1361,6 @@ media:
- main
- content
blocked_no_metadata:
bug_numbers:
- 1483703
- 1499803
description: >
The number of HTMLMediaElements which we blocked because they hadn't loaded metadata yet.
expires: "68"
kind: uint
notification_emails:
- cpearce@mozilla.com
- alwu@mozilla.com
- nohlmeier@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
- 'geckoview'
record_in_processes:
- main
- content
blocked_no_metadata_endup_no_audio_track:
bug_numbers:
- 1483703
- 1499803
description: >
The number of HTMLMediaElements which were blocked because they hadn't loaded metadata yet, but ended up having no audio track.
expires: "68"
kind: uint
notification_emails:
- cpearce@mozilla.com
- alwu@mozilla.com
- nohlmeier@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
- 'geckoview'
record_in_processes:
- main
- content
autoplay_default_blocked:
bug_numbers:
- 1521947
description: >
Whether the user blocked autoplay by default. Recorded when the preference is toggled.
expires: "72"
kind: boolean
notification_emails:
- cpearce@mozilla.com
- alwu@mozilla.com
- nohlmeier@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
- 'geckoview'
record_in_processes:
- main
- content
# The following section contains content process base counters.
dom.contentprocess:
buildID_mismatch:

Просмотреть файл

@ -1,8 +1,6 @@
{
"alert_emails": [
"ADDON_SHIM_USAGE",
"AUDIOSTREAM_FIRST_OPEN_MS",
"AUDIOSTREAM_LATER_OPEN_MS",
"AUTO_REJECTED_TRANSLATION_OFFERS",
"BACKGROUNDFILESAVER_THREAD_COUNT",
"BAD_FALLBACK_FONT",
@ -231,7 +229,6 @@
"LONG_REFLOW_INTERRUPTIBLE",
"MAC_INITFONTLIST_TOTAL",
"MASTER_PASSWORD_ENABLED",
"MEDIA_WMF_DECODE_ERROR",
"MIXED_CONTENT_PAGE_LOAD",
"MIXED_CONTENT_UNBLOCK_COUNTER",
"MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS",
@ -447,8 +444,6 @@
"APPLICATION_REPUTATION_LOCAL",
"APPLICATION_REPUTATION_SERVER",
"APPLICATION_REPUTATION_SHOULD_BLOCK",
"AUDIOSTREAM_FIRST_OPEN_MS",
"AUDIOSTREAM_LATER_OPEN_MS",
"AUTO_REJECTED_TRANSLATION_OFFERS",
"BACKGROUNDFILESAVER_THREAD_COUNT",
"BAD_FALLBACK_FONT",
@ -773,7 +768,6 @@
"MAC_INITFONTLIST_TOTAL",
"MASTER_PASSWORD_ENABLED",
"MEDIA_CODEC_USED",
"MEDIA_WMF_DECODE_ERROR",
"MEMORY_FREE_PURGED_PAGES_MS",
"MEMORY_HEAP_ALLOCATED",
"MEMORY_IMAGES_CONTENT_USED_UNCOMPRESSED",
@ -1087,17 +1081,8 @@
"URLCLASSIFIER_PS_CONSTRUCT_TIME",
"URLCLASSIFIER_PS_FALLOCATE_TIME",
"URLCLASSIFIER_PS_FILELOAD_TIME",
"VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG",
"VIDEO_CANPLAYTYPE_H264_LEVEL",
"VIDEO_CANPLAYTYPE_H264_PROFILE",
"VIDEO_CAN_CREATE_AAC_DECODER",
"VIDEO_CAN_CREATE_H264_DECODER",
"VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG",
"VIDEO_DECODED_H264_SPS_LEVEL",
"VIDEO_DECODED_H264_SPS_PROFILE",
"VIDEO_EME_REQUEST_FAILURE_LATENCY_MS",
"VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS",
"VIDEO_H264_SPS_MAX_NUM_REF_FRAMES",
"WEAVE_COMPLETE_SUCCESS_COUNT",
"WEAVE_CONFIGURED",
"WEAVE_CONFIGURED_MASTER_PASSWORD",
@ -1212,11 +1197,6 @@
"UPDATE_STATUS_ERROR_CODE_UNKNOWN_STAGE",
"SECURITY_UI",
"CRASH_STORE_COMPRESSED_BYTES",
"MEDIA_WMF_DECODE_ERROR",
"VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG",
"VIDEO_CANPLAYTYPE_H264_PROFILE",
"VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG",
"VIDEO_DECODED_H264_SPS_PROFILE",
"WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS",
"WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS",
"WEBRTC_VIDEO_QUALITY_INBOUND_BANDWIDTH_KBITS",
@ -1337,7 +1317,6 @@
"ADDON_FORBIDDEN_CPOW_USAGE",
"ADDON_MANAGER_UPGRADE_UI_SHOWN",
"ALERTS_SERVICE_DND_SUPPORTED_FLAG",
"AUDIO_MFT_OUTPUT_NULL_SAMPLES",
"AUTO_REJECTED_TRANSLATION_OFFERS",
"BROWSER_SHIM_USAGE_BLOCKED",
"CANVAS_WEBGL_ACCL_FAILURE_ID",
@ -1511,10 +1490,8 @@
"UPDATE_SERVICE_MANUALLY_UNINSTALLED_NOTIFY",
"UPDATE_UNABLE_TO_APPLY_EXTERNAL",
"UPDATE_UNABLE_TO_APPLY_NOTIFY",
"VIDEO_FASTSEEK_USED",
"WEBFONT_PER_PAGE",
"WEBRTC_CALL_COUNT_2",
"WEBVTT_USED_VTT_CUES",
"XUL_CACHE_DISABLED"
]
}