mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Telemetry: Remove stubs and related code
This commit is contained in:
parent
10053448d6
commit
aea50f182f
134 changed files with 68 additions and 3422 deletions
|
|
@ -30,7 +30,6 @@
|
|||
#include "mozilla/dom/VideoTrack.h"
|
||||
#include "mozilla/dom/VideoTrackList.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "GMPService.h"
|
||||
#include "Layers.h"
|
||||
#include "mozilla/layers/ShadowLayers.h"
|
||||
|
|
@ -421,7 +420,6 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
|||
, INIT_CANONICAL(mPlaybackRateReliable, true)
|
||||
, INIT_CANONICAL(mDecoderPosition, 0)
|
||||
, INIT_CANONICAL(mIsVisible, !aOwner->IsHidden())
|
||||
, mTelemetryReported(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaDecoder);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
@ -841,41 +839,6 @@ MediaDecoder::MetadataLoaded(nsAutoPtr<MediaInfo> aInfo,
|
|||
// So we call Invalidate() after calling mOwner->MetadataLoaded to ensure
|
||||
// the media element has the latest dimensions.
|
||||
Invalidate();
|
||||
|
||||
EnsureTelemetryReported();
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoder::EnsureTelemetryReported()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mTelemetryReported || !mInfo) {
|
||||
// Note: sometimes we get multiple MetadataLoaded calls (for example
|
||||
// for chained ogg). So we ensure we don't report duplicate results for
|
||||
// these resources.
|
||||
return;
|
||||
}
|
||||
|
||||
nsTArray<nsCString> codecs;
|
||||
if (mInfo->HasAudio() && !mInfo->mAudio.GetAsAudioInfo()->mMimeType.IsEmpty()) {
|
||||
codecs.AppendElement(mInfo->mAudio.GetAsAudioInfo()->mMimeType);
|
||||
}
|
||||
if (mInfo->HasVideo() && !mInfo->mVideo.GetAsVideoInfo()->mMimeType.IsEmpty()) {
|
||||
codecs.AppendElement(mInfo->mVideo.GetAsVideoInfo()->mMimeType);
|
||||
}
|
||||
if (codecs.IsEmpty()) {
|
||||
if (mResource->GetContentType().IsEmpty()) {
|
||||
NS_WARNING("Somehow the resource's content type is empty");
|
||||
return;
|
||||
}
|
||||
codecs.AppendElement(nsPrintfCString("resource; %s", mResource->GetContentType().get()));
|
||||
}
|
||||
for (const nsCString& codec : codecs) {
|
||||
DECODER_LOG("Telemetry MEDIA_CODEC_USED= '%s'", codec.get());
|
||||
}
|
||||
|
||||
mTelemetryReported = true;
|
||||
}
|
||||
|
||||
const char*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue